Description
Go version
go1.21.5
Output of go env
in your module/workspace:
N/A
What did you do?
When GOEXPERIMENT=boringcrypto
is set and fips is enforced using:
import _ "crypto/tls/fipsonly"
The standard library relies on boringAllowCert
when verifying the validity of certificates:
https://github.com/golang/go/blob/master/src/crypto/x509/boring.go#L19-L39
As a result, certificates with RSA keys starting from 5K up to 16K (this range is specific to my use case) fail.
Given the fact that Go was recently updated to use the 20220614 BoringCrypto module based on a pending FIPS 140-3 validation:
FIPS 140-3 IG section C.F [1] allows FIPS validations to make use of sizes other than 2048, 3072, and 4096, and the current restriction in the above-linked boringAllowCert
function dates from earlier FIPS certificates that predate this new guidance and required only specific sizes.
Does the pending FIPS validation allow other (larger) RSA key sizes, and if so, will Go be adjusting the restriction to permit those larger sizes?
What did you see happen?
tls: failed to verify certificate: x509: certificate specifies an incompatible key usage
What did you expect to see?
A somewhat naive expectation is to see relaxation in size checks given the current FIPS 140-3 guidance and pending validation.