Reconsider keyid "compliance"
See original GitHub issueMetadata API currently does not validate that keyid is a hex digest of the keys canonical form, we also do not test for this.
I maintain that this is fine from a security perspective: being able to calculate keyid from key value brings us no value that I can see, just more complicated code. See also https://github.com/theupdateframework/taps/blob/master/tap12.md
However, as shown in https://github.com/theupdateframework/go-tuf/pull/228 go-tuf client does seem to check that keyids are as specified and arguably they are spec compliant in doing so. So let’s reconsider: should we try to ensure that this creates keys with keyids that fulfill the requirements:
sslib_key = generate_ed25519_key()
key = Key.from_securesystemslib_key(sslib_key)
I assume that last call removes some unused fields from the key structure to make the metadata cleaner… and that probably makes the key not hash correctly.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Right, so I suppose the result is then:
Closing as WONTFIX
For reference: https://github.com/secure-systems-lab/securesystemslib/issues/308 summarizes securesystemslib/TUF/in-toto public key formats and points out issues/inconsistencies, such as the ambiguously defined “private” field you mention. It also suggests to “better decouple default keyids from keys, to allow the use of custom keyids, but with a canonical json computed keyid as fallback”