coinbase / mesh-specifications

Specification files for the Mesh Blockchain Standard
Apache License 2.0
324 stars 92 forks source link

Support Coda with Tweedle curve and SchnorrPoseidon signatures #44

Closed lk86 closed 4 years ago

lk86 commented 4 years ago

Fixes # .

Motivation

Enables support for Coda Protocol's rosetta implementation, specifically the curve type and signature scheme used in Coda.

Solution

Adds Coda's curve type (tweedle) and signature scheme (schnorr_poseidon) to the specification.

Open questions

patrick-ogrady commented 4 years ago

👋 @lk86 ... you'll need to run make gen to fix the check-gen test.

patrick-ogrady commented 4 years ago

Looks like you'll need to rebase onto master here too @lk86 ... we added secp256r1 while you were working on this. (https://github.com/coinbase/rosetta-specifications/pull/39)

lk86 commented 4 years ago

I made sort of a mess of the commit history trying to rebase across forks but the changes here should now be properly in sync with master.

patrick-ogrady commented 4 years ago

Our team is reviewing the docs you linked @lk86, will get back to you with any comments or approve shortly.

patrick-ogrady commented 4 years ago

Would you mind adding your new CurveType and SignatureType to the README: https://github.com/coinbase/rosetta-specifications#writing-a-construction-api-implementation

We would also appreciate it if you could elaborate on the challenge value in the signature description + README (i.e. what you have here: https://github.com/CodaProtocol/signer-reference/blob/c4dee525d6a8ff947ab10bd849e74936d29e1212/schnorr.ml#L92). Just putting something like hash(R || P || m) (replacing the values inside the hash with what is used in Coda) should be sufficient.

lk86 commented 4 years ago

Would you mind adding your new CurveType and SignatureType to the README: https://github.com/coinbase/rosetta-specifications#writing-a-construction-api-implementation

We would also appreciate it if you could elaborate on the challenge value in the signature description + README (i.e. what you have here: https://github.com/CodaProtocol/signer-reference/blob/c4dee525d6a8ff947ab10bd849e74936d29e1212/schnorr.ml#L92). Just putting something like hash(R || P || m) (replacing the values inside the hash with what is used in Coda) should be sufficient.

I've updated tweedle and schnorr_poseidon in the readme, and added a high-level calculation of the schnorr challenge we use (hash(1st pk || 2nd pk || r)).

patrick-ogrady commented 4 years ago

Looks good @lk86 ... once you run make gen, should be good!

lk86 commented 4 years ago

Looks good @lk86 ... once you run make gen, should be good!

whoops, should be all set now!