-
Notifications
You must be signed in to change notification settings - Fork 275
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
Allow Repositories to Specify Hash Algorithm #272
Comments
As opposed to allowing one to use different hash algorithms for different I think the intent is that both of the above cases should be supported by We do need to clearly describe what clients should do when encountering a On Fri, May 1, 2015 at 10:46 AM, Vladimir Diaz notifications@github.com
|
For the generation of KEYIDS and path hash prefixes, the specification restricts the hash algorithm to SHA-256. I think we should be more flexible in this case. |
Are you proposing we would list the hash algorithm there too? On Fri, May 1, 2015 at 1:59 PM, Vladimir Diaz notifications@github.com
|
I'm not sure yet where we should list the hash algorithm used to generate path hash prefixes and the digest prepended to consistent snapshots. I think listing the algorithm in |
For KEYIDS, I think saying that SHA-256 is an option should be fine. |
Yes, the root.json seems like the most logical thing to me too. On Fri, May 1, 2015 at 2:47 PM, Vladimir Diaz notifications@github.com
|
We now allow metadata to specify the hash algorithm(s) that are used to generate keyids. metadata example... |
Hello Vlad, On 28 October 2016 at 12:53, Vladimir Diaz notifications@github.com wrote:
I've a question! I never understood that example. There seems to be one Thanks, |
That's correct, one keyid is listed in metadata (along with 1 or more hashing algorithms). The keyid(s) are generated by hashing a key object: {"keytype": "ed25519",
"keyval": {
"public": "0692a846935833d685168ae8c98fee951d52d8aa76685b8ba55b8e1eada217c2"} Let's look at an example... The client first extracts the key object on lines 18-20 and generates SHA256 and SHA512 digests (because that's what's specified on lines 14-16). It should then verify that the default keyid listed on line 13 matches the digest the client generated locally. If it does, the client associates this key with the SHA256 and SHA512 digests that it generated. In the future, the client can lookup a key and validate signatures by querying for either of these two KEYIDs. Either the SHA256 or SHA512 keyid can be listed in signatures fields, or the "keyids" field of delegations. The client can identify a keyid and its associated key by calling tuf.keydb.get_key(keyid). If it finds it... good. If not, that keyid / key / signature is not trusted. |
Ah, I see. So it's about options. As long as one expected keyid is in
there, good. Thanks!
|
We should consider allowing repositories to specify, in metadata, the algorithm used when generating path hashed paths in section 4.5 of the specification
hashes
key of each metadata file. For example, https://github.com/theupdateframework/tuf/blob/develop/examples/repository/metadata/timestamp.json#L15The text was updated successfully, but these errors were encountered: