Repository navigation
feat(s143): the ML-DSA-87 boot check by role - #139
Merged
Merged
Conversation
… verifier check on every node, the signer check without a fresh key, the FIPS provider's identity on nss) Signed-off-by: Ayla Croft <aylacroft@proton.me>
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.
Slice 143. Trinity's ML-DSA-87 check at boot is now chosen by role.
nssprofile a node refuses to start unless FIPS mode is on and its FIPS provider reports the build string of the validated module.What it does
The verifier check (
Trinity.Crypto.Preflight.verifier/1) runs at boot in every release and profile, right after the toolchain floor. Each case must give exactly its expected answer:A verifier that says true to everything fails at the first negative. The cases and their measured answers are in
priv/kat/mldsa87_boot_check.json; the vectors are trimmed from the same pinned commits as slice 137's and carry their source and SHA-256.What refuses a boot (
Trinity.Crypto.BootCheck):nss: FIPS mode not enabled, no FIPS provider, a provider whose build string is not "3.6.0-r4", or a runtime that cannot run the check. Each is named.Elsewhere, a runtime without ML-DSA-87 boots and the boot receipt says
unavailable.The build string is the one the validated module's security policy names. This is the node checking itself, not the operator check the policy describes, and it is never cited as one. The policy also names the provider's name, which cannot be checked: OTP's
crypto:info/0does not expose it.The signer check (
Trinity.Crypto.Preflight.signer/1) replaces slice 137's six steps where receipts sign with ML-DSA-87:No key is generated: the provider's own self-tests cover generation, and a key made at boot cannot be wiped from the BEAM's memory.
The boot receipt records
mldsa87_verifierand, where it ran,mldsa87_signer. The check runs once per boot, where slice 137 ran its steps, a fresh key included, each time the boot receipt was written.Neither check is FIPS evidence. Self-tests are the module's duty. Outside the approved mode the provider owes none, so on
commercialand on development runtimes this is the only ML-DSA-87 test that runs.Evidence
mainbefore the change, a node whose verifier answers a published case wrongly booted. On this branch it refuses, naming the case.:crypto. On OTP 28.5.0.8 with OpenSSL 3.5.9 every case gives its expected answer and the signer check passes, run locally. On the gate's OpenSSL 3.0.13 the check isunavailableand acommercialnode boots.nssrefuse by mode on runtimes outside FIPS mode, and by build string in FIPS mode (thefipsjob). The pass onnssneeds the validated module's provider, which no CI image carries. It is shown by the decision's own tests, anddocs/fips-leg.mdrecords the gap.CI
The
fipsjob's mode-off ML-DSA-87 step also runstest/trinity/crypto/boot_check_test.exsandtest/trinity/crypto/boot_check_node_test.exs.Not in this PR