axelarnetwork / tofn

A threshold cryptography library in Rust
Apache License 2.0
112 stars 23 forks source link

Don't return secret key in simple ECDSA? #194

Closed ggutoski closed 4 months ago

ggutoski commented 3 years ago

keygen returns a KeyPair containing a signing_key: https://github.com/axelarnetwork/tofn/blob/b31c521d12c9e5803b281cf3b2dca93fa31bc5e7/src/ecdsa/mod.rs#L16-L19 and sign requires a signing_key.

Perhaps we should not return the signing key in keygen. Instead of requiring the signing key, sign can give us the mnemonic and session nonce from which we re-derive the signing key.