-
Notifications
You must be signed in to change notification settings - Fork 646
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
[Enhancement Request] Is it possible to have a way to disable sha256-simd via an env var or some other method? #1697
Comments
We should not fail in this scenario, we should check why boring crypto is resulting in unexpected output. |
I think this is the place: goboring tries to recognize the specific HMAC that is being used: We're seeing that hashToMD is returning nil. |
Okay that is quite terrible :-) |
@aead @klauspost ^^ FYI when FIPS is compiled in. |
@tesshuflower The CustomSHA256 in Client options allows you to specify which sha256 hash to use. The interface is easy to satisfy:
|
@klauspost I think even if I try to set CustomSHA256 in the the client options, it still ends up calling utilities in pkg/signer that use the sha256-simd? https://github.com/minio/minio-go/blob/master/pkg/signer/utils.go#L40 This seems to be called from bucket_cache: and I don't see where it will use the customsha256 from options in this case - Possibly I'm missing something here though. |
I see. That is a mistake. I may add add |
Yes, a |
With #1700 You can
or
|
Wow this is great! Thanks very much for the quick turnaround! |
We are building
restic
(https://github.com/restic/restic) which usesminio-go
- we're building to be FIPS-compatible, so that means it's using a version ofgoboringcrypto
.What we find is when running in FIPS enabled environments, when the CPU supports it,
minio-go
is usingsha256-simd
as a replacement forcrypto/sha256
. This ends up creating a hash with sha256.New() which goboringcrypto does not recognize.Is there a way to allow an env var or something equivalent to allow us to disable the usage of the
sha256-simd
library (i.e. fallback tocrypto/sha256
for certain envs?For reference, we've seen that
syncthing
has implemented a workaround to disable the library via an env var:syncthing/syncthing#3617
The text was updated successfully, but these errors were encountered: