Skip to main content

Appendix A. Test Vectors

Appendix A. Test Vectors

This section provides test vectors for HPKE using all combinations of mode, KEM, KDF, and AEAD as listed in Sections 9.1, 9.2, and 9.3. Each subsection below contains test vectors for a single combination. For each combination, the test vector contains the following values:

  • mode: The HPKE mode
  • kem_id: The KEM identifier
  • kdf_id: The KDF identifier
  • aead_id: The AEAD identifier
  • info: Application-supplied information
  • ikmE: Input keying material for the ephemeral key pair
  • pkEm: Encapsulated ephemeral public key
  • skEm: Ephemeral secret key
  • ikmR: Input keying material for the recipient key pair
  • pkRm: Recipient public key
  • skRm: Recipient secret key
  • ikmS: Input keying material for the sender key pair (Auth and AuthPSK modes only)
  • pkSm: Sender public key (Auth and AuthPSK modes only)
  • skSm: Sender secret key (Auth and AuthPSK modes only)
  • psk: Pre-shared key (PSK and AuthPSK modes only)
  • psk_id: Pre-shared key identifier (PSK and AuthPSK modes only)
  • enc: Encapsulated key
  • shared_secret: Shared secret computed during KEM operation
  • key_schedule_context: Context used in key schedule
  • secret: Secret derived during key schedule
  • key: Encryption key
  • base_nonce: Base nonce value
  • exporter_secret: Secret for exporter interface

For encryption test vectors, each includes:

  • sequence number: Sequence number for the encryption
  • pt: Plaintext (hex encoded)
  • aad: Additional authenticated data (hex encoded)
  • nonce: Nonce used for encryption
  • ct: Ciphertext (hex encoded)

For exported values, each includes:

  • exporter_context: Context for export operation (hex encoded)
  • L: Length of exported value in bytes
  • exported_value: The exported value (hex encoded)

All values are encoded in hexadecimal format unless otherwise specified.

The subsections are organized as follows: