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

Fix construction of stand-alone public keys #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pdh11
Copy link

@pdh11 pdh11 commented Nov 14, 2021

The PublicKey "from" implementations didn't reverse the "encode"
operation from PublicKey::as_byte, and so a stand-alone PublicKey could
not be correctly constructed from bytes. (PublicKeys constructed from
PrivateKeys were fine.)

With this change the RFC8032 test-vectors in rfc8032.rs all pass even
when verifying the signatures using a PublicKey constructed from bytes.

A couple of unit-tests needed updating as not all 57-byte octet
sequences are valid Ed448 public keys (which is correct).

With this change an (unpublished) rust TLS client library can now successfully
connect to a GnuTLS server using ed448-rust signatures for certificates and ECDHE
parameters.

The PublicKey "from" implementations didn't reverse the "encode"
operation from PublicKey::as_byte, and so a stand-alone PublicKey could
not be correctly constructed from bytes. (PublicKeys constructed from
PrivateKeys were fine.)

With this change the RFC8032 test-vectors in rfc8032.rs all pass even
when verifying the signatures using a PublicKey constructed from bytes.

A couple of unit-tests needed updating as not all 57-byte octet
sequences are valid Ed448 public keys (which is correct).
@tglane
Copy link

tglane commented Nov 18, 2023

I would love to see this PR to get merged into master and released as a new version since I really need the public key construction.
Is there a chance this happens in the near future or is this repo dead?

@pdh11 thanks for this PR :)

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.

2 participants