Closed jku closed 4 years ago
Ah no: the Updater target file download does use the first hash from targetinfo.hashes list -- this should be blake2b in our case. The hard-coded function _get_target_hash()
seems to actually calculate the hash of the target path in the case of hashed bin delegation.
So this issue is probably invalid
So testing this in my mock warehouse: this seems to work... however, the hash seems suspiciously long (128 bytes) whereas the blake2b hashes I've seen Warehouse use are 64 bytes
Former is BLAKE2B-512 (hashlib digestsize=64), latter is BLAKE2B-256 (hashlib digestsize=32), it seems? This is very likely to lead to issues: the download will work fine but the verification will fail because securesystemslib will return BLAKE2B-512 for the file content and then tuf will compare it to BLAKE2B-256 given by warehouse.
There is now a PR in securesystemslib to add a new blake2b-256 algorithm. Warehouse should use 'blake2b-256' as the hash identifier in target metadata once it is released.
closing as this should not be an issue in client
My impression is that the client only supports sha256 and this is not configurable:
Warehouse folks seem to expect they can use blake2b for index file hashes too...