-
Notifications
You must be signed in to change notification settings - Fork 50
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
Change keytype for newly generated ecdsa keys #513
Comments
cc @rdimitrov |
This still leads me to wonder what the practical advantage of changing this key type name was. I understand that some people think keytypes are unneeded (and scheme should fully define the type/scheme)... but why keep making changes to key type then? |
I'm still convinced that this is a specification bug. "ecdsa-sha2-nistp256" is not a key type. At least the hash algorithm is only relevant for signing. Unless we define "key type" as the information needed for signing/verifying. But then why have key type and scheme? My preferred fix would be to deprecate the key type field altogether. We really only need scheme. Practical advantage is less ambiguity (in a very complex specification) and less data on the wire (granted, not that important). I agree that changing key type of "ecdsa-sha2-nistp*" keys to ecdsa in securesystemslib alone is not a big win, and more likely an interoperability problem. |
oh yeah, you are right and I was confused (I thought the spec had changed):
|
The way I read the spec, it also kind of offloads the definition of key types to the reference implementation. |
Sure, spec defines three keytypes and allows all implementers to define new ones. Using those implementation-defined keys is totally fine if interoperability is not a goal. The issue is that a python-tuf repository user who decides to create ecdsa keys probably assumes they would be spec defined ecdsa keys... but they are not, they are implementation-defined keys. So the repository ends up spec compliant but likely not interoperable |
I agree that this is a specification bug. I have created a PR theupdateframework/specification#272 to capture what appears to be the specs current intent and document the keytype as "ecdsa". I've also added key formats to the agenda for the TUF project meeting at KubeCon EU. |
theupdateframework/specification#272 has been merged. @jku, can we close here? |
👍 |
Current behavior:
generate_ecdsa_key()
creates keys with keytype 'ecdsa'Expected behavior:
Considering that the TUF spec defines the a "ecdsa-sha2-nistp256" keytype and not a "ecdsa" one we should probably use the more specific keytypes instead?
This should be an easy non-breaking change: set the keytype in generate_ecdsa_key() to "ecdsa-sha2-nistp256" or "ecdsa-sha2-nistp384" based on the scheme.
The text was updated successfully, but these errors were encountered: