/**
 * Security Analysis for Shamir Secret Sharing
 *
 * This module provides comprehensive security analysis capabilities:
 * - Entropy verification of shares
 * - Statistical randomness tests
 * - Timing attack resistance verification
 * - Memory safety analysis
 *
 * @module security/crypto/shamir/security-analysis
 */
import { VerifiedShare, SecurityAnalysisResult, SecurityCheck, EntropyAnalysis, TimingAnalysis } from './types';
/**
 * Calculate Shannon entropy of a byte array.
 *
 * Shannon entropy: H(X) = -Sum(p(x) * log2(p(x)))
 *
 * Maximum entropy for bytes is 8 bits (uniform distribution).
 * Good random data should have entropy close to 8.
 */
export declare function calculateShannonEntropy(data: Uint8Array): number;
/**
 * Calculate min-entropy (conservative entropy estimate).
 *
 * Min-entropy: H_min(X) = -log2(max(p(x)))
 *
 * This is a more conservative measure than Shannon entropy,
 * as it considers only the most probable outcome.
 */
export declare function calculateMinEntropy(data: Uint8Array): number;
/**
 * Analyze entropy of share data.
 */
export declare function analyzeShareEntropy(shares: VerifiedShare[]): EntropyAnalysis;
/**
 * Chi-square test for uniformity.
 *
 * Tests if byte distribution is consistent with uniform distribution.
 * Returns p-value; values < 0.01 indicate non-random data.
 */
export declare function chiSquareTest(data: Uint8Array): {
    statistic: number;
    pValue: number;
    passed: boolean;
};
/**
 * Runs test for randomness (counts runs of consecutive identical bits).
 */
export declare function runsTest(data: Uint8Array): {
    statistic: number;
    pValue: number;
    passed: boolean;
};
/**
 * Serial test for bit pairs.
 */
export declare function serialTest(data: Uint8Array): {
    statistic: number;
    pValue: number;
    passed: boolean;
};
/**
 * Analyze timing characteristics of an operation.
 */
export declare function analyzeTimings(samples: number[]): TimingAnalysis;
/**
 * Test timing resistance of GF(2^8) operations.
 */
export declare function testGF256TimingResistance(iterations?: number): {
    passed: boolean;
    operations: {
        [key: string]: TimingAnalysis;
    };
};
/**
 * Test timing resistance of reconstruction operation.
 */
export declare function testReconstructionTimingResistance(iterations?: number): TimingAnalysis;
/**
 * Check for potential memory leaks in share operations.
 */
export declare function analyzeMemorySafety(iterations?: number): {
    passed: boolean;
    checks: SecurityCheck[];
};
/**
 * Run comprehensive security analysis.
 */
export declare function runSecurityAnalysis(): SecurityAnalysisResult;
/**
 * Quick security check with minimal testing.
 */
export declare function runQuickSecurityCheck(): {
    passed: boolean;
    summary: string;
};
//# sourceMappingURL=security-analysis.d.ts.map