-
Notifications
You must be signed in to change notification settings - Fork 58
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
Added a new ecdsa key that uses the new type ecdsa
.
#755
Conversation
In the TUF spec v1.0.32 (released 2023-03-02) the key type was updated for ecdsa keys from `ecdsa-sha2-nistp256`. This PR introduces the new type and keeps support for the older key type. Signed-off-by: Fredrik Skogman <[email protected]>
From the Sigstore community, thanks so much for this PR. We use awslabs/tough in our Rust client, so getting this merged in will help unblock Sigstore users. |
👍 I think the code uses the Key struct when canonicalizing the signed content: my suggestion would then be wrong (as you must have the original keytype in the canonicalized content). I'm sure there is a way to store the original keytype and use that when serialising even if using a single struct but I'm not sure it would be simpler than your suggestion |
Signed-off-by: Fredrik Skogman <[email protected]>
Some local testing with the soon to be deployed TUF root for sigstore kommendorkapten@m1m14:~/git/tough % ./target/debug/tuftool download out --root ~/git/root-signing/repository/repository/5.root.json -t http://localhost:8081/targets -m http://localhost:8081
Downloading targets to "out"
-> fulcio_v1.crt.pem
-> trusted_root.json
-> fulcio_intermediate_v1.crt.pem
-> artifact.pub
-> rekor.pub
-> ctfe.pub
-> ctfe_2022.pub
-> fulcio.crt.pem
kommendorkapten@m1m14:~/git/tough % git status
On branch new-ecdsa-key-type Switching to default branch:
|
@webern Would you be able to take a look at this? Thanks! |
I don't quite understand. Is the issue that Serde does have Thanks. |
Yes. client should should accept both for backwards compat but "ecdsa" is considered correct.
Agreed: alias would work except if the serialized form is used for anything (because the canonicalized form would then be different and so signatures wouldn't match). |
Another data point here we're hitting this in the https://github.com/bpfman/bpfman via sigstore/sigstore-rs#338 and it's currently a build blocker for us at |
Thanks all! |
In the TUF spec v1.0.32 (released 2023-03-02) the key type was updated for ecdsa keys from
ecdsa-sha2-nistp256
.This PR introduces the new type and keeps support for the older key type.
Issue #, if available: #754
Description of changes:
In the TUF spec v1.0.32 (released 2023-03-02) the key type was updated for ecdsa keys from
ecdsa-sha2-nistp256
.This PR introduces the new type and keeps support for the older key type.
I first tried with
#[serde(alias = "ecdsa-sha2-nistp256")]
as proposed by @jku but I never got it to work.