3 ms·
I don't think we can compare reading json to writing a bespoke, secure hashing algorithm across a broad set of languages.
by cpuguy83 2y ago
I don't think we can compare reading json to writing a bespoke, secure hashing algorithm across a broad set of languages.
- amluto 2y agoReading JSON that contains a sort of hash tree already. It’s a simple format that contains a mess of hashes that need verifying over certain files. Adding a rule that you hash the files in question in, say, 1 MiB chunks and hash the resulting hashes (and maybe that’s it, or maybe you add another level) is maybe 10 lines of code in any high level language.
- oconnor663 2y agoNote that secure tree hashing requires a distinguisher between the leaves and the parents (to avoid collisions) and ideally another distinguisher between the root and everything else (to avoid extensions). Surprisingly few bespoke tree hashes in the wild get this right.
- amluto 2y agoThis is why I said that Glacier’s hash should not be emulated. FWIW, using a (root hash, data length) pair hides many sins, although I haven’t formally proven this. And I don’t think that extension attacks are very relevant to the OCI use case.