LLFourn / secp256kfun

A pure-rust secp256k1 library optimised for fun
BSD Zero Clause License
100 stars 28 forks source link

More concise share backups #182

Closed nickfarrow closed 1 week ago

nickfarrow commented 1 month ago

Exploring smaller backups by removing polynomial identifier and threshold (should be written in plaintext alongside the bech32 backup).

LLFourn commented 1 week ago

@nickfarrow ready for your review. Review each commit independently is probably best.

nickfarrow commented 1 week ago

frost shares should be Zero

Could you explain this one to me, why allow a frost secret share to be zero?

While zero isnt inherently forbidden for secret shares, it should never occur from a secure keygen, only if someone is cancelling out secret poly(s) and that might be worth panicking (perhaps not in this way!). I want to understand when to make things 'illegal', only when it's actually illegal within that context (like send_pubkey_to_bob example in readme)?

nickfarrow commented 1 week ago

minor fixups in 5d86d940e65845164ca15b6b41de28145607a5e1, re-added and updated frost proptest. Everything LGTM!

LLFourn commented 1 week ago

frost shares should be Zero

Could you explain this one to me, why allow a frost secret share to be zero?

While zero isnt inherently forbidden for secret shares, it should never occur from a secure keygen

This is true for every value that Scalar can take. The easy way to tell then is if your concern about 0 would equally apply to 42 or SHA256("malicious key"), then there's no problem with 0.