MlKem768X25519 tagged encryption#226
Draft
dlubawy wants to merge 9 commits intostr4d:mainfrom
Draft
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.
This could close #217 and builds off #215 and mostly #221 to add support of a new mlkem768x25519tag identity. I went a different route from #215 and decided to store the kem seed in the YubiKey undefined data tag slots . Reason for doing so was to keep support of using YubiKey attestation certificates for the x25519 keys instead of self-signed (since x25519 keys can't sign). The benefit of doing this is that it makes importing existing native keys easier as one can use ykman or other tools to import their kem seed (ex:
ykman piv objects import 5f0000 ./my-key). Downside may be that it's unclear what other users' PIV applications may do to these slots too, but I figure we have 6 million slots to choose from if the first 20 are commonly used.I modified the reference age implementation in golang to add tagpq support there and have done some simple tests to confirm that the recipients generated by this code can be encrypted by another binary and then decrypted using this code and the yubikey. I haven't tested it much more than that though, so a good review would be appreciated.