-
Notifications
You must be signed in to change notification settings - Fork 18k
crypto/ecdsa: ecdsa.Sign() has become indeterministic in go 1.21.6 #66129
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
Comments
This looks like a duplicate #58637's discussion to me.
|
@Jorropo , I'm wondering if there is a way it can be made deterministic with a flag or some tweaks? |
I don't know, cc @FiloSottile as far as I can tell |
First of all, Go+BoringCrypto is not a supported mode, and we definitely can't assist with FIPS validation requirements in relation to it. Still, I am a bit confused by what you are trying to do, because the BoringCrypto module already has boot self-tests. Anyway, the fact that Sign is not deterministic and that you can't expect it to stay the same across versions is clearly documented.
We might at some point support deterministic ECDSA, see #64802, but we don't currently. |
Go version
go version go1.21.6 X:boringcrypto linux/amd64
Output of
go env
in your module/workspace:What did you do?
We are working on getting FIPS certification for our products and one of the requirement is to run ECDSA and RSA PSS known answer test during boot up time.
We have our own go program which has predefined values for random, private, public keys, message and pre-computed signatures for comparison.
What did you see happen?
In 1.21.6, it seems even with all inputs to ecdsa Sign were predefined, it always generates indeterministic signature.
What did you expect to see?
It used to generate same set of signatures till 1.18.9. Was this a behaviour change recently? Is there a way to make ECDSA signature generation deterministic?
In the same context, is there a way to set RSA PSS salt length to be 0 so that it becomes deterministic which is possible with openssl?
The text was updated successfully, but these errors were encountered: