/** * ZKP (Zero-Knowledge Proof) crypto utilities for device bootstrap * Re-exports from infrastructure layer and adds ZKP-specific functionality */ export { getDeviceInfo, buildInfoString, formatAlgorithmString, } from "../infrastructure/crypto/utils"; /** * Generate device fingerprint */ export declare function generateDeviceFingerprint(hds: Uint8Array, bui: string, osType: string): Promise; /** * Convert bytes to base64 */ export declare function toBase64(bytes: Uint8Array): string; /** * Convert bytes to hex string */ export declare function toHex(bytes: Uint8Array): string; /** * Convert base64 to hex string */ export declare function base64ToHex(base64: string): string; /** * Convert base64 to bytes */ export declare function fromBase64(str: string): Uint8Array; /** * Normalize user identifiers (email) to lowercase for consistency. */ export declare function normalizeUserIdentifier(userid: string): string; /** * Generate random bytes */ export declare function randomBytes(length: number): Uint8Array; /** * Detect available algorithm (X25519 or ECDH P-256) */ export declare function detectAlgorithm(): Promise<{ dhAlgorithm: string; dhCurve: string; signAlgorithm: string; algorithmString: string; }>; /** * Generate ZKP crypto materials for device bootstrap (registration flow) */ export interface GeneratedZkpMaterials { keyset: string; hindex: string; uakKeyPair: CryptoKeyPair; sk2: CryptoKey; salt1: Uint8Array; salt2: Uint8Array; combinedprs: Uint8Array; peerPublicKeyJWK: JsonWebKey; ssBits: ArrayBuffer; sk2Bits: ArrayBuffer; algorithmType: string; iv0: Uint8Array; iv1: Uint8Array; iv2: Uint8Array; } export declare function generateZkpMaterials(userid: string, domain: string): Promise; /** * Sign a base64-encoded challenge for ZKP. */ export declare function signZkpChallenge(privateKey: CryptoKey, challengeB64: string, domain: string): Promise<{ signature: string; mapp: string; }>;