Skip to content

Conversation

@AndrewScull
Copy link
Contributor

  • Make all Ec2Key and OkpKey classes key pairs to match their definitions, simplify class design and allow easier code reuse.
  • Introduce key generation for the key agreement key subclasses.
  • Provide implementations to get a PublicKey from an OkpKey.
  • Give a way to get just the public part of a key pair in cases where the private part should not be encoded with the key.

Move the private key handling into Ec2Key so that both signing and key
agreement keys can have private keys.
Add a builder method that generates a key pair for the key being built.
Use this from EcSigningKey and Ec2KeyAgreementKey to implement handy key
generation methods.
Move the private key handling into OkpKey so that both signing and key
agreement keys can have a private key.
Provide a method for generating OkpKeyAgreementKey instances and enhance
the builds with a method that populates the fields with a generated key
pair.
Each type of OkpKey overrides the method to provide the appropriate
publick key. If using Java 15 or newer than the standard security
providers are all that a client needs, otherwise a provider will needs
to be installed that can handle these keys.
To enable a keypair to be encoded without exposing the private part,
provide a method to return the same key with just the public
information. This is a no-op if there is not private part to the key.

This also adds methods to the builders that copy the values from an
existing key.
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.

1 participant