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

crypto: align FIPS mode GenerateKey behavior with non-FIPS mode #70772

Closed
FiloSottile opened this issue Dec 11, 2024 · 3 comments
Closed

crypto: align FIPS mode GenerateKey behavior with non-FIPS mode #70772

FiloSottile opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. okay-after-rc1 Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1 release-blocker
Milestone

Comments

@FiloSottile
Copy link
Contributor

I initially made the GenerateKey functions ignore the rand parameter, because using anything but the FIPS DRBG makes the key non-compliant. However, this is the only subtle behavior difference between FIPS and non-FIPS mode (the others are the explicit change in crypto/tls behavior, and stuff getting slower).

We discussed this with @rsc and @rolandshoemaker and agreed to change it to work like Go+BoringCrypto for now, and then maybe consider ignoring the rand parameter entirely in Go 1.25 (regardless of FIPS mode).

Tracking issue for making the change in Go 1.24. See #69536.

@FiloSottile FiloSottile added this to the Go1.24 milestone Dec 11, 2024
@FiloSottile FiloSottile self-assigned this Dec 11, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/635195 mentions this issue: crypto: use provided random Reader in FIPS mode

@cagedmantis cagedmantis added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 11, 2024
@aclements
Copy link
Member

Does this need to block rc1 or can it be post-rc1?

@FiloSottile
Copy link
Contributor Author

It only affects FIPS mode, so I think it's ok post-rc1.

@cagedmantis cagedmantis added the okay-after-rc1 Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1 label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. okay-after-rc1 Used by release team to mark a release-blocker issue as okay to resolve either before or after rc1 release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants