Repository navigation
feat: support ML-DSA signature algorithms - #529
Draft
CommanderTvis wants to merge 1 commit into
Draft
CommanderTvis wants to merge 1 commit into
CommanderTvis wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Refs #528. Draft until cedarcode/cose-ruby#90 is merged and released, since the ML-DSA specs need it.
Changes
AttestationStatement::Base#matching_public_key?compares DER encodings withto_der, whichOpenSSL::PKey::PKeyobjects other than EC/RSA (e.g. ML-DSA) don't have. It now falls back topublic_to_der. This also fixes aNoMethodErrorforandroid-key/appleattestation with such keys.FakeAuthenticatorcan build an ML-DSA credential public key, whencosesupports it.README.mdmentionsconfig.algorithms << "ML-DSA-65". Defaults are unchanged.CHANGELOG.mdentry under Unreleased.Tests:
android_key_spec.rbgets an ML-DSA-65 context (valid signature, and a signature from another key). They are skipped when OpenSSL < 3.5 orcosehas noCOSE::Key::AKP, so CI stays green before thecoserelease. Without thelib/changes, the two new specs fail against thecosebranch of #90.Checks: with
cosefrom #90 on OpenSSL 3.5,bundle exec rspecgives 534 examples, 0 failures; with the releasedcose1.4.0 it's 534 examples, 0 failures, 2 pending (the ML-DSA ones).rubocopreports no offenses. I also ran real ES256, RS256, PS256, ML-DSA-65 and ML-DSA-87android-keyregistrations and assertions through the publicCredentialAPI, and all pass with the change. I haven't run the older Ruby/OpenSSL combinations in the CI matrix.