cslashm / ECPy

Apache License 2.0
36 stars 24 forks source link

improvement #8

Closed Moustikitos closed 5 years ago

Moustikitos commented 5 years ago
Moustikitos commented 5 years ago

Hi,

rfc 6979 is just a protocol to do deterministic signature providing k parameter in a deterministic way. Because Schnorr uses elliptic curves with k parameter, I think sign_rfc_6979 is a "must have".

According to the int.from_bytes, the issues appears with python 2.7. Actually python 2.7 interpret elem[i] as a str if elem is an bytes string and then sig[0] + 2 raises error : cannot concatenate str and int... the function basint is applied only when a single byte is extracted from a bytes string using __getitem__ operator. Actually instead of int.from_bytes, ord operator should be use.

My mistake about BTUPPLE and ITUPPLE, i missed the fact that the code was in a decode function :).

BTW, I like your pacakge because it is simple and efficient. I replaced ecdsa lib with yours in my python app.