Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

mattcaswell
Copy link
Member

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.

@mattcaswell mattcaswell added the branch: master Merge to master branch label Mar 6, 2020
@slontis
Copy link
Member

slontis commented Mar 7, 2020

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.
@mattcaswell mattcaswell changed the title WIP: Implement Serializers for Ed25519 and Ed448 Implement Serializers for Ed25519 and Ed448 Mar 9, 2020
@mattcaswell
Copy link
Member Author

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.

@slontis
Copy link
Member

slontis commented Mar 9, 2020

1 travis error left - probably related to no-ec
LGTM otherwise.

@mattcaswell
Copy link
Member Author

Fixup pushed to address the travis failure.

@slontis slontis added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Mar 14, 2020
@slontis slontis self-assigned this Mar 17, 2020
@paulidale
Copy link
Contributor

A quick push of this after the defrosting of the repo would be nice.
The keygen is semi-dependent.

@slontis
Copy link
Member

slontis commented Mar 17, 2020

will try merging this again now..

openssl-machine pushed a commit that referenced this pull request Mar 17, 2020
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)
@slontis
Copy link
Member

slontis commented Mar 17, 2020

Merged to master.

@slontis slontis closed this Mar 17, 2020
@mattcaswell
Copy link
Member Author

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 \
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants