/** * SLSS - Sparse Lattice Subset Sum Problem * * A novel variant combining lattice hardness with sparsity constraints. * * Problem: Given A ∈ Z_q^{m×n}, find sparse s ∈ {-1,0,1}^n such that A·s ≡ t (mod q) * * Security Properties: * - Based on LWE (Learning With Errors) with sparse secrets * - Quantum security: ~n/2 bits against known quantum attacks * - Parameters chosen for 128/256-bit post-quantum security * - Gaussian error distribution with σ = 3.19 for security margin * * Performance: * - Key generation: O(m·n) for matrix generation * - Encryption: O(m·n) for matrix-vector products * - Decryption: O(n) for inner product */ import type { SLSSParams, SLSSPublicKey, SLSSSecretKey, SLSSCiphertext } from '../../types.js'; export interface SLSSKeyPair { publicKey: SLSSPublicKey; secretKey: SLSSSecretKey; } /** * Generate SLSS key pair * * Key structure: * - Public key: (A, t) where t = A·s + e * - Secret key: sparse vector s ∈ {-1,0,1}^n with Hamming weight w * * Security: Finding s given (A, t) is the Sparse-LWE problem. * The sparse secret enables efficient operations while maintaining * security against known attacks. * * @param params - SLSS parameters * @param seed - Random seed * @returns Key pair */ export declare function slssKeyGen(params: SLSSParams, seed: Uint8Array): SLSSKeyPair; /** * SLSS Encryption (for KEM) * Encrypts a message fragment using the public key * * Encryption algorithm (dual Regev): * 1. Sample ephemeral sparse r * 2. Compute u = A^T·r + e1 * 3. Compute v = t^T·r + e2 + encode(m) * * Security: IND-CPA under Sparse-LWE assumption * * @param publicKey - Recipient's public key * @param message - Message to encrypt * @param params - SLSS parameters * @param randomness - Randomness for encryption * @returns Ciphertext */ export declare function slssEncrypt(publicKey: SLSSPublicKey, message: Uint8Array, params: SLSSParams, randomness: Uint8Array): SLSSCiphertext; /** * SLSS Decryption (for KEM) * * Decryption algorithm: * 1. Compute s^T · u * 2. Recover noisy message: v - s^T · u = encode(m) + (combined error) * 3. Decode message by thresholding * * Correctness: Decryption succeeds when combined error < q/4 * Combined error = e2 + t^T·r - s^T·(A^T·r + e1) = e2 - s^T·e1 (small) * * @param ciphertext - Ciphertext to decrypt * @param secretKey - Recipient's secret key * @param params - SLSS parameters * @returns Decrypted message */ export declare function slssDecrypt(ciphertext: SLSSCiphertext, secretKey: SLSSSecretKey, params: SLSSParams): Uint8Array; /** * Serialize SLSS public key * * @param pk - Public key * @returns Serialized bytes */ export declare function slssSerializePublicKey(pk: SLSSPublicKey): Uint8Array; /** * Deserialize SLSS public key * * @param data - Serialized bytes * @returns Public key */ export declare function slssDeserializePublicKey(data: Uint8Array): SLSSPublicKey; //# sourceMappingURL=index.d.ts.map