This directory contains a minimal example for how to use mlkem-native as a code package, with a custom FIPS-202 implementation. We use tiny_sha31 as an example.
An application using mlkem-native with a custom FIPS-202 implementation needs the following:
- Arithmetic part of the mlkem-native source tree:
mlkem/src/ - A secure pseudo random number generator, implementing
randombytes.h. - A custom FIPS-202 with
fips202.handfips202x4.hheaders compatible withmlkem/src/fips202/fips202.handmlkem/src/fips202/fips202x4.h. - The application source code
WARNING: The randombytes() implementation used here is for TESTING ONLY. You MUST NOT use this implementation
outside of testing.
Build this example with make build, run with make run.
Footnotes
-
Markku-Juhani O. Saarinen: tiny_sha3, https://github.com/mjosaarinen/tiny_sha3 ↩