di-wings
Version:
Aviary Tech's common library for decentralized identity
20 lines • 993 B
TypeScript
/**
* Derives a 256-bit AES-KW key encryption key from a shared secret that
* was derived from an ephemeral and static pair
* of Elliptic Curve Diffie-Hellman keys.
*
* The KDF used is described in RFC 7518. This KDF is referenced by RFC 8037,
* which defines how to perform Curve25519 (X25519) ECDH key agreement.
*
* @param {object} options - The options to use.
* @param {Uint8Array} options.secret - The shared secret (i.e., `Z`) to use.
* @param {Uint8Array} options.producerInfo - An array of application-specific
* bytes describing the consumer (aka the "encrypter" or "sender").
* @param {Uint8Array} options.consumerInfo - An array of application-specific
* bytes describing the producer (aka the "decrypter" or
* "receiver"/"recipient").
*
* @returns {Promise<Uint8Array>} - Resolves to the generated key.
*/
export declare function deriveKey({ secret, producerInfo, consumerInfo }: any): Promise<Uint8Array<ArrayBuffer>>;
//# sourceMappingURL=ecdhkdf.d.ts.map