mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-17 03:48: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:
parent
71c24673ce
commit
d2120d6da1
@ -1,6 +1,5 @@
|
|||||||
cimport c
|
cimport c
|
||||||
cimport cython
|
cimport cython
|
||||||
|
|
||||||
cdef class HDNode:
|
cdef class HDNode:
|
||||||
|
|
||||||
cdef c.HDNode node
|
cdef c.HDNode node
|
||||||
@ -34,7 +33,7 @@ cdef class HDNode:
|
|||||||
c.hdnode_public_ckd(cython.address(x.node), i)
|
c.hdnode_public_ckd(cython.address(x.node), i)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
def private_ckd(self, int i):
|
def private_ckd(self, unsigned int i):
|
||||||
x = HDNode(copyfrom=self)
|
x = HDNode(copyfrom=self)
|
||||||
c.hdnode_private_ckd(cython.address(x.node), i)
|
c.hdnode_private_ckd(cython.address(x.node), i)
|
||||||
return x
|
return x
|
||||||
|
Loading…
Reference in New Issue
Block a user