-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
High Level OpenPGP v6 Key Generation #1857
Conversation
I'm contemplating whether to transform the There are some non-trivial differences between v4 and v6, most notably the fact that v6 stores preferences in a Direct-Key signature, while v4 prefers user-id certification signatures (at least if you want to be compatible to GnuPG). |
911179b
to
96f9e0e
Compare
Ready for review. Let me know if I can make your job easier by squashing or splitting this up into smaller PRs :) |
49b0dc4
to
c17f979
Compare
One thing I dislike about the current API design: An additional issue with the current API is, that I'm not sure, if there is a clean way to refactor the current API, circumsailing these rough edges in a backwards-compatible way. |
@vanitasvitae Thank you for your contribution to this project. Please note that due to compatibility constraints, the existing APIs cannot be modified. I have a few questions about this PR: Are there any relevant standards (e.g., RFC 9580) related to OpenPGPV6KeyGenerator? |
Hey @ligefeiBouncycastle ! I'm aware that breaking changes in the existing API shall be kept to an absolute minimum. Where possible, I try to avoid changing method signatures in favor of adding new alternative methods. I think I succeeded in keeping the existing API intact as should be evident by the unaltered unit tests. The
I decided to place the new classes into The new classes in Let me know if you have any more feedback and ideas on how to further improve this PR :) |
Note: It might make sense to split this PR up into smaller chunks (e.g. separate out all changes to the |
@vanitasvitae Thank you for your response. It would be great if #1911 could be split into smaller, more manageable parts. Please don't forget AEADProtectedPGPSecretKeyTest. reencryptKeyJca() function |
Good call! |
2947743
to
72d6228
Compare
I'm splitting this PR up into two parts, one focussed on changes in |
This PR appears to now be part of the main branch. |
Hey!
In this PR, I'm working on a high-level API for OpenPGP key generation (v6 only for now).
Let me know, what you think of the design sketched out in
OpenPGPV6KeyGenerator
:)I tried to keep the API straight-forward, but still allow modifications of the (hashed) signature subpacket areas by the use of callbacks which the user can hook into, to modify the signature subpackets prior to signature generation.
The PR also adds key generator classes for individual keys, such that the risk of making mistakes during key generation (e.g. using wrong/weak parameters) is minimized.
I used PGPainless as orientation for the API design, but kept the generation API a bit slimmer for now. Let me know what you think of the direction the API is heading.