mimblewimble / secp256k1-zkp

Fork of secp256k1-zkp for the Grin/MimbleWimble project
MIT License
32 stars 42 forks source link

aggsig: signature with (s,r) instead of (r,s) #28

Closed garyyu closed 6 years ago

garyyu commented 6 years ago

https://github.com/mimblewimble/secp256k1-zkp/blob/master/src/modules/aggsig/main_impl.h#L278-L282

    /* finalize */
    secp256k1_scalar_get_b32(sig64, &sec);
    secp256k1_ge_set_gej(&final, &pubnonce_j);
    secp256k1_fe_normalize_var(&final.x);
    secp256k1_fe_get_b32(sig64 + 32, &final.x);

Mark here: we're using (s,r) format for signature, which is not the convention. @yeastplume @jaspervdm Please confirm whether or not we need to correct this?

Conventionally, people stick to (r,s) format for signature. For example:

jaspervdm commented 6 years ago

Sure, sounds good to me. I think we should do this before T4. Will you prepare the PR or do you want me to do it?

garyyu commented 6 years ago

@jaspervdm 😄 very appreciated if you can help to do this. I'm still reading other parts, to make sure we don't need change some consensus breaking things after T4.

garyyu commented 6 years ago

Closed by #31