diff --git a/crypto/eots/eots.go b/crypto/eots/eots.go index 5bb288980..d1f842a6f 100644 --- a/crypto/eots/eots.go +++ b/crypto/eots/eots.go @@ -65,6 +65,11 @@ func signHash(sk *PrivateKey, privateRand *PrivateRand, hash [32]byte) (*Signatu return nil, signatureError(ecdsa_schnorr.ErrPrivateKeyIsZero, str) } + // Check if nonce is zero + if privateRand.IsZero() { + return nil, errors.New("nonce (privateRand) is zero") + } + // d' = int(d) var privKeyScalar ModNScalar privKeyScalar.Set(&sk.Key)