Repository navigation
Conversation
A receipt can already carry an ML-DSA-65 signature (lattices). This adds an optional `slh` block signed with SLH-DSA-SHA2-128s (FIPS 205), which rests only on SHA-256, over the same nirium-audit-v1 statement. If one family of math breaks, the other still holds. The 32-byte public key is registered as-is on the payer's account (manage_data nirium-slh-v1), with the same first-key-only rule as pq. The Horizon lookup is shared with pq.ts; pq behaviour is unchanged. Off-chain check only: CAP-87 (Protocol 30) verifies ML-DSA, not SLH-DSA. Node and CLI support come in separate PRs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A receipt can already carry
pq, an ML-DSA-65 signature (lattice-based, FIPS 204). This adds an optionalslhblock: SLH-DSA-SHA2-128s (FIPS 205), whose security rests only on SHA-256. Both sign the samenirium-audit-v1:<content_sha256>statement asagent, so if a weakness ever shows up in one family of math, the other signature still holds.What's in it:
slhKeygen()(48-byte seed),attestSlh(),verifySlh()slhKeyRegistrationOperation(): the public key is only 32 bytes, somanage_data nirium-slh-v1holds the key itself, not a hashcheckSlhKeyRegistration()/findFirstSlhKeyRegistration(): same "only the first key the account registered counts" rule aspqpq-registry.ts(not exported) and is shared withpq.ts;pqbehaviour and its tests are unchangedLimits, on purpose:
verify_sig_ml_dsa_{44,65,87}and nothing for SLH-DSA, so there is no contract for this one.@noble/post-quantum0.7.1, already a dependency.nirium-clidon't readslhyet; those are separate PRs. No version bump, nothing published.Tests:
npm run build && npm testinpackages/sdk: jest 108/108, node:test 199/199. Newtest/pq-slh.test.tscovers sizes, same statement asagent/pq, changed record, flipped bits at the start/middle/end of the signature, another key, an ML-DSA block in the wrong field, malformed input, the registration op, first-key-only, and thatslhandpqregistrations are separate entries.🤖 Generated with Claude Code