Skip to content

ssh_key::Signature doesn't round-trip through Signature trait #5

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

Closed
programmerjake opened this issue Jun 17, 2022 · 3 comments
Closed

Comments

@programmerjake
Copy link

Afaict the Signature::from_bytes method expects a algorithm type string as a prefix, but Signature::as_bytes doesn't return the algorithm type string as a prefix.

@tarcieri
Copy link
Member

To make this work the internal data field would need to be changed to store the entire serialized signature, including the algorithm prefix, with a separate helper method to access the signature data sans prefix.

@tarcieri tarcieri transferred this issue from RustCrypto/formats Sep 25, 2022
@tarcieri
Copy link
Member

I've opened a PR for a prospective signature v2.0 which separates a signature type from its serialization:

RustCrypto/traits#1141

Rather than fix this issue for the signature v1.0 API, I think it would be best to hold off on changes until the new signature API is available, where this issue will effectively be automatically addressed by the new API.

@tarcieri
Copy link
Member

baloo pushed a commit to baloo/SSH that referenced this issue Apr 16, 2024
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

No branches or pull requests

2 participants