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 Key Pair Generator #221

Closed
Tracked by #214
paullatzelsperger opened this issue Jan 16, 2024 · 0 comments · Fixed by #222
Closed
Tracked by #214

Implement Key Pair Generator #221

paullatzelsperger opened this issue Jan 16, 2024 · 0 comments · Fixed by #222
Assignees
Labels
enhancement New feature or request

Comments

@paullatzelsperger
Copy link
Member

paullatzelsperger commented Jan 16, 2024

Implement a KeyPairGenerator, that can create KeyPair objects from generator parameters specified in a JSON structure (not JWK!). Depending on which keys are to be generated, this JSON structure must hold the appropriate values.

As a first step, we will support: RSA, EC and Ed25519 (EdDSA) keys:

{
   "algorithm": "EC | RSA | EdDSA",
   "properties": [
       "length": 2048 
       "curve": "OIDname or stdname for EC and EdDSA"
   ]
}
  • The curve field must be the std name, not the OIDs or any other aliases, e.g. "secp256r1", not "1.2.840.10045.3.1.7" or "NIST-P256" for NIST-P256. Must be one of ["Ed25519", "X25519"] for EdDSA keys (no other curves supported).
  • if algorithm is "EC", but no curve is specified, then a "secp256r1" is generated.
  • The length field is only relevant for RSA keys and defaults to 2048.
  • if the algorithm field is null or empty, all properties are ignored and an Ed25519 key is generated.

NB: this class will initially be created in IH, but may get upstreamed later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant