import { VorionError } from '../../../common/errors.js';
import { type DilithiumKeyPair, type SignatureResult, type VerificationResult, type DilithiumConfig, type DilithiumParameterSet, type ClassicalSignatureAlgorithm, type HybridSignatureKeyPair, type HybridSignatureResult, DILITHIUM_PARAMETERS } from './types.js';
/**
 * Dilithium-specific error
 */
export declare class DilithiumError extends VorionError {
    readonly errorCode: string;
    code: string;
    statusCode: number;
    constructor(message: string, errorCode?: string, details?: Record<string, unknown>);
}
/**
 * CRYSTALS-Dilithium Digital Signature Service
 *
 * Provides post-quantum secure digital signatures using CRYSTALS-Dilithium (ML-DSA).
 *
 * @example
 * ```typescript
 * const dilithium = new DilithiumService();
 *
 * // Generate a key pair
 * const keyPair = await dilithium.generateKeyPair('dilithium3');
 *
 * // Sign a message
 * const message = new TextEncoder().encode('Hello, quantum world!');
 * const { signature } = await dilithium.sign(keyPair.privateKey, message, 'dilithium3');
 *
 * // Verify the signature
 * const { valid } = await dilithium.verify(keyPair.publicKey, message, signature, 'dilithium3');
 * console.log('Signature valid:', valid);
 * ```
 */
export declare class DilithiumService {
    private readonly config;
    private nobleAvailable;
    constructor(config?: Partial<DilithiumConfig>);
    /**
     * Initialize the service and detect @noble/post-quantum bindings
     */
    initialize(): Promise<void>;
    /**
     * Check if @noble/post-quantum ML-DSA is available
     */
    isNativeAvailable(): boolean;
    /**
     * Get parameter specifications for a parameter set
     */
    getParameters(parameterSet?: DilithiumParameterSet): typeof DILITHIUM_PARAMETERS[DilithiumParameterSet];
    /**
     * Generate a Dilithium key pair
     *
     * @param parameterSet - Dilithium parameter set (default: configured default)
     * @returns Generated key pair
     */
    generateKeyPair(parameterSet?: DilithiumParameterSet): Promise<DilithiumKeyPair>;
    /**
     * Sign a message using a private key
     *
     * @param privateKey - Signer's private key
     * @param message - Message to sign
     * @param parameterSet - Dilithium parameter set
     * @returns Signature result
     */
    sign(privateKey: Uint8Array, message: Uint8Array, parameterSet?: DilithiumParameterSet): Promise<SignatureResult>;
    /**
     * Verify a signature against a message and public key
     *
     * @param publicKey - Signer's public key
     * @param message - Original message
     * @param signature - Signature to verify
     * @param parameterSet - Dilithium parameter set
     * @returns Verification result
     */
    verify(publicKey: Uint8Array, message: Uint8Array, signature: Uint8Array, parameterSet?: DilithiumParameterSet): Promise<VerificationResult>;
    /**
     * Generate a hybrid key pair (Ed25519 + Dilithium)
     *
     * @param dilithiumParameterSet - Dilithium parameter set
     * @param classicalAlgorithm - Classical algorithm (default: Ed25519)
     * @returns Hybrid signature key pair
     */
    generateHybridKeyPair(dilithiumParameterSet?: DilithiumParameterSet, classicalAlgorithm?: ClassicalSignatureAlgorithm): Promise<HybridSignatureKeyPair>;
    /**
     * Hybrid signing (Ed25519 + Dilithium)
     *
     * @param classicalPrivateKey - Classical private key
     * @param pqPrivateKey - Dilithium private key
     * @param message - Message to sign
     * @param classicalAlgorithm - Classical algorithm
     * @param dilithiumParameterSet - Dilithium parameter set
     * @returns Hybrid signature result
     */
    hybridSign(classicalPrivateKey: Uint8Array, pqPrivateKey: Uint8Array, message: Uint8Array, classicalAlgorithm?: ClassicalSignatureAlgorithm, dilithiumParameterSet?: DilithiumParameterSet): Promise<HybridSignatureResult>;
    /**
     * Hybrid verification (Ed25519 + Dilithium)
     *
     * @param classicalPublicKey - Classical public key
     * @param pqPublicKey - Dilithium public key
     * @param message - Original message
     * @param signature - Combined signature
     * @param classicalAlgorithm - Classical algorithm
     * @param dilithiumParameterSet - Dilithium parameter set
     * @param requireBothValid - Require both signatures to be valid (default: true)
     * @returns Verification result
     */
    hybridVerify(classicalPublicKey: Uint8Array, pqPublicKey: Uint8Array, message: Uint8Array, signature: Uint8Array, classicalAlgorithm?: ClassicalSignatureAlgorithm, dilithiumParameterSet?: DilithiumParameterSet, requireBothValid?: boolean): Promise<{
        valid: boolean;
        classicalValid: boolean;
        pqValid: boolean;
        error?: string;
    }>;
    /**
     * Get service configuration
     */
    getConfig(): Readonly<DilithiumConfig>;
}
/**
 * Create a Dilithium service instance
 */
export declare function createDilithiumService(config?: Partial<DilithiumConfig>): DilithiumService;
/**
 * Create and initialize a Dilithium service
 */
export declare function createInitializedDilithiumService(config?: Partial<DilithiumConfig>): Promise<DilithiumService>;
//# sourceMappingURL=dilithium.d.ts.map