q9f / secp256k1.cr

a native library implementing secp256k1 purely for the crystal language.

Home Page:https://q9f.github.io/secp256k1.cr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rerturn recovery param on sign (v,r,s)

cserb opened this issue · comments

commented

yeah, I never got to v, see #20

it's a basic ecdsa sign/verify

commented

https://github.com/fivepiece/sign-verify-message/blob/master/signverifymessage.md#encoding-of-a-recoverable-signature

0x1B ->  R_y even | R_x < n | P uncompressed
0x1C ->  R_y odd  | R_x < n | P uncompressed
0x1D ->  R_y even | R_x > n | P uncompressed
0x1E ->  R_y odd  | R_x > n | P uncompressed
0x1F ->  R_y even | R_x < n | P compressed
0x20 ->  R_y odd  | R_x < n | P compressed
0x21 ->  R_y even | R_x > n | P compressed
0x22 ->  R_y odd  | R_x > n | P compressed
commented

done in #56 #57