-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Serializers for Ed25519 and Ed448 #11272
Conversation
Looks like a fairly simple change in the last 2 commits. (tests need some fixing - but it looks almost there) |
This is largely based on the existing X25519 and X448 serializers - but a few adjustments were necessary so that we can identify what type of key we are using. Previously we used the keylen for this but X25519 and ED25519 have the same keylen.
We build on the existing X25519 and X448 serializer tests.
53d62ee
to
ed413e8
Compare
Now that #11261 has gone in I've rebased this, and fixed the travis issues. This is now ready to review - please take a look. |
1 travis error left - probably related to no-ec |
Fixup pushed to address the travis failure. |
A quick push of this after the defrosting of the repo would be nice. |
will try merging this again now.. |
This is largely based on the existing X25519 and X448 serializers - but a few adjustments were necessary so that we can identify what type of key we are using. Previously we used the keylen for this but X25519 and ED25519 have the same keylen. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from #11272)
Merged to master. |
Thanks for merging this @slontis |
#define KEYNID2TYPE(id) \ | ||
(IS25519(id) ? ECX_KEY_TYPE_X25519 \ | ||
: ((id) == EVP_PKEY_X448 ? ECX_KEY_TYPE_X448 \ | ||
: ((id) == EVP_PKEY_ED25519 ? ECX_KEY_TYPE_ED25519 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the first IS25519
going to catch both x25519 and ed25519? I'm not sure how this last EVP_PKEY_ED25519
check is going to do anything.
This adds the serializers and associated tests for the Ed25519 and Ed448 algorithms. The docs were already done when the X25519/X448 serializers were added since the interface is the same.
This is WIP because it depends on and includes the commits from #11261. Aside from that it is complete.