-
Notifications
You must be signed in to change notification settings - Fork 57
feat: Support keys and signatures from memory #581
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
base: main
Are you sure you want to change the base?
Conversation
|
Haven't tested, but it looks great thanks! One other related thing that would be nice is the ability to get the signature as bytes/text rather than having to write it to disk. |
Good idea. Maybe also a Once this is in, I'll push up the second PR |
mihaimaruseac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I like the idea of this, but I'm concerned that we hardcode key lengths in several places, rather than being generic.
I'll do a deeper review, but first I wanted to surface the question on whether we can avoid this anti-pattern
Add support for providing elliptic curve keys and signatures as bytes in the library API. Private/public keys can now be passed as bytes (PEM or compressed format), and signatures can be provided as JSON strings or bytes. All changes are backward compatible. - Signer/Verifier accept keys from bytes or file paths - Public keys support compressed format (33/49/67 bytes) - Signature.read() and verify() accept bytes/strings - Updated documentation and changelog Signed-off-by: SequeI <asiek@redhat.com>
Signed-off-by: SequeI <asiek@redhat.com>
Signed-off-by: SequeI <asiek@redhat.com>
Add support for providing elliptic curve keys and signatures as bytes in the library API. Private/public keys can now be passed as bytes (PEM or compressed format), and signatures can be provided as JSON strings or bytes. All changes are backward compatible.
@makew0rld Please let me know if this is what you had in mind, if anything is missing etc :)
Closes #559
Summary
Checklist