Repository navigation
Signatures that can abort - #54
Merged
Merged
Conversation
Merged
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.
Prepares the
Signatureinterface for ML-DSA, following whatKEM.leandid for ML-KEM.FIPS 204 signing rejects candidate signatures until one passes its norm checks, so a total signer can only try a bounded number of times, and the old law (
verify (pub sk) m (sign sk m s).1 = truefor every key and state) cannot hold for it. Now:sign : PrivateKey → ByteArray → EStateM SignError State Sig, withSignError.aborted, asencap/decapalready returnEStateM KEMError.verify_sign : ∀ sk m s σ s', sign sk m s = .ok σ s' → verify (pub sk) m σ = true: partial correctness, so an abort is reported instead of returning a signature that does not verify. NoReliablepredicate is needed, because unlike a KEM's decryption failure, an abort is observable.sign_ok, the@[spec]Hoare triple, asgenerate_okis for KEMs. The twoEStateMtriple lemmas move fromKEM.leantoCryptlib/Util/Triple.leanso both interfaces share them.Ed25519Verify.nativeSignature_signandEd25519Blinded.signature_signstatesign sk m s = .ok (signNative sk m) s.Combiner(viaEStateMversions ofsliftL/sliftR, withsliftL_ok/sliftR_ok),Blindable.verify_blindedand theCheck.leanexamples follow.make test(all suites pass),make axioms.