ecdsa

malleability

(r, s) , (r, -s) 均可校验成功,签名构造。

low-s value 可修复该漏洞。

Verification Without Hash Pre-Image

可根据public key 任意构造(r, s, h)

因此,校验必须带原message,而非只校验h=hash(message)

Deterministic ECDSA

RFC6979: Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)

sony ps3 的案例是没有按算法要求生成随机数k。

RFC6979 的处理是,用SP800-90A的HMAC_DRBG随机数生成器生成k,其中,熵值用私钥(x),nonce用hash(message)。

RFC8032 EdDSA的做法也类似。

Deterministic ECDSA/EdDSA + Randomness

完全确定的签名,又容易被side-channel and fault injection attacks,又把random加回去

思路是 random + private key + message 三者结合,搞出随机数,或者签名参数

doc