/** * Noise Protocol Implementation for TOSS * Per Section 5: "Transport reliability is explicitly not trusted. * All security guarantees enforced at the cryptographic layer." * * GAP #4 FIX: Full Noise Protocol session lifecycle */ /** * Noise session state */ export interface NoiseSession { peerId: string; sessionKey: Uint8Array; encryptionCipher: any; decryptionCipher: any; createdAt: number; expiresAt: number; initiator: boolean; } /** * Initialize Noise secure session with a static key. * @deprecated Use performNoiseHandshake instead */ export declare function initNoiseSession(staticKey: Uint8Array): (components: import("@chainsafe/libp2p-noise").NoiseComponents) => import("@libp2p/interface").ConnectionEncrypter; /** * GAP #4 FIX: Generate static keypair for long-term identity */ export declare function generateNoiseStaticKey(): { publicKey: Uint8Array; secretKey: Uint8Array; }; /** * GAP #4 FIX: Perform Noise Protocol handshake * Implements NN (no-pre-shared-knowledge) pattern for TOSS */ /** * Perform Noise Protocol handshake between two peers * Establishes encrypted session for device-to-device communication * * Security: Uses X25519 ECDH for key agreement, ChaCha20-Poly1305 for AEAD */ export declare function performNoiseHandshake(peerId: string, peerStaticKey: Uint8Array, _localStaticKey: Uint8Array, _localSecretKey: Uint8Array, initiator: boolean): Promise; /** * GAP #4 FIX: Encrypt message with Noise session */ export declare function noiseEncrypt(session: NoiseSession, plaintext: Uint8Array): Promise; /** * GAP #4 FIX: Decrypt message with Noise session */ export declare function noiseDecrypt(session: NoiseSession, ciphertext: Uint8Array): Promise; /** * GAP #4 FIX: Get active session or return null */ export declare function getNoiseSession(peerId: string): NoiseSession | null; /** * GAP #4 FIX: Rotate session key for forward secrecy */ export declare function rotateNoiseSessionKey(session: NoiseSession): Promise; /** * GAP #4 FIX: Cleanup expired sessions */ export declare function cleanupExpiredNoiseSessions(): number; /** * GAP #4 FIX: Get all active sessions */ export declare function getActiveNoiseSessions(): NoiseSession[]; //# sourceMappingURL=noise.d.ts.map