package mlkem
Module Mlkem_for_testingSource
Deterministic FIPS 203 entry points for known-answer testing only.
This library exposes test entropy and expanded decapsulation keys. It must not be used by production protocols. Use the corresponding module from Mlkem instead.
Internal hash entry points exposed for primitive known-answer tests.
The comparison behind implicit rejection: 1 if the two strings are equal, 0 otherwise, including when their lengths differ.
Source
val encapsulate_512 :
encapsulation_key:string ->
randomness:string ->
(string * string, Mlkem.Mlkem512.error) resultSource
val decapsulate_512 :
expanded_decapsulation_key:string ->
ciphertext:string ->
(string, Mlkem.Mlkem512.error) resultReturns (expanded_decapsulation_key, encapsulation_key). Both d and z must be 32 bytes.
Source
val encapsulate_768 :
encapsulation_key:string ->
randomness:string ->
(string * string, Mlkem.Mlkem768.error) resultReturns (ciphertext, shared_secret) using the supplied 32-byte test randomness.
Source
val decapsulate_768 :
expanded_decapsulation_key:string ->
ciphertext:string ->
(string, Mlkem.Mlkem768.error) resultDecapsulates an ACVP-format 2400-byte key.
Source
val encapsulate_1024 :
encapsulation_key:string ->
randomness:string ->
(string * string, Mlkem.Mlkem1024.error) resultSource
val decapsulate_1024 :
expanded_decapsulation_key:string ->
ciphertext:string ->
(string, Mlkem.Mlkem1024.error) result