bnb-chain / tss-lib

Threshold Signature Scheme, for ECDSA and EDDSA
MIT License
790 stars 271 forks source link

s of ECDSA sign value is not meet EIP-2 valid range (0 < s < secp256k1n / 2 + 1) #263

Open stevenchiu7311 opened 1 year ago

stevenchiu7311 commented 1 year ago

I tried using ECDSA entry sample to sign transaction but sometimes get s value not accepted by go-ethereum crypto.ValidateSignatureValues check. The problem seems s value is not meet EIP-2 specification which define s value should be in range (0 < s < secp256k1n / 2 + 1).

Except resigning, could you kindly provide some advise to avoid this wrong signed result from signing flow (or convert non-EIP-2 signature to a valid EIP-2 one)?