Skip to content
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

Generate machine ID using SHA-256 to avoid FIPS compliance issues #94

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Generate machine ID using SHA-256 to avoid FIPS compliance issues #94

merged 1 commit into from
Apr 12, 2023

Conversation

jjlin
Copy link
Contributor

@jjlin jjlin commented Apr 12, 2023

While object ID generation doesn't rely on the cryptographic security of MD5, many FIPS environments block the use of MD5 entirely. Mongo has also moved away from MD5 in their implementations of object ID generation for the same reason [1]. They initially replaced MD5 with FNV-1a, but the C driver at least has since moved from FNV-1a to SipHash.

In any case, the machine ID is generated only once during initialization in this code, so the speed of the chosen hash function is not important.

[1] https://jira.mongodb.org/browse/DRIVERS-492

While object ID generation doesn't rely on the cryptographic security of MD5,
many FIPS environments block the use of MD5 entirely. Mongo has also moved
away from MD5 in their implementations of object ID generation for the same
reason [1]. They initially replaced MD5 with FNV-1a, but the C driver at
least has since moved from FNV-1a to SipHash.

In any case, the machine ID is generated only once during initialization in
this code, so the speed of the chosen hash function is not important.

[1] https://jira.mongodb.org/browse/DRIVERS-492
@rs rs merged commit 47a0ac1 into rs:master Apr 12, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants