Function hpkeUnwrapDk

  • Unwrap the DK with the recipient's private key. Fails if the key is not the addressee's or the AAD diverges. Mirrors the HPKE step of open_field.

    Parameters

    • recipientPrivkey: Uint8Array
    • enc: Uint8Array
    • wrappedDk: Uint8Array
    • aad: Uint8Array

    Returns Promise<Uint8Array<ArrayBufferLike>>