-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Custom elliptic curve example #1012
Conversation
I just realized that with the current code at 24daab5 we can't convert from jwk.Key to raw key back, especially when we are reusing one of the pre-existing keys. In order to make the round-trip work, we need to be able to inject custom heuristics code in the Raw() method of each object. |
I think this is ready minus some documentation fixes and possible ironing out of some details (TODO: apply same fixes to OKP, RSA, and symmetric keys) |
I don't like the naming. Perhaps JR -> Export, RJ -> Import |
Remove Raw() from keys, and implement jwk.Export
For the record, at this point I think at least 80% of the code works. I'm still missing tests/checks for OKP keys. |
Alright, it's about time. Going to merge to develop/v3 |
* Add an example adding new EC algo and key type * Add failing example * Kind of fix, but still need to review spec * Appease linter * Add more context for debugging * fix directive * See if bumping go version to 1.21 only makes a difference * fix one more * Rename RJ/JR to Import/Export * fix usage * docs * oops, add missing file * Streamline exporting from jwk.Key to raw key Remove Raw() from keys, and implement jwk.Export * fix typo * appease linter * fix type detection for symmetric keys * rework OKP tests so that crypto/ecdh keys are tested * fix handling of x25519 keys * tweak * tweak docs * gofmt
* Add an example adding new EC algo and key type * Add failing example * Kind of fix, but still need to review spec * Appease linter * Add more context for debugging * fix directive * See if bumping go version to 1.21 only makes a difference * fix one more * Rename RJ/JR to Import/Export * fix usage * docs * oops, add missing file * Streamline exporting from jwk.Key to raw key Remove Raw() from keys, and implement jwk.Export * fix typo * appease linter * fix type detection for symmetric keys * rework OKP tests so that crypto/ecdh keys are tested * fix handling of x25519 keys * tweak * tweak docs * gofmt
* Add an example adding new EC algo and key type * Add failing example * Kind of fix, but still need to review spec * Appease linter * Add more context for debugging * fix directive * See if bumping go version to 1.21 only makes a difference * fix one more * Rename RJ/JR to Import/Export * fix usage * docs * oops, add missing file * Streamline exporting from jwk.Key to raw key Remove Raw() from keys, and implement jwk.Export * fix typo * appease linter * fix type detection for symmetric keys * rework OKP tests so that crypto/ecdh keys are tested * fix handling of x25519 keys * tweak * tweak docs * gofmt
* Add an example adding new EC algo and key type * Add failing example * Kind of fix, but still need to review spec * Appease linter * Add more context for debugging * fix directive * See if bumping go version to 1.21 only makes a difference * fix one more * Rename RJ/JR to Import/Export * fix usage * docs * oops, add missing file * Streamline exporting from jwk.Key to raw key Remove Raw() from keys, and implement jwk.Export * fix typo * appease linter * fix type detection for symmetric keys * rework OKP tests so that crypto/ecdh keys are tested * fix handling of x25519 keys * tweak * tweak docs * gofmt
* Add an example adding new EC algo and key type * Add failing example * Kind of fix, but still need to review spec * Appease linter * Add more context for debugging * fix directive * See if bumping go version to 1.21 only makes a difference * fix one more * Rename RJ/JR to Import/Export * fix usage * docs * oops, add missing file * Streamline exporting from jwk.Key to raw key Remove Raw() from keys, and implement jwk.Export * fix typo * appease linter * fix type detection for symmetric keys * rework OKP tests so that crypto/ecdh keys are tested * fix handling of x25519 keys * tweak * tweak docs * gofmt
No description provided.