-
Notifications
You must be signed in to change notification settings - Fork 194
Add PEM/DER APIs for Curve25519 #419
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
Conversation
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.
Can we also add derRepresentation properties to all of these? It's rarely useful to add one without the other.
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.
Shiny, looks good to me. Thanks @ptoffy!
Looks like a few tweaks need to be made. |
Add PEM/DER APIs for Curve25519
Checklist
If you've made changes to
gyb
files./scripts/generate_boilerplate_files_with_gyb.sh
and included updated generated files in a commit of this pull requestMotivation:
Closes #82
Creating Ed25519/X25519 keys using PEM/DER and also generating their PEM/DER representations can be handy
Modifications:
Added
init(pemRepresentation:)
and thepemRepresentation
computed propertyinit(derRepresentation:)
and thederRepresentation
computed propertyto
Curve25519.{Signing,KeyAgreement}.{Private,Public}Key
Result:
Curve25519 can now be created with and can produce PEM/DER representations