1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 19:38:09 +00:00

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

This commit is contained in:
Josh Billings 2015-07-06 12:43:30 -04:00
parent 71c24673ce
commit d2120d6da1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

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