package mlkemtest
import "crypto/mlkem/mlkemtest"
Package mlkemtest provides testing functions for the ML-KEM algorithm.
Index ¶
- func Encapsulate1024(ek *mlkem.EncapsulationKey1024, random []byte) (sharedKey, ciphertext []byte, err error)
- func Encapsulate768(ek *mlkem.EncapsulationKey768, random []byte) (sharedKey, ciphertext []byte, err error)
Functions ¶
func Encapsulate1024 ¶
func Encapsulate1024(ek *mlkem.EncapsulationKey1024, random []byte) (sharedKey, ciphertext []byte, err error)
Encapsulate1024 implements derandomized ML-KEM-1024 encapsulation (ML-KEM.Encaps_internal from FIPS 203) using the provided encapsulation key ek and 32 bytes of randomness.
It must only be used for known-answer tests.
func Encapsulate768 ¶
func Encapsulate768(ek *mlkem.EncapsulationKey768, random []byte) (sharedKey, ciphertext []byte, err error)
Encapsulate768 implements derandomized ML-KEM-768 encapsulation (ML-KEM.Encaps_internal from FIPS 203) using the provided encapsulation key ek and 32 bytes of randomness.
It must only be used for known-answer tests.
Source Files ¶
- Version
- v1.26.0-rc.3
- Published
- Feb 3, 2026
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 25 seconds ago –
Tools for package owners.