plume-sig / zk-nullifier-sig

Implementation of PLUME: nullifier friendly signature scheme on ECDSA
MIT License
128 stars 22 forks source link

Add `sign` method to <./rust-k256> #84

Closed skaunov closed 4 months ago

skaunov commented 5 months ago

Seems like <./rust-k256> designed only for verification of a signature, as there's no ready outlet to pub which could sign a message. Should it be so, or does it just lacking it?

skaunov commented 5 months ago

Depending on the answer I would raise an issue for changing the struct parts to AsRef or creating some facility methods for instantiation of the signature.

Divide-By-0 commented 5 months ago

It's good to have a plume signing function exposed!

Divide-By-0 commented 5 months ago

skaunov should add that it's also needed to

  • convert tests to integration,
  • clean hex strings assertions for further comprehensibilty. \ (This well might demote AsRef issue to a nice to have thing.)
skaunov commented 4 months ago

@Divide-By-0 , what do you think should we provide a sign with given $r$ method? I'm hesitant since it'd encourage nonce reuse and consequence break of the protocol. So I'm inclined to hide such a method in a debug target.

Divide-By-0 commented 4 months ago

@Divide-By-0 , what do you think should we provide a sign with given r method? I'm hesitant since it'd encourage nonce reuse and consequence break of the protocol. So I'm inclined to hide such a method in a debug target.

Sounds good to me. You're right, reusing r would leak the secret key.