ing-bank / threshold-signatures

Threshold Signature Scheme for ECDSA
MIT License
201 stars 41 forks source link

Missing prime validation in gen_proof() ? #5

Closed veorq closed 3 years ago

veorq commented 3 years ago

The big ints p and q are not checked to be prime in the Paillier key validity proof:

https://github.com/ing-bank/threshold-signatures/blob/8e255a5e65a7bba5dd59ef76492c7fc5f838ba3c/src/ecdsa/nizk.rs#L102-L111

Probably safer to check this when the key is loaded from the wallet, although the wallet authenticated encryption layer should prevent corruption of the private key.