You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a real device, it seems that some arithmetic syscalls such as cx_math_add truncate results silently when an arithmetic overflow occurs. The speculos implementation should have the same behavior. See
On a real device, it seems that some arithmetic syscalls such as
cx_math_add
truncate results silently when an arithmetic overflow occurs. The speculos implementation should have the same behavior. Seespeculos/src/emu_os_bip32.c
Lines 276 to 284 in 8081103
BTW, the return value of
BN_bn2binpad
isn't verified incx_math_add
:speculos/src/emu_cx_math.c
Line 90 in 8081103
len
is less thanBN_num_bytes(rr)
. Return values of OpenSSL functions are almost never checked. This should be enforced.The text was updated successfully, but these errors were encountered: