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

OpenPGP v6 elliptic curve key formats #1411

Closed
wants to merge 6 commits into from

Conversation

vanitasvitae
Copy link
Contributor

@vanitasvitae vanitasvitae commented Jun 2, 2023

This PR adds support for parsing new OpenPGP v6 key algorithms X25519, X448, Ed25519, Ed448.

Note, that while some of these algorithms were already sort of supported in OpenPGP v4 (EDDSA_LEGACY), v6 properly introduces them with a changed encoding wire format: https://openpgp-wg.gitlab.io/rfc4880bis/#name-public-key-algorithms

To prevent duplicated code, I also introduced OctetArrayPublicBCPGKey and OctetArraySecretBCPGKey classes, which handle the byte array length enforcing etc.

@vanitasvitae vanitasvitae changed the title OpenPGP v6 key formats OpenPGP v6 elliptic curve key formats Jun 2, 2023
@vanitasvitae
Copy link
Contributor Author

I split this PR out of #1353 for better readability.

@dghgit
Copy link
Contributor

dghgit commented Jun 6, 2023

Thanks for the patch! Now merged.

One minor revision, in the interests of economy I ended up unifying the OctetArray base classes. If there's a need to separate secret and public at this level we can always introduce it later, but for now it doesn't seem needed/

@dghgit dghgit closed this Jun 6, 2023
@vanitasvitae vanitasvitae deleted the v6keyFormats branch June 6, 2023 08:34
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Jun 6, 2023
vanitasvitae pushed a commit to pgpainless/bc-java that referenced this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants