Repository navigation
Build ML-KEM's Inhabited dummies from zero bytes, not keygen - #60
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FIPS203.dummyPk,dummySkanddummyCtwere made by running ML-KEM keygen and encapsulation on a zero seed. They are only theInhabitedwitnesses in each scheme'sKEMrecord, but the records are top-level values, so every executable importingKEM.Schemesran keygen and encaps for all six ML-KEM variants (plain and hedged, 512/768/1024) when it started. In huh,initialize_cryptlib_Cryptlib_Primitives_KEM_Schemeswas 83% of startup.The dummies are now zero bytes of the sizes the subtypes require, built with
bytesT/bytesU/bytesV; the size proofs are bysimp. Nothing used their values.huh --help(process start)huh 127.0.0.1 trueover TCPhuh 127.0.0.1 trueover QUICmake testpasses, including the ML-KEM and hedged ML-KEM vectors.Not changed:
KEM.Adapter.kemOfNikestill derives its default public key withderivePublicKeyon a zero seed (an X25519 scalar multiplication for the X25519 KEMs).