]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/crypto/ecdsa/ecdsa.go
[dev.boringcrypto] all: merge master into dev.boringcrypto
[gostls13.git] / src / crypto / ecdsa / ecdsa.go
index 1a7635ec2be3364981b845f298f989c4c267fb0e..4be0026b9a5dc4914041c13bf741e9d42084a678 100644 (file)
@@ -236,12 +236,8 @@ func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err err
        }
        boring.UnreachableExceptTests()
 
-       // Get min(log2(q) / 2, 256) bits of entropy from rand.
-       entropylen := (priv.Curve.Params().BitSize + 7) / 16
-       if entropylen > 32 {
-               entropylen = 32
-       }
-       entropy := make([]byte, entropylen)
+       // Get 256 bits of entropy from rand.
+       entropy := make([]byte, 32)
        _, err = io.ReadFull(rand, entropy)
        if err != nil {
                return