/** * Output of an ECIES-SECP256K1 encryption operation. */ export type EciesSecp256k1EncryptionOutput = { /** The AES-GCM initialization vector. */ initializationVector: Uint8Array; /** The ephemeral secp256k1 public key (compressed, 33 bytes). */ ephemeralPublicKey: Uint8Array; /** The encrypted data. */ ciphertext: Uint8Array; /** The AES-GCM authentication tag (16 bytes). */ messageAuthenticationCode: Uint8Array; }; /** * Input required for ECIES-SECP256K1 decryption. */ export type EciesSecp256k1EncryptionInput = EciesSecp256k1EncryptionOutput & { /** The recipient's secp256k1 private key (raw 32 bytes). */ privateKey: Uint8Array; }; /** * Browser-compatible ECIES (Elliptic Curve Integrated Encryption Scheme) using secp256k1. * * Wire-format compatible with `eciesjs` v0.4.x configured with * `isEphemeralKeyCompressed: true, isHkdfKeyCompressed: false` (the default). * * Protocol: * 1. Generate an ephemeral secp256k1 key pair. * 2. ECDH shared secret (uncompressed point). * 3. HKDF-SHA-256 key derivation: `hkdf(sha256, ephemeralPubUncompressed || sharedPointUncompressed)`. * 4. AES-256-GCM encryption with random 16-byte nonce. * * All underlying primitives (`@noble/ciphers`, `@noble/curves`, `@noble/hashes`) * are pure JavaScript and work in Node, Bun, and browsers. */ export declare class EciesSecp256k1 { /** * Encrypt plaintext for a given secp256k1 public key. * @param publicKeyBytes - Recipient's public key (compressed 33 bytes or uncompressed 65 bytes). * @param plaintext - The data to encrypt. */ static encrypt(publicKeyBytes: Uint8Array, plaintext: Uint8Array): EciesSecp256k1EncryptionOutput; /** * Decrypt ciphertext produced by {@link EciesSecp256k1.encrypt}. * @param input - The encryption output plus the recipient's private key. */ static decrypt(input: EciesSecp256k1EncryptionInput): Uint8Array; /** * Whether the ephemeral public key is compressed (always true for this implementation). */ static get isEphemeralKeyCompressed(): boolean; } //# sourceMappingURL=ecies-secp256k1.d.ts.map