HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulemlkem-0.2.3.0Haskell2010

Crypto.PubKey.ML_KEM

Module-Lattice-based Key-Encapsulation Mechanism (ML-KEM), defined in FIPS 203.

  • 7 types
  • 3 classes
  • 8 values
  • Packagemlkem-0.2.3.0
  • Exports18
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceML_KEM.hs
newtypenewtype SharedSecret a
#

A shared secret returned by the encapsulation and decapsulation functions. Length is 32 bytes for all defined parameter sets.

Instances5Decode, Eq, Show, NFData, ByteArrayAccess

Operations

6 declarations

Parameter sets

4 declarations
datadata ML_KEM_512
#

ML-KEM-512 (security category 1)

Instances3Show, ParamSet, K
datadata ML_KEM_768
#

ML-KEM-768 (security category 3)

Instances3Show, ParamSet, K
datadata ML_KEM_1024
#

ML-KEM-1024 (security category 5)

Instances3Show, ParamSet, K

Conversions and checks

4 declarations

Returns the encapsulation key embedded in the given decapsulation key. Note that they may not necessarily match when the decapsulation key was decoded from an untrusted source.