-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Feature request] Secure against length extension attacks #108
Comments
Some more info that I've found
From these findings, I will prepare a miminum viable PR that would drop-in change sha256 with sha384 and all relevant documentation. An option to select hashes and a robust method to support it would be optimal, but beyond the scope of a "simple" drop in patch. |
Changes Sha256 usage into sha384 . Addresses oscar-project#108
So a prepared a PR to change SHA256 into SHA384. I have been wrong on some points though. There is still value in changing into SHA384 since it could be the baseline for when HMAC might be implemented.
|
Thanks a lot for the PR! We are (slowly) removing code that is not immediately linked to the pipeline from ungoliant, putting it in Code is here: https://github.com/oscar-project/oscar-tools/blob/main/src/ops/checksum.rs |
It's very simple code and the main discussion point is whether to integrate it at all, rather than how. |
implement SHA384. refer to oscar-project/ungoliant#108
Is your feature request related to a problem? Please describe.
Per folder SHA256 hashes can be potentially vulnerable to length extension attacks.
Describe the solution you'd like
SHA-384
andSHA-512/256
exist. However the latter is difficult to canonicalize due to slash in the name (it is part of its official name). If speed or size is a concern, BLAKE3 is extremely fast and secure as well.This can work, and can be achieved with minimal code change.
Describe alternatives you've considered
DO NOT
I thought about this possibility since it is already present, but xxhash64 as used in zstd is a very fast hash function with minimal
security guarantees. If we assume that somebody is manipulating the json.zst file and doing so with sufficient compute to actually launch a length extension attack this will not provide any further security.
Additional context
I consider OSCAR as an important part of the Data pipelines supply chain so I this the bar i hope OSCAR can clear.
I will be willing to further investigate potential hash functions, implementations and provide PRs if necessary.
Reference : oscar-project/documentation#13
The text was updated successfully, but these errors were encountered: