axelarnetwork / tofn

A threshold cryptography library in Rust
Apache License 2.0
107 stars 22 forks source link

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

Open ggutoski opened 2 years ago

ggutoski commented 2 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.