Repository navigation
use sha1 for hashes instead of md5 - #40755
Conversation
9be0f15 to
1ceadff
Compare
|
These hashes aren't really used for anything sensitive so that they're md5 isn't really an issue. I'll find someone appropriate to review what the consequences are if we change all these paths :D |
|
can you merge the latest master? One premerge test failure seems to keep failing |
e2af980 to
b023702
Compare
|
hmm some of the premerge failures may be related to failures in the master. I will lyk one more time when you need to merge the latest master... |
|
can you merge it now? I believe it should be working now... |
@rkooo567 I noticed we have access to this button now, I think it's a new thing... I'm going to hit it now just to speed things up and start CI again |
Signed-off-by: Kevin <[email protected]>
62aa269 to
e16f266
Compare
|
@rkooo567 LMK if there's anything else you need me to do |
|
I believe if you merge master now, it should pass! |
|
retrying failed test now/// |
|
I will merge this after the branch cut |
|
cc @jjyao not sure if it can impact any performance, but please take a close look in regression! |
hashlib.md5() raises on FIPS-enabled OpenSSL because MD5 isn't in the OpenSSL FIPS provider. ray-project#40755 fixed this for runtime_env by moving to SHA-1, but three MD5 calls are left where the digest value matters and the algorithm can't change: - _generate_arm_guid replicates ARM's guid(), which is defined as MD5 - _rewrite_iceberg_file needs a stable write_uuid so retries overwrite the same object, and uuid.UUID wants 128 bits anyway - _compute_row_hashes uses the digest as a reproducible 64-bit seed All three derive an identifier from a string rather than doing anything security related, so usedforsecurity=False fits, and it leaves the digests identical. Signed-off-by: Thomas Bechtold <[email protected]>
…urity=False hashlib.md5() raises on FIPS-enabled OpenSSL because MD5 isn't in the OpenSSL FIPS provider. hashlib.blake2b() is served by the _blake2 builtin rather than OpenSSL, but distributions that wrap the builtins when _hashlib.get_fips_mode() is set reject it the same way, so both need the same treatment. ray-project#40755 fixed this for runtime_env by moving to SHA-1, which the FIPS provider does allow. These five calls are what is left, and in each the digest value matters so the algorithm can't change: - _generate_arm_guid replicates ARM's guid(), which is defined as MD5 - _rewrite_iceberg_file needs a stable write_uuid so retries overwrite the same object, and uuid.UUID wants 128 bits anyway - _compute_row_hashes uses the digest as a reproducible 64-bit seed - Dataset.train_test_split buckets rows by a digest of the split key - get_worker_id derives a Dynamo worker id from a replica's unique id All five derive an identifier from a string rather than doing anything security related, so usedforsecurity=False fits, and it leaves the digests identical. Signed-off-by: Thomas Bechtold <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

Why are these changes needed?
Use FIPS compliant hashing algorithm for file hashes
Related issue number
closes #40534
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.