open method
Consumes a standalone cryptographic construct encrypted to this secret key. The method will deconstruct the given encapsulated key and ciphertext and will also verify the authenticity of the (unencrypted) message-to-auth (not included in the ciphertext).
X-Wing is used in HPKE's base mode, which does not authenticate the sender, so the ciphertext alone does not prove who sent it.
sessionKey: The 1120-byte encapsulated session key from PublicKey.sealmsgToOpen: The ciphertext to decryptmsgToAuth: Additional authenticated data (must match what was used in seal)domain: Application domain, the same as the sender's
Throws if sessionKey is not 1120 bytes long, or if decryption fails.
A wrong key, a tampered ciphertext and a mismatched msgToAuth or
domain all fail alike.
Implementation
Uint8List open({
required Uint8List sessionKey,
required Uint8List msgToOpen,
required Uint8List msgToAuth,
required Uint8List domain,
}) => _live.open(
sessionKey: sessionKey,
msgToOpen: msgToOpen,
msgToAuth: msgToAuth,
domain: domain,
);