Encrypt plaintext to a recipient using both X25519 and ML-KEM-768.
The sender encapsulates to both keys with the library's v2 hybrid KEM
(see modern/hybrid-combiner.ts), which binds both ciphertexts and both
public keys, and derives the encryption key from its secret with the
label crypto-service/sealed-box/v2. openPQ also opens boxes
sealed before, whose key bound only the ephemeral key.
Output format:
ephemeral_x25519_pub (32 B) || ml_kem_ciphertext (1088 B) ||
nonce (24 B) || ciphertext || tag (16 B)
Encrypt
plaintextto a recipient using both X25519 and ML-KEM-768.The sender encapsulates to both keys with the library's v2 hybrid KEM (see modern/hybrid-combiner.ts), which binds both ciphertexts and both public keys, and derives the encryption key from its secret with the label
crypto-service/sealed-box/v2. openPQ also opens boxes sealed before, whose key bound only the ephemeral key.Output format: ephemeral_x25519_pub (32 B) || ml_kem_ciphertext (1088 B) || nonce (24 B) || ciphertext || tag (16 B)