two bugfixes: 1. nist256p1.c was not included in setup.py, causing import errors when using TrezorCrypto.so in Python. 2. if you attempted a hardened derivation in python using the compiled TrezorCrypto module, an IntegerOverflowError would occur because Python ints are always signed. one-line fix by changing int to unsigned int in the pyx file

pull/25/head
Josh Billings 9 years ago
parent 71c24673ce
commit d2120d6da1

@ -1,6 +1,5 @@
cimport c
cimport cython
cdef class HDNode:
cdef c.HDNode node
@ -34,7 +33,7 @@ cdef class HDNode:
c.hdnode_public_ckd(cython.address(x.node), i)
return x
def private_ckd(self, int i):
def private_ckd(self, unsigned int i):
x = HDNode(copyfrom=self)
c.hdnode_private_ckd(cython.address(x.node), i)
return x

@ -5,6 +5,7 @@ from Cython.Build import cythonize
from Cython.Distutils import build_ext
srcs = [
'nist256p1',
'base58',
'bignum',
'bip32',

Loading…
Cancel
Save