open method

Uint8List open({
  1. required Uint8List sessionKey,
  2. required Uint8List msgToOpen,
  3. required Uint8List msgToAuth,
  4. required Uint8List domain,
})

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).

Note: X-Wing uses Base mode (no sender authentication). The sender's identity cannot be verified from the ciphertext alone.

  • sessionKey: The 1120-byte encapsulated session key from PublicKey.seal
  • msgToOpen: The ciphertext to decrypt
  • msgToAuth: Additional authenticated data (must match what was used in seal)
  • domain: Application-specific domain separator

Implementation

Uint8List open({
  required Uint8List sessionKey,
  required Uint8List msgToOpen,
  required Uint8List msgToAuth,
  required Uint8List domain,
}) => _inner.open(
  sessionKey: sessionKey,
  msgToOpen: msgToOpen,
  msgToAuth: msgToAuth,
  domain: domain,
);