Skip to content

Trezor One (Model One) 1.14.3

The published firmware image, checked against its published source. reproducible

Verified with cverif 0.1.4; this repository now uses cverif 0.1.5, which may prove more and report fewer false alarms. This result is due to be re-run.

753 / 1,264
functions proved equal to the source
59.5%
of code bytes proved (296,867 of 498,909)
47.5%
of source statements and branches proved
207
mismatches reported: 205 cverif false alarm, 2 unspecified in C
753 proved208 bounded11 timing leak2 differs where C leaves it open242 mismatch, cverif false alarm8 reveals by design6 mark too broad27 inconclusive7 unsupported

Constant time

46 functions are marked constant time by the specs trezor-crypto, secp256k1-zkp, trezor-storage; cverif checks that the published machine code's timing doesn't depend on their secrets, nor that of the helpers they pass secrets to (how). 19 spec entries are not in this image.

9 proved20 bounded11 timing leak37 mismatch, cverif false alarm8 reveals by design6 mark too broad49 inconclusive
FunctionClaimDetail
aes_cbc_decrypt
marked
violationthe condition of the branch `bne 0x8044942` depends on secrets (../vendor/trezor-crypto/aes/aes_modes.c:447)
true with secret ret0:aes_decrypt = 0x80000000; false with secret ret0:aes_decrypt = 0x0
aes_cbc_encrypt
marked
violationthe condition of the branch `bne 0x80447c4` depends on secrets (../vendor/trezor-crypto/aes/aes_modes.c:354)
true with secret ret0:aes_encrypt = 0x4; false with secret ret0:aes_encrypt = 0x0
aes_decrypt
marked
violationthe condition of the branch `beq 0x8044134` depends on secrets (../vendor/trezor-crypto/aes/aescrypt.c:239)
true with secret cx[240] = 0xa0; false with secret cx[240] = 0x0 (public: cx = 0x68)
aes_encrypt
marked
violationthe condition of the branch `beq 0x8043e42` depends on secrets (../vendor/trezor-crypto/aes/aescrypt.c:104)
true with secret cx[240] = 0xa0; false with secret cx[240] = 0x0 (public: cx = 0x68)
bn_mod
given secrets by tc_ecdsa_sign_digest
violationnot constant time
bn_multiply
given secrets by tc_ecdsa_sign_digest
violation`umlal r3, r5, lr, r12` gets an operand that depends on secrets; on the Cortex-M3 it takes 3 to 7 cycles: operands below 64K in magnitude finish early (../vendor/trezor-crypto/bignum.c:570)
0x80000000 with secret *(u32 *)0x8 = 0x80000000; 0x7fffffff with secret *(u32 *)0x8 = 0x7fffffff (public: k = 0x8)
curve25519_mul
given secrets by curve25519_scalarmult_donna
violation`umull r1, r4, r2, r10` gets an operand that depends on secrets; on the Cortex-M3 it takes 3 to 7 cycles: operands below 64K in magnitude finish early (../vendor/trezor-crypto/ed25519-donna/curve25519-donna-32bit.c:192)
0x80000000 with secret *(u32 *)0x8 = 0x80000000; 0x7fffffff with secret *(u32 *)0x8 = 0x7fffffff (public: b = 0x4)
curve25519_scalarmult
marked
violationnot constant time
curve25519_scalarmult_donna
given secrets by curve25519_scalarmult
violationnot constant time
curve25519_square
given secrets by curve25519_scalarmult_donna
violation`umull r2, r1, r3, r10` gets an operand that depends on secrets; on the Cortex-M3 it takes 3 to 7 cycles: operands below 64K in magnitude finish early (../vendor/trezor-crypto/ed25519-donna/curve25519-donna-32bit.c:285)
0x80000000 with secret *(u32 *)0x8 = 0x40000000; 0x7ffffffe with secret *(u32 *)0x8 = 0x3fffffff (public: in = 0x4)
ecdh_multiply
marked
violationthe condition of the branch `cbnz r0, 0x8037266` depends on secrets (../vendor/trezor-crypto/ecdsa.c:647)
true with secret ret4:bn_is_zero = 0x4; false with secret ret4:bn_is_zero = 0x0
ecdsa_get_public_key33
marked
violationthe condition of the branch `cbnz r0, 0x8036d9a` depends on secrets (../vendor/trezor-crypto/ecdsa.c:796)
true with secret ret1:bn_is_zero = 0x1; false with secret ret1:bn_is_zero = 0x0
ecdsa_get_public_key65
marked
violationthe condition of the branch `cbnz r0, 0x8036e76` depends on secrets (../vendor/trezor-crypto/ecdsa.c:822)
true with secret ret1:bn_is_zero = 0x1; false with secret ret1:bn_is_zero = 0x0
ecdsa_sign_digest
marked
violationnot constant time
ed25519_publickey
marked
violationnot constant time
ed25519_publickey_keccak
marked
violationnot constant time
ed25519_sign
marked
violationnot constant time
ed25519_sign_keccak
marked
violationnot constant time
generate_k_rfc6979
marked
violationnot constant time
generate_rfc6979
given secrets by generate_k_rfc6979
violationnot constant time
hmac_drbg_generate
marked
violationnot constant time
hmac_drbg_init
marked
violationnot constant time
hmac_drbg_reseed
given secrets by hmac_drbg_init
violationnot constant time
hmac_sha256
marked
violationnot constant time
hmac_sha256_Final
given secrets by hmac_sha256
violationnot constant time
hmac_sha512
marked
violationnot constant time
hmac_sha512_Final
given secrets by hmac_sha512
violationnot constant time
init_rfc6979
marked
violationnot constant time
keccak_512
given secrets by ed25519_publickey_keccak, ed25519_sign_keccak
violationnot constant time
memzero
marked
violationargument 1 of the call to explicit_bzero points to secret memory, and explicit_bzero is not known to be constant time (../vendor/trezor-crypto/memzero.c:55)
any input
nonce_function_bip340
given secrets by secp256k1_schnorrsig_sign_internal
violationthe condition of the branch `bne 0x80174e0` depends on secrets (legacy/vendor/secp256k1-zkp/src/modules/schnorrsig/main_impl.h:85)
false with secret ret2:secp256k1_memcmp_var = 0x0; true with secret ret2:secp256k1_memcmp_var = 0x2
point_multiply
marked
violationthe condition of the branch `beq 0x8035f98` depends on secrets (../vendor/trezor-crypto/ecdsa.c:416)
true with secret ret0:bn_is_less = 0x0; false with secret ret0:bn_is_less = 0x2
secp256k1_ec_pubkey_create
marked
violationnot constant time
secp256k1_ec_pubkey_create_helper
given secrets by secp256k1_ec_pubkey_create, secp256k1_keypair_create
violationnot constant time
secp256k1_ec_pubkey_tweak_add_helper
given secrets by secp256k1_keypair_xonly_tweak_add
violationthe condition of the branch `cbz r3, 0x80178fc` depends on secrets (legacy/vendor/secp256k1-zkp/src/secp256k1.c:692)
false with secret esc0:&secp256k1_ec_pubkey_tweak_add_helper.overflow#3@1+0 = 0x80000000; true with secret esc0:&secp256k1_ec_pubkey_tweak_add_helper.overflow#3@1+0 = 0x0
secp256k1_ecdh
marked
violationthe call to <indirect call> may read secrets from memory (stored there by this function, or by a call it gave secrets to), and <indirect call> is not checked as constant time for that (legacy/vendor/secp256k1-zkp/src/modules/ecdh/main_impl.h:63)
any input
secp256k1_ecdsa_sign_recoverable
marked
violationargument 3 of the call to <indirect call> points to secret memory, and <indirect call> is not known to be constant time (legacy/vendor/secp256k1-zkp/src/secp256k1.c:540)
any input
secp256k1_ecmult
given secrets by secp256k1_ec_pubkey_tweak_add_helper
violationthe condition of the branch `cbnz r0, 0x8017628` depends on secrets (legacy/vendor/secp256k1-zkp/src/ecmult_impl.h:270)
true with secret ret0:secp256k1_scalar_is_zero = 0x80000000; false with secret ret0:secp256k1_scalar_is_zero = 0x0
secp256k1_ecmult_const
given secrets by secp256k1_ecdh
violationthe condition of the branch `cbz r4, 0x801701e` depends on secrets (legacy/vendor/secp256k1-zkp/src/ecmult_const_impl.h:200)
false with secret *(u32 *)0x800000c4 = 0x40000000; true with secret *(u32 *)0x800000c4 = 0x0 (public: a = 0x80000074)
secp256k1_ecmult_gen
given secrets by secp256k1_ec_pubkey_create_helper, secp256k1_schnorrsig_sign_internal
violationnot constant time
secp256k1_extrakeys_ge_even_y
given secrets by secp256k1_keypair_xonly_tweak_add
violationthe condition of the branch `beq 0x801645a` depends on secrets (legacy/vendor/secp256k1-zkp/src/modules/extrakeys/main_impl.h:92)
false with secret *(u32 *)0x64 = 0x1; true with secret *(u32 *)0x64 = 0x0 (public: r = 0x3c)
secp256k1_gej_rescale
given secrets by secp256k1_ecmult_gen
violationthe call to secp256k1_fe_sqr_inner may read secrets from memory (stored there by this function, or by a call it gave secrets to), and secp256k1_fe_sqr_inner is not checked as constant time for that (legacy/vendor/secp256k1-zkp/src/field_10x26_impl.h:1011)
any input
secp256k1_keypair_create
marked
violationnot constant time
secp256k1_keypair_xonly_tweak_add
marked
violationthe condition of the branch `bne 0x80190a6` depends on secrets (legacy/vendor/secp256k1-zkp/src/modules/extrakeys/main_impl.h:269)
false with secret ret1:secp256k1_extrakeys_ge_even_y = 0x1; true with secret ret1:secp256k1_extrakeys_ge_even_y = 0x0
secp256k1_scalar_mul
given secrets by secp256k1_schnorrsig_sign_internal
violationnot constant time
secp256k1_scalar_mul_512
given secrets by secp256k1_scalar_mul
violation`umull r3, r4, r3, r4` gets an operand that depends on secrets; on the Cortex-M3 it takes 3 to 7 cycles: operands below 64K in magnitude finish early (legacy/vendor/secp256k1-zkp/src/scalar_8x32_impl.h:553)
0x22220084 with secret *(u32 *)0x7da28ff0 = 0x22220084; 0x590812 with secret *(u32 *)0x7da28ff0 = 0x590812 (public: a = 0x7da28ff0)
secp256k1_schnorrsig_sign_internal
given secrets by secp256k1_schnorrsig_sign32
violationthe condition of the branch `bpl 0x8018016` depends on secrets (legacy/vendor/secp256k1-zkp/src/modules/schnorrsig/main_impl.h:161)
false with secret esc0:&secp256k1_schnorrsig_sign_internal.pk#11@1+40 = 0x1; true with secret esc0:&secp256k1_schnorrsig_sign_internal.pk#11@1+40 = 0x0
secp256k1_schnorrsig_sign32
marked
violationnot constant time
sha256_Final
given secrets by hmac_sha256_Final, update_k
violationthe call to explicit_bzero may read secrets from memory (stored there by this function, or by a call it gave secrets to), and explicit_bzero is not checked as constant time for that (../vendor/trezor-crypto/memzero.c:55)
any input
sha256_Update
given secrets by hmac_sha256, hmac_sha256_Final, update_k
violationthe condition of the branch `beq 0x803f8a6` depends on secrets (../vendor/trezor-crypto/sha2.c:860)
false with secret *(u32 *)0xe1b70080 = 0xe4000044; true with secret *(u32 *)0xe1b70080 = 0x0 (public: context = 0xe1b70060)
sha3_Update
given secrets by keccak_512
violationargument 2 of the call to __stack_chk_fail points to secret memory, and __stack_chk_fail is not known to be constant time (../vendor/trezor-crypto/sha3.c:338)
any input
sha512_Final
given secrets by hmac_sha512_Final, sha512_Raw
violationthe call to explicit_bzero may read secrets from memory (stored there by this function, or by a call it gave secrets to), and explicit_bzero is not checked as constant time for that (../vendor/trezor-crypto/memzero.c:55)
any input
sha512_Raw
given secrets by ed25519_publickey, ed25519_sign
violationthe condition of the branch `bcs 0x804054c` depends on secrets (../vendor/trezor-crypto/sha2.c:1217)
true with secret esc1:&sha512_Raw.context#3@1+64 = 0xffffff40, esc1:&sha512_Raw.context#3@1+68 = 0xffffffff; false with secret esc1:&sha512_Raw.context#3@1+64 = 0x0, esc1:&sha512_Raw.context#3@1+68 = 0x0 (public: len = 0x25)
sha512_Update
given secrets by hmac_sha512, hmac_sha512_Final
violationthe condition of the branch `beq 0x8040384` depends on secrets (../vendor/trezor-crypto/sha2.c:1174)
false with secret *(u32 *)0x40 = 0x800000ce; true with secret *(u32 *)0x40 = 0x0 (public: context = 0x0)
tc_ecdsa_sign_digest
given secrets by ecdsa_sign_digest
violationthe condition of the branch `bne 0x8036284` depends on secrets (../vendor/trezor-crypto/ecdsa.c:698)
true with secret ret2:bn_is_zero = 0x80000000; false with secret ret2:bn_is_zero = 0x0
update_k
given secrets by hmac_drbg_generate, hmac_drbg_reseed
violationnot constant time
zkp_bip340_sign_digest
marked
violationargument 3 of the call to secp256k1_keypair_create points to secret memory, and secp256k1_keypair_create is not known to be constant time (../vendor/trezor-crypto/zkp_bip340.c:126)
any input
zkp_bip340_tweak_private_key
marked
violationargument 3 of the call to secp256k1_keypair_create points to secret memory, and secp256k1_keypair_create is not known to be constant time (../vendor/trezor-crypto/zkp_bip340.c:298)
any input
zkp_ecdh_multiply
marked
violationargument 4 of the call to secp256k1_ecdh points to secret memory, and secp256k1_ecdh is not known to be constant time (../vendor/trezor-crypto/zkp_ecdsa.c:462)
any input
zkp_ecdsa_get_public_key33
marked
violationargument 3 of the call to secp256k1_ec_pubkey_create points to secret memory, and secp256k1_ec_pubkey_create is not known to be constant time (../vendor/trezor-crypto/zkp_ecdsa.c:85)
any input
zkp_ecdsa_get_public_key65
marked
violationargument 3 of the call to secp256k1_ec_pubkey_create points to secret memory, and secp256k1_ec_pubkey_create is not known to be constant time (../vendor/trezor-crypto/zkp_ecdsa.c:142)
any input
zkp_ecdsa_sign_digest
marked
violationargument 4 of the call to secp256k1_ecdsa_sign_recoverable points to secret memory, and secp256k1_ecdsa_sign_recoverable is not known to be constant time (../vendor/trezor-crypto/zkp_ecdsa.c:229)
any input
aes_decrypt_key256
marked
boundedconstant time on the explored paths only
aes_encrypt_key256
marked
boundedconstant time on the explored paths only
bn_add
given secrets by tc_ecdsa_sign_digest
inconclusiveconstant time not checked: the binary differs from the source, checked for caller tc_ecdsa_sign_digest
bn_cmov
given secrets by bn_mod
inconclusiveconstant time not checked: the binary differs from the source, checked for caller bn_mod
bn_inverse
given secrets by tc_ecdsa_sign_digest
boundedconstant time on the explored paths only, checked for caller tc_ecdsa_sign_digest
bn_is_less
given secrets by bn_mod, ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, point_multiply, tc_ecdsa_sign_digest
provedconstant time, checked for caller bn_mod, ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, point_multiply, tc_ecdsa_sign_digest
bn_is_zero
given secrets by ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, tc_ecdsa_sign_digest
provedconstant time, checked for caller ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, tc_ecdsa_sign_digest
bn_read_be
given secrets by ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, generate_k_rfc6979, tc_ecdsa_sign_digest
inconclusiveconstant time not checked: the binary differs from the source, checked for caller ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, generate_k_rfc6979, tc_ecdsa_sign_digest
bn_subtract
given secrets by bn_mod, tc_ecdsa_sign_digest
inconclusiveconstant time not checked: the binary differs from the source, checked for caller bn_mod, tc_ecdsa_sign_digest
bn_write_be
given secrets by ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, tc_ecdsa_sign_digest
inconclusiveconstant time not checked: the binary differs from the source, checked for caller ecdh_multiply, ecdsa_get_public_key33, ecdsa_get_public_key65, tc_ecdsa_sign_digest
bn_zero
given secrets by point_multiply
provedconstant time, checked for caller point_multiply
consteq
marked
provedconstant time (every loop iteration, by induction)
curve25519_add
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
curve25519_copy
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
curve25519_expand
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
curve25519_scalar_product
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
curve25519_scalarmult_basepoint
marked
inconclusiveconstant time not checked: the binary differs from the source
curve25519_sub
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
curve25519_swap_conditional
given secrets by curve25519_scalarmult_donna
inconclusiveconstant time not checked: the binary differs from the source, checked for caller curve25519_scalarmult_donna
ecdh_hash_function_sha256
given secrets by secp256k1_ecdh
inconclusiveconstant time, checked for caller secp256k1_ecdh
ECRYPT_encrypt_bytes
given secrets by rfc7539_init
boundedconstant time on the explored paths only, checked for caller rfc7539_init
ECRYPT_keysetup
marked
inconclusiveconstant time not checked: the binary differs from the source, checked for the secrets of caller rfc7539_init too
ed25519_publickey_ext
given secrets by ed25519_publickey, ed25519_publickey_keccak
boundedconstant time on the explored paths only, checked for caller ed25519_publickey, ed25519_publickey_keccak
ed25519_sign_ext
marked
inconclusiveconstant time not checked: the binary differs from the source, checked for the secrets of caller ed25519_sign too
ed25519_sign_ext_keccak
given secrets by ed25519_sign_keccak
inconclusiveconstant time not checked: the binary differs from the source, checked for caller ed25519_sign_keccak
hmac_sha256_Init
marked
boundedconstant time on the explored paths only, checked for the secrets of caller hmac_sha256 too
hmac_sha512_Init
marked
boundedconstant time on the explored paths only, checked for the secrets of caller hmac_sha512 too
is_not_wipe_code
marked
boundedconstant time on the explored paths only
keccak_Final
given secrets by keccak_512
boundedconstant time on the explored paths only, checked for caller keccak_512
nonce_function_rfc6979
helper
boundedconstant time on the explored paths only
poly1305_init
given secrets by rfc7539_init
inconclusiveconstant time not checked: the binary differs from the source, checked for caller rfc7539_init
rfc7539_init
marked
inconclusiveconstant time
secequal
marked
provedconstant time
secp256k1_ec_seckey_tweak_add_helper
given secrets by secp256k1_keypair_xonly_tweak_add
inconclusiveconstant time, checked for caller secp256k1_keypair_xonly_tweak_add
secp256k1_fe_impl_cmov
given secrets by secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller secp256k1_ecmult_gen
secp256k1_fe_impl_get_b32
given secrets by secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
secp256k1_fe_impl_negate_unchecked
given secrets by secp256k1_ecmult_gen, secp256k1_extrakeys_ge_even_y
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ecmult_gen, secp256k1_extrakeys_ge_even_y
secp256k1_fe_impl_normalize
given secrets by secp256k1_ecdh
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ecdh
secp256k1_fe_impl_normalize_var
given secrets by secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_schnorrsig_sign_internal
secp256k1_fe_impl_set_int
given secrets by secp256k1_gej_set_infinity
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_gej_set_infinity
secp256k1_fe_storage_cmov
given secrets by secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller secp256k1_ecmult_gen
secp256k1_ge_from_storage
given secrets by secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ecmult_gen
secp256k1_ge_set_gej
given secrets by secp256k1_ec_pubkey_create_helper, secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
boundedconstant time on the explored paths only, checked for caller secp256k1_ec_pubkey_create_helper, secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
secp256k1_ge_to_bytes
given secrets by secp256k1_ec_pubkey_create, secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ec_pubkey_create, secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add
secp256k1_gej_add_ge
given secrets by secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller secp256k1_ecmult_gen
secp256k1_gej_double
given secrets by secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ecmult_gen
secp256k1_gej_set_ge
given secrets by secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ecmult_gen
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ecmult_gen
secp256k1_gej_set_infinity
given secrets by secp256k1_ecmult_const
inconclusiveconstant time, checked for caller secp256k1_ecmult_const
secp256k1_hmac_sha256_finalize
helper
boundedconstant time
secp256k1_keypair_load
given secrets by secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
secp256k1_memcmp_var
given secrets by nonce_function_bip340
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller nonce_function_bip340
secp256k1_memczero
given secrets by secp256k1_ec_pubkey_create, secp256k1_keypair_create, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ec_pubkey_create, secp256k1_keypair_create, secp256k1_schnorrsig_sign_internal
secp256k1_modinv32
helper
boundedconstant time on the explored paths only
secp256k1_rfc6979_hmac_sha256_initialize
helper
boundedconstant time on the explored paths only
secp256k1_scalar_check_overflow
given secrets by secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecmult_gen, secp256k1_schnorrsig_sign_internal
provedconstant time, checked for caller secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecmult_gen, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_clear
given secrets by secp256k1_ec_pubkey_create, secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_ecmult_gen, secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
provedconstant time, checked for caller secp256k1_ec_pubkey_create, secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_ecmult_gen, secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_cmov
given secrets by secp256k1_ec_pubkey_create_helper, secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller secp256k1_ec_pubkey_create_helper, secp256k1_ecdh, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_from_signed30
helper
inconclusiveconstant time not checked: the binary differs from the source
secp256k1_scalar_get_b32
given secrets by secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time, checked for caller secp256k1_keypair_create, secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_is_high
helper
provedconstant time
secp256k1_scalar_is_zero
given secrets by secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_ecmult, secp256k1_scalar_set_b32_seckey, secp256k1_schnorrsig_sign_internal
provedconstant time, checked for caller secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_ecmult, secp256k1_scalar_set_b32_seckey, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_negate
given secrets by secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_keypair_xonly_tweak_add, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_reduce
given secrets by secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecmult_gen, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecmult_gen, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_set_b32
given secrets by secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_scalar_set_b32_seckey, secp256k1_schnorrsig_challenge, secp256k1_schnorrsig_sign_internal
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_ec_pubkey_tweak_add_helper, secp256k1_ec_seckey_tweak_add_helper, secp256k1_ecdh, secp256k1_scalar_set_b32_seckey, secp256k1_schnorrsig_challenge, secp256k1_schnorrsig_sign_internal
secp256k1_scalar_set_b32_seckey
given secrets by secp256k1_ec_pubkey_create_helper
inconclusiveconstant time, checked for caller secp256k1_ec_pubkey_create_helper
secp256k1_scalar_to_signed30
helper
inconclusiveconstant time not checked: the binary differs from the source
secp256k1_schnorrsig_challenge
given secrets by secp256k1_schnorrsig_sign_internal
inconclusiveconstant time, checked for caller secp256k1_schnorrsig_sign_internal
secp256k1_sha256_finalize
given secrets by ecdh_hash_function_sha256, nonce_function_bip340, secp256k1_hmac_sha256_finalize, secp256k1_schnorrsig_challenge, secp256k1_sha256_initialize_tagged
boundedconstant time on the explored paths only, checked for caller ecdh_hash_function_sha256, nonce_function_bip340, secp256k1_hmac_sha256_finalize, secp256k1_schnorrsig_challenge, secp256k1_sha256_initialize_tagged
secp256k1_sha256_initialize
given secrets by ecdh_hash_function_sha256, secp256k1_sha256_initialize_tagged
inconclusiveconstant time not checked: the binary differs from the source as verified alone, checked for caller ecdh_hash_function_sha256, secp256k1_sha256_initialize_tagged
secp256k1_sha256_initialize_tagged
given secrets by nonce_function_bip340
inconclusiveconstant time, checked for caller nonce_function_bip340
secp256k1_sha256_write
given secrets by ecdh_hash_function_sha256, nonce_function_bip340, secp256k1_hmac_sha256_finalize, secp256k1_schnorrsig_challenge, secp256k1_sha256_initialize_tagged
boundedconstant time on the explored paths only, checked for caller ecdh_hash_function_sha256, nonce_function_bip340, secp256k1_hmac_sha256_finalize, secp256k1_schnorrsig_challenge, secp256k1_sha256_initialize_tagged
secp256k1_write_be32
given secrets by secp256k1_scalar_get_b32
inconclusiveconstant time not checked: the binary differs from the source, checked for caller secp256k1_scalar_get_b32
sha256_Init
given secrets by hmac_sha256_Final
inconclusiveconstant time not checked: the binary differs from the source, checked for caller hmac_sha256_Final
sha256_Transform
marked
boundedconstant time on the explored paths only, checked for the secrets of caller sha256_Update, update_k, update_v too
sha3_process_block
given secrets by sha3_Update
boundedconstant time on the explored paths only, checked for caller sha3_Update
sha512_Init
given secrets by hmac_sha512_Final
inconclusiveconstant time not checked: the binary differs from the source, checked for caller hmac_sha512_Final
sha512_Transform
marked
boundedconstant time on the explored paths only, checked for the secrets of caller sha512_Raw, sha512_Update too
update_v
given secrets by hmac_drbg_generate, hmac_drbg_reseed
boundedconstant time, checked for caller hmac_drbg_generate, hmac_drbg_reseed

Chain of evidence

  1. Published image
    trezor-t1b1-1.14.3.bin, sha256 617f97211c1e605edc3dc2ebcf00e162f086ab13d596b37acf0932da7e3c748a
  2. Header
    the signed header's code hashes match the code
  3. Source
    trezor/trezor-firmware, tag legacy/v1.14.3, commit 4289e23b317e…, the commit the vendor names for this release
  4. Reproducible build
    the vendor's own build reproduces the published image byte for byte, signatures aside
  5. Source bundle
    139 C/assembly units linked into the image; 120 linked inputs have no C source (Rust, toolchain libraries); toolchain: arm-none-eabi-gcc (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 13.3.1 20240614
  6. Extraction
    code at 0x8010400, 504,024 bytes; every published byte is accounted for
  7. Verification
    cverif 0.1.4 on the published bytes: 753 of 1,264 functions proved, 5 flag group(s)

Findings

lowtiming leak32x32->64 multiplies of secret limbs: UMULL/UMLAL are variable time on the Cortex-M3
Trezor One runs on an STM32F205 (Cortex-M3). The Cortex-M3 Technical Reference Manual's instruction timings give UMULL/SMULL 3-5 cycles and UMLAL/SMLAL 4-7, terminating early depending on the size of the source operands (below 64K in magnitude). This is cverif's timing model too. The multi-precision code feeds secret limbs straight into these instructions: bn_multiply (bn_multiply_long, bignum.c:570: umlal r3, r5, lr, ip at 0x80348ac, with lr = k->val[j] and ip = x->val[i-j]; checked for tc_ecdsa_sign_digest, which multiplies by the private key and the nonce); curve25519_mul (curve25519-donna-32bit.c:192, umull r1, r4, r2, sl at 0x8037ea0) and curve25519_square (:285), used by X25519 (curve25519_scalarmult_donna) and Ed25519; and libsecp256k1's secp256k1_scalar_mul_512 (scalar_8x32_impl.h:553, umull at 0x801296c; through secp256k1_scalar_mul, the s = k^-1(m + r*d) of ECDSA signing). So timing depends on secrets in principle. In practice it's small: one or two cycles on a multiply, only when an operand limb is below 2^16. For uniformly random 29-bit (bignum256), 25/26-bit (donna) or 32-bit (scalar 8x32) limbs, that is about 2^-13, 2^-10 or 2^-16 per limb. An attack exploiting it is not established here. It's a property of the core with this C, not a compiler artefact.
ct-triage · confidence high · ct-umull
lowtiming leaksecp256k1 field arithmetic is ARM assembly (UMULL/UMLAL) that cverif doesn't check
Trezor One builds libsecp256k1 with USE_EXTERNAL_ASM: secp256k1_fe_mul_inner and secp256k1_fe_sqr_inner are src/asm/field_10x26_arm.s (174 umlal, 25 umull, 4 mla). cverif rejects that file (ldr r7, [r1, #0*4]: an expression as immediate, issue 27), so it verifies neither its equivalence nor its timing, and reports secp256k1_gej_rescale's call to secp256k1_fe_sqr_inner as "not checked as constant time" (field_10x26_impl.h:1011, call at 0x8015b34). The call squares ctx->proj_blind (the random projective blinding) and multiplies the coordinates of a point derived from the secret scalar (ecmult_gen_impl.h:261). The field multiplications of secp256k1_ecmult_gen (gej_add_ge, gej_double, ...) go through the same assembly with operands derived from the secret, on 26-bit limbs. On the Cortex-M3 that is the variable-time multiply of ct-umull. Confidence is medium: inferred from the instructions of the assembly and the TRM, not proved by cverif. secp256k1_ecmult_gen, secp256k1_ec_pubkey_create_helper, secp256k1_ec_pubkey_create and secp256k1_keypair_create inherit this.
ct-triage · confidence medium · ct-field-asm
infoThe published firmware reproduces
build-docker.sh --models T1B1 --skip-bitcoinonly legacy/v1.14.3 gives the published image once its signatures are zeroed; the tag resolves to the commit releases.json names (4289e23b). The instrumented rebuild (compiler calls logged) is byte-identical to it.
reproducibility · confidence high · reproducible
infotrezor-crypto is built with -ftrivial-auto-var-init=zero
All 50 trezor-crypto units are compiled with -ftrivial-auto-var-init=zero: GCC zero-fills every local the source leaves uninitialised (a hardening measure: no stale secrets in fresh stack frames). cverif does not model the flag (issue 20), so functions with an uninitialised VLA get a false mismatch on the extra memset.
coverage · confidence high · cverif issue 20 · auto-var-init
infoTwo static functions named erase_sector
norcow.c (flag group 0) and flash_area.c (flag group 1) each define a static erase_sector; GCC inlined flash_area.c's, so the binary's only erase_sector (0x8049934, .text.erase_sector from norcow.o in the link map) is norcow.c's, which group 0 proves. Group 1 compared it with flash_area.c's source and reported a mismatch (binary returns without executing svc 0). verify.py now keeps, for a function two groups report, the result of the group holding the unit the link map names (from 2026-12-05).
coverage · confidence high · static-same-name
infocverif false alarmmemzero ends in newlib's explicit_bzero, which cverif doesn't know
memzero (trezor-crypto/memzero.c:55, HAVE_EXPLICIT_BZERO) ends with b.w explicit_bzero at 0x80378b8; newlib's explicit_bzero (0x80513e8) is b.w bzero, and bzero (0x80579b4) is mov r2, r1; movs r1, #0; b.w memset. newlib's memset (0x8052338, libc_a-memset.o) branches only on the pointer's alignment and the length, and never reads the bytes it overwrites. cverif trusts memset by name but has no source for explicit_bzero and doesn't follow the tail calls, so every caller that wipes a secret is reported (sha256_Final/sha512_Final: "the call to explicit_bzero may read secrets"), and the report propagates to every marked function that calls memzero. cverif reports the first violation it finds in each function; some of these have others behind this one (the Ed25519 functions also reach curve25519_mul, see ct-umull).
ct-triage · confidence high · cverif issue 35 · ct-explicit-bzero
infocverif false alarmPublic data in memory treated as secret once secrets are anywhere in memory
When a caller has left secrets in memory a helper can read, or after a call that stored secrets outside its own frame, cverif treats every byte of memory as secret (cverif's constant-time documentation, "Functions given secrets"). That flags branches on public data. (1) SHA-2: sha256_Update branches on usedspace = (context->bitcount >> 3) % 64 (sha2.c:860; ldr r3, [r0, #32] then tst.w r3, #504 at 0x803f7f8), sha512_Update the same on bitcount[0] (sha2.c:1174, ldr r3, [r0, #64] at 0x804020c), and sha512_Raw on the carry of ADDINC128(bitcount, ...) (sha2.c:1217, adds/adcs/bcs at 0x8040506). The bit count holds only the lengths hashed, which are public. hmac_sha256 and hmac_sha512 inherit this. (2) tc_ecdsa_sign_digest (ecdsa.c:698, bne at 0x80360d4) branches on bn_is_zero(&z), where z is read from the digest (public, bn_read_be(digest) at 0x80360c8) after the call to init_rfc6979; ecdsa_sign_digest inherits this. (3) nonce_function_bip340 (schnorrsig/main_impl.h:85) branches on secp256k1_memcmp_var(algo, bip340_algo, 13), a comparison of two public constants. (4) secp256k1_ecmult_const (ecmult_const_impl.h:200) branches on secp256k1_ge_is_infinity(a) (witness a+0x50, the infinity flag), the ECDH peer's public point, which upstream documents as allowed to be variable time. Two of these have a real issue behind the reported one: tc_ecdsa_sign_digest and ecdsa_sign_digest also give the key to bn_multiply (ct-umull).
ct-triage · confidence high · cverif issue 34 · ct-coarse-memory
infocverif false alarmsha3_Update: the canary's __stack_chk_fail call seen as a call given a secret pointer
At 0x8041014 (sha3.c:338), sha3_Update's epilogue compares the canary and, on mismatch, calls bl __stack_chk_fail while r1 still holds the data pointer (secret for keccak_512's callers). __stack_chk_fail(void) takes no arguments, never returns, and runs only when the canary was overwritten. cverif treats the call as one given a pointer to secret memory, despite its stack-protector assumption. keccak_512 inherits this.
ct-triage · confidence high · cverif issue 36 · ct-canary-call
inforeveals by designPrivate-key and scalar range checks
These branch on whether the secret scalar is in range, then return an error: point_multiply on !bn_is_less(k, &curve->order) (ecdsa.c:416, beq at 0x8035f98); ecdh_multiply (ecdsa.c:647: bn_read_be(priv_key), bn_is_zero, cbnz at 0x8037222), and ecdsa_get_public_key33/65 (tc_ecdsa_get_public_key33/65 inlined, ecdsa.c:796/822) on bn_is_zero(&k) || !bn_is_less(&k, &curve->order). bn_is_zero and bn_is_less compute the verdict without branching (checked as helpers, no violation). The branch reveals only whether the key is 0 or at least n, which a valid key never is, and the function returns that verdict to its caller anyway.
ct-triage · confidence high · ct-key-validity
infocverif false alarmzkp_* wrappers call secp256k1 entry points verified in another flag group
zkp_ecdsa.c and zkp_bip340.c (flag group 0) call secp256k1_ec_pubkey_create, secp256k1_keypair_create, secp256k1_ecdsa_sign_recoverable and secp256k1_ecdh, which ct/secp256k1-zkp.ct marks, but whose source is secp256k1.c in flag group 4. Each group's ct.nm holds only its own marks, so in group 0 the callee is "not known to be constant time". This is a limit of the flag-group split here, not of the code. Re-running zkp_ecdsa_get_public_key33 with group 0's marks plus secp256k1_ec_pubkey_create ct=*2 makes cverif accept the call: the next report is the branch on the callee's return value (zkp_ecdsa.c:85, whether the key was valid, a ct-key-validity case). The callees' own results are in group 4: ct-field-asm for the key derivations, ct-indirect-callback for signing and ECDH.
ct-triage · confidence high · ct-cross-group
infocverif false alarmlibsecp256k1 hands the secret to a caller-supplied callback
secp256k1_ecdh passes the shared point's coordinates to hashfp (ecdh/main_impl.h:63), and secp256k1_ecdsa_sign_inner passes the key to noncefp (secp256k1.c:540, call at 0x8017cf4). Both are function pointers, so cverif can't check the target. Giving them the secret is the API's purpose. Trezor passes plain_hash_function (zkp_ecdsa.c:412: output[0] = 4, two memcpy) and secp256k1_nonce_function_rfc6979 (zkp_ecdsa.c:229, RFC 6979 HMAC-SHA256). Confidence is medium: nonce_function_rfc6979 was not itself checked as constant time here (it is BOUNDED at the time limit).
ct-triage · confidence medium · ct-indirect-callback
infomark too broadTaproot tweak marked secret, but it's a hash of the public key
ct/secp256k1-zkp.ct marks secp256k1_keypair_xonly_tweak_add ct=*1,*2, the tweak included. Trezor's only caller, zkp_bip340_tweak_private_key (zkp_bip340.c:343), computes the tweak as TaggedHash("TapTweak", internal public key || root hash) (zkp_bip340.c:330-337), which is public. Upstream tweaks the public key with the variable-time secp256k1_ecmult on that basis (eckey_impl.h:65), and keeps the secret-key tweak constant time (secp256k1_ec_seckey_tweak_add_helper). So secp256k1_ec_pubkey_tweak_add_helper's branch on the tweak's overflow (secp256k1.c:692) and secp256k1_ecmult's on secp256k1_scalar_is_zero (ecmult_impl.h:270) are expected. Fix the spec: ct=*1.
ct-triage · confidence high · ct-public-tweak
infomark too broadAES branches on the key schedule's round count
aes_encrypt (aescrypt.c:104, beq at 0x8043e42) and aes_decrypt (aescrypt.c:239, beq at 0x8044134) return EXIT_FAILURE unless cx->inf.b[0] (byte 240 of the context, the witness) is 10, 12 or 14 times 16: the round count the key schedule stores, set by the key length, and public. The round loops and the key-schedule offset depend on that count too. aes_cbc_encrypt (aes_modes.c:354) and aes_cbc_decrypt (aes_modes.c:447) branch on the cipher's status, which depends only on that count. The spec marks the whole context secret, this public byte included (as in results/trezor/t3t1/2.13.1, ct-aes-encrypt-length).
ct-triage · confidence high · ct-aes-cbc-status
inforeveals by designBIP-340: branches on the parity of the public key's Y
BIP-340 negates the secret key when the public point has an odd Y, and upstream libsecp256k1 branches on that parity: secp256k1_extrakeys_ge_even_y (extrakeys/main_impl.h:92, witness r->y.n[0]), its caller secp256k1_keypair_xonly_tweak_add (extrakeys/main_impl.h:269), and secp256k1_schnorrsig_sign_internal (schnorrsig/main_impl.h:161, secp256k1_fe_is_odd(&pk.y), witness pk+40; secp256k1_schnorrsig_sign32 inherits this). The parity is part of the public key, published with every compressed key, so revealing it reveals nothing.
ct-triage · confidence high · ct-xonly-parity
infocverif false alarmStack canary check reported as an extra call to __stack_chk_fail
Every unit is built with -fstack-protector-all; __stack_chk_guard is a linker symbol (0x2001fff8) set at boot. Each epilogue loads it, compares it with the frame's copy and calls __stack_chk_fail if they differ; cverif 0.1.3 still reports the call (issue 16). The one initialised-data object reported as differing is __stack_chk_guard itself: "object at 0x2001fff8 is outside the image", a RAM address defined by the linker script, with nothing in the image to compare.
mismatch-triage · confidence high · covers 158 mismatches · cverif issue 16 · stack-protector
infocverif false alarmThe canary call named memzero in the group that defines __stack_chk_fail
In flag group 1 (which holds setup.c, where __stack_chk_fail is defined), cverif names the canary's bl __stack_chk_fail as a call to memzero (issue 19). None of these functions calls memzero: in each the only call besides the source's is bl 0x804c7e8 <__stack_chk_fail> in the epilogue (checked in the disassembly of all 13).
mismatch-triage · confidence high · covers 13 mismatches · cverif issue 19 · stack-protector-misnamed
infocverif false alarmZero-fill of uninitialised locals (-ftrivial-auto-var-init=zero)
The binary zero-fills, with memset, the locals the source leaves uninitialised, as -ftrivial-auto-var-init=zero requires: the VLAs of b58tobin (outi[outisz]), base58_encode_check (buf[datalen + 32]), base58_decode_check (d[datalen + 4]), and the ALIGN(16) ge25519 points and bignums of the ed25519 functions (curve25519_scalarmult_basepoint starts with four memset calls: s, yplusz, zminusy, p; ed25519_sign_ext* with five). The counterexamples are a call made before the source writes the local (yplusz at the aligned frame's offset 208 when memzero(&s, ...) runs), where the source's bytes are unspecified and the binary's are zero. The calls are otherwise the source's, in its order.
mismatch-triage · confidence high · covers 8 mismatches · cverif issue 20 · auto-var-init-memset
infocverif false alarmLibrary calls treated as writing memory (strlen, memcmp)
GCC knows strlen writes no memory and returns the same value for an unchanged string; cverif treats it as any call (issue 21). recovery_word: recovery_scrambledword (inlined) computes strlen(word) and calls memcpy(buffer, word, strlen(word)); the binary calls strlen once. webusb_control_vendor_request: the binary loads webusb_https_url once (ldr r4 at 0x804f66a) and passes it to both strlen and memcpy; in the counterexample the static changes during strlen (0xd7660005 → 0x528a0000). render_address_dialog: coin->cashaddr_prefix is kept in r9 across strlen and passed to strncmp (0x8024072–0x802408a); the source reads it again, and in the counterexample strlen changed it. tx_input_verify_nonownership: the binary loads txinput->ownership_proof.size once (ldrh sl at 0x8022ce0) and tests it after the first memcmp; the source reads it again, and in the counterexample memcmp changed it (>= 4 before, < 6 after), so the source returns early where the binary goes on to the second memcmp.
mismatch-triage · confidence high · covers 4 mismatches · cverif issue 21 · strlen-reused
infocverif false alarm__atomic built-ins expanded inline
zkp_context.c guards the secp256k1 context with __atomic_test_and_set / __atomic_clear; GCC expands them to dmb and exclusive loads/stores, which cverif compares with calls (issue 22).
mismatch-triage · confidence high · covers 4 mismatches · cverif issue 22 · atomics
infocverif false alarmFlash write read-back seen as a read of a volatile object
flash_write_byte/_word/_block (legacy/flash.c) write through a volatile pointer and then check *address != data through the plain pointer; the binary does that read. cverif counts it as an access to the volatile object the source does not make, as in issue 3: the source does read the same bytes, as a plain access.
mismatch-triage · confidence medium · covers 3 mismatches · cverif issue 3 · flash-readback
infounspecified in Cflash_area_erase: counterexample reads subarea[4] of a 4-element array
The counterexample has area->num_subareas == 5 (the path in cverif's explanation takes the loop at flash_area.c:261 five times), so the source reads area->subarea[4], past flash_subarea_t subarea[4]: undefined behaviour, from which GCC may assume at most 4 iterations. Every flash_area_t in the firmware has at most 4 sub-areas.
mismatch-triage · confidence high · covers 1 mismatch · flash-area-oob
infocverif false alarmCounterexample points an argument at __stack_chk_guard
In each counterexample a pointer argument points into __stack_chk_guard (0x2001fff8, a linker-script address): key == 0x2001ffdc, session == 0x2001ff92, out == 0x2001fffb, norcow_version == 0x2001fff8, len == 0x2001fffa, r == 0x2001fff8, .... The source's stores through it overwrite the canary, the binary's epilogue check fails and calls __stack_chk_fail (named memzero in flag group 1, issue 19). No caller can pass the address of the guard, an object the compiler introduces (issue 23); every path's binary condition compares *(u32 *)0x2001fff8. In get_features the pointer (resp, 0x2001ffa9–0x2001ffac) lands on the function's own copy of the canary in its frame, which no caller can point at either.
mismatch-triage · confidence high · covers 13 mismatches · cverif issue 23 · canary-alias
infocverif false alarmsecp256k1_ecmult_odd_multiples_table specialised for its callers
The static function's two callers pass ECMULT_TABLE_SIZE(WINDOW_A) and ECMULT_CONST_TABLE_SIZE (1L << (w - 2), at least 8); GCC compiled the loop for n >= 2. cverif's counterexample has n = 0x80000000 (negative), where the source skips the loop (issue 12: 0.1.2 fits static functions to array lengths their callers pass, not to shifted constants).
mismatch-triage · confidence high · covers 1 mismatch · cverif issue 12 · ecmult-table-size
infocverif false alarmu2fhid_read_start: `= {0}` of a 7.6 KB local done by memset
U2F_ReadBuffer readbuffer = {0}; memzero(&readbuffer, sizeof(readbuffer)); (u2f.c:187): the binary calls memset(sp+4, 0, 7624), then memzero(sp+4, 7624) (0x802e482–0x802e498), the source's two steps in its order. cverif expects no call for the initializer and reports the memset where the source calls explicit_bzero (issue 29).
mismatch-triage · confidence high · covers 1 mismatch · cverif issue 29 · zero-init-memset
infounspecified in Cpoly1305_update: counterexample has leftover >= 16
The path has st->leftover != 0 and bytes < 16 - st->leftover with the subtraction wrapping, i.e. leftover > 16: then st->buffer[st->leftover + i] writes past the 16-byte buffer (undefined behaviour), and the binary's equivalent test bytes + leftover >= 16 decides otherwise. leftover is only ever stored as 0 or a count below 16 (poly1305-donna.c).
mismatch-triage · confidence medium · covers 1 mismatch · poly1305-leftover

Functions

Every function of the image cverif compared with its source. Bounded: no difference within the explored paths, not a proof. Unsupported/inconclusive: a construct cverif doesn't model yet.

FunctionStatusBytesDetail
barrett_reduce256_modm
0x8039140
mismatch1428binary calls __stack_chk_fail, which the source does not call at this point
decode_basic_field
0x804b094
mismatch904binary calls __stack_chk_fail, which the source does not call at this point
usb_standard_get_descriptor
0x804f098
mismatch760binary calls memzero, which the source does not call at this point
curve25519_contract
0x80389ec
mismatch668binary calls __stack_chk_fail, which the source does not call at this point
groestl_big_core
0x804355c
mismatch664binary calls __stack_chk_fail, which the source does not call at this point
bn_format
0x8035014
mismatch612binary calls __stack_chk_fail, which the source does not call at this point
decode_field
0x804b41c
mismatch592binary calls __stack_chk_fail, which the source does not call at this point
recovery_word
0x8026874
mismatch584binary calls memcpy where the source is calling strlen
secp256k1_modinv32_normalize_30
0x80110c8
mismatch572binary calls __stack_chk_fail, which the source does not call at this point
tx_input_verify_nonownership
0x8022cd8
mismatch508binary calls memcmp, which the source does not call at this point
point_add
0x803580c
mismatch492binary calls __stack_chk_fail, which the source does not call at this point
expand256_modm
0x8039bcc
mismatch464binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_gej_add_zinv_var
0x801679c
mismatch460binary calls __stack_chk_fail, which the source does not call at this point
get_features
0x801cc5c
mismatch444binary calls __stack_chk_fail where the source is calling memory_bootloader_hash
secp256k1_gej_add_ge_var
0x8016508
mismatch436binary calls __stack_chk_fail, which the source does not call at this point
poly1305_finish
0x80453c0
mismatch416binary calls __stack_chk_fail, which the source does not call at this point
u2fhid_read_start
0x802e468
mismatch412binary calls memset where the source is calling explicit_bzero
bech32_decode
0x803ebc8
mismatch356binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_ecdsa_recover
0x8018b84
mismatch352binary calls __stack_chk_fail, which the source does not call at this point
b58tobin
0x803e604
mismatch352binary calls memset where the source is calling strlen
secp256k1_fe_impl_normalize
0x80115e8
mismatch
CT inconclusive
336binary calls __stack_chk_fail, which the source does not call at this point
encode_field
0x804c14c
mismatch336binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_fe_impl_normalize_var
0x80117ec
mismatch
CT inconclusive
332binary calls __stack_chk_fail, which the source does not call at this point
nem_canonicalizeMosaics
0x80317b8
mismatch328binary calls __stack_chk_fail, which the source does not call at this point
ed25519_sign_ext
0x803adb0
mismatch
CT inconclusive
328memory at call #1 to explicit_bzero: 4-byte value stored at (16*zext32((SP0 - 833)[31:4]) + 160): source gives 0x10003f00, binary gives 0x0 for r0=0x347feafe r2=0x5f7ffbff r3=0x7ffdfffe stk0=0xf7cfff27 mem[0x82ffe30]=0x00 mem[0x82ffe31]=0x3f mem[0x82ffe32]=0x00 mem[0x82ffe33]=0x10 mem[0x20002678]=0x3f mem[0x20002679]=0x3f mem[0x2000267a]=0x3f mem[0x2000267b]=0x3f
ed25519_sign_ext_sha3
0x803b638
mismatch328memory at call #1 to explicit_bzero: 4-byte value stored at (16*zext32((SP0 - 1025)[31:4]) + 160): source gives 0x87b0000, binary gives 0x0 for r0=0x3f79284e r2=0x4bc898de r3=0x5fc800df stk0=0x5fd91e27 mem[0x20002678]=0x7b mem[0x20002679]=0xfb mem[0x2000267a]=0x7b mem[0x2000267b]=0x7b mem[0x200026f0]=0x7b mem[0x200026f1]=0x7b mem[0x200026f2]=0x7b mem[0x200026f3]=0x7b
ed25519_sign_ext_keccak
0x803b8e0
mismatch
CT inconclusive
328memory at call #1 to explicit_bzero: 4-byte value stored at (16*zext32((SP0 - 1025)[31:4]) + 160): source gives 0x87b0000, binary gives 0x0 for r0=0x3f79284e r2=0x4bc898de r3=0x5fc800df stk0=0x5fd91e27 mem[0x20002678]=0x7b mem[0x20002679]=0xfb mem[0x2000267a]=0x7b mem[0x2000267b]=0x7b mem[0x200026f0]=0x7b mem[0x200026f1]=0x7b mem[0x200026f2]=0x7b mem[0x200026f3]=0x7b
msg_read_common
0x801aa7c
mismatch324binary calls __stack_chk_fail, which the source does not call at this point
hdnode_from_seed
0x803d324
mismatch320binary calls __stack_chk_fail, which the source does not call at this point
render_address_dialog
0x8024058
mismatch316argument 2 of call #2 to strncmp: source gives 0x0, binary gives 0x40000000 for r0=0x80000268 r1=0xc0000006 r2=0xc0000006 r3=0x60000006 ret0:strlen=0x35 ret1:split_message=0x40093774 ret1:strncmp=0x80000000 ret2:strlen=0x25 ret3:split_message=0xd19993a0 stk0=0x80000000 mem[0x20002678]=0xeb mem[0x20002679]=0x6a mem[0x2000267a]=0xab mem[0x2000267b]=0x42 mem[0x200026f0]=0xab mem[0x200026f1]=0xe2 mem[0x200026f2]=0x3a mem[0x200026f3]=0x40
reduce256_modm
0x8039008
mismatch312binary calls __stack_chk_fail, which the source does not call at this point
u2fhid_read
0x802e604
mismatch300binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_fe_impl_set_b32_mod
0x8011b28
mismatch296binary calls __stack_chk_fail, which the source does not call at this point
usb21_standard_get_descriptor
0x804ebc8
mismatch292binary calls memzero, which the source does not call at this point
flash_area_erase
0x804faa8
mismatch288argument 2 of call #1 to <indirect call>: source gives 0x1, binary gives 0x0 for r0=0x10012 r1=0xa68001cc mem[0x10014]=0x00 mem[0x10015]=0x00 mem[0x10018]=0x00 mem[0x10019]=0x00 mem[0x1001c]=0x00 mem[0x1001d]=0x00 mem[0x10020]=0x00 mem[0x10021]=0x00
secp256k1_fe_impl_get_b32
0x8011cd0
mismatch
CT inconclusive
280binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_scalar_negate
0x8012778
mismatch
CT inconclusive
268binary calls __stack_chk_fail, which the source does not call at this point
curve25519_sub_after_basic
0x8037c48
mismatch264binary calls __stack_chk_fail, which the source does not call at this point
hasher_InitParam
0x8043a4c
mismatch264binary calls __stack_chk_fail, which the source does not call at this point
load_descriptor_values
0x804a634
mismatch252binary calls __stack_chk_fail, which the source does not call at this point
svc_handler_main
0x804ea20
mismatch248binary calls memzero, which the source does not call at this point
secp256k1_fe_impl_half
0x8011ffc
mismatch244binary calls __stack_chk_fail, which the source does not call at this point
curve25519_scalar_product
0x8037b54
mismatch
CT inconclusive
244binary calls __stack_chk_fail, which the source does not call at this point
curve25519_scalarmult_basepoint
0x803b1c4
mismatch
CT inconclusive
244memory at call #1 to explicit_bzero: 4-byte value stored at (16*zext32((SP0 - 337)[31:4]) + 208): source gives 0x5944cf3c, binary gives 0x0 for r0=0xdf8fe002 r1=0x801fb638 mem[0x20002678]=0x7c mem[0x20002679]=0x4c mem[0x2000267a]=0x50 mem[0x2000267b]=0x30 mem[0x200026f0]=0x44 mem[0x200026f1]=0xcc mem[0x200026f2]=0xc6 mem[0x200026f3]=0x44
secp256k1_ec_pubkey_serialize
0x80183e4
mismatch240binary calls __stack_chk_fail, which the source does not call at this point
qrcodegen_encodeText
0x804763c
mismatch240binary calls __stack_chk_fail, which the source does not call at this point
norcow_next_counter
0x804a4f8
mismatch240binary calls __stack_chk_fail, which the source does not call at this point
expand_raw256_modm
0x8039d9c
mismatch228binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_ecmult_odd_multiples_table
0x80166bc
mismatch224binary calls secp256k1_fe_sqr_inner where the source is calling secp256k1_fe_mul_inner
curve25519_swap_conditional
0x8038c88
mismatch
CT inconclusive
220binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_ge_set_gej_var
0x8016a0c
mismatch212binary calls __stack_chk_fail, which the source does not call at this point
curve25519_sub
0x8037a80
mismatch
CT inconclusive
212binary calls __stack_chk_fail, which the source does not call at this point
base32_8to5
0x803e2e0
mismatch212return value: source gives 0x0, binary gives 0x1 for r0=0x7 r2=0x0 r3=0x0 mem[0x7]=0x00 mem[0x8]=0x00 mem[0x9]=0x00 mem[0xa]=0x00 mem[0xb]=0x00 mem[0xc]=0x00 mem[0xd]=0x00 mem[0xe]=0x00
ed25519_cosi_combine_publickeys
0x803b0f4
mismatch208binary calls __stack_chk_fail, which the source does not call at this point
curve25519_add_after_basic
0x8037988
mismatch204binary calls __stack_chk_fail, which the source does not call at this point
curve25519_neg
0x8037d7c
mismatch204binary calls __stack_chk_fail, which the source does not call at this point
norcow_init
0x804a018
mismatch204binary calls __stack_chk_fail where the source is calling flash_area_get_address
secp256k1_ecdsa_recoverable_signature_parse_compact
0x8018970
mismatch200binary calls __stack_chk_fail, which the source does not call at this point
ecdsa_sig_from_der
0x8036c8c
mismatch196binary calls __stack_chk_fail, which the source does not call at this point
contract256_window4_modm
0x8039f94
mismatch196binary calls __stack_chk_fail, which the source does not call at this point
pb_decode_varint32_eof
0x804abac
mismatch196binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_gej_double
0x8015b7c
mismatch
CT inconclusive
184binary calls __stack_chk_fail where the source is calling secp256k1_fe_sqr_inner
poly1305_init
0x8045308
mismatch
CT inconclusive
184binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_fe_impl_normalize_weak
0x8011738
mismatch180binary calls __stack_chk_fail, which the source does not call at this point
add256_modm
0x80396d4
mismatch180binary calls __stack_chk_fail, which the source does not call at this point
ed25519_scalarmult_keccak
0x803ba80
mismatch180memory at call #1 to explicit_bzero: 4-byte value stored at (16*zext32((SP0 - 441)[31:4]) + 160): source gives 0x71200000, binary gives 0x0 for r0=0xd3bcff21 r1=0xbffc4d62 r2=0xddedfce2 ret5:ge25519_unpack_negative_vartime=0x0 mem[0x20002678]=0x20 mem[0x20002679]=0x60 mem[0x2000267a]=0x30 mem[0x2000267b]=0x20 mem[0x200026f0]=0xbb mem[0x200026f1]=0xaa mem[0x200026f2]=0x3a mem[0x200026f3]=0x20
blake256_Update
0x8041788
mismatch180binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_scalar_reduce
0x8012578
mismatch
CT inconclusive
176binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_fe_from_signed30
0x8012298
mismatch172binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_fe_to_signed30
0x8012344
mismatch172binary calls __stack_chk_fail, which the source does not call at this point
base32_5to8
0x803e18c
mismatch172binary calls __stack_chk_fail, which the source does not call at this point
pb_skip_field
0x804ae44
mismatch172binary calls __stack_chk_fail, which the source does not call at this point
base32_8to5_raw
0x803e238
mismatch168binary calls __stack_chk_fail, which the source does not call at this point
base58_encode_check
0x803e908
mismatch160binary calls memset where the source is calling memcpy
base58_decode_check
0x803e9a8
mismatch160binary calls memset where the source is calling strlen
secp256k1_fe_impl_from_storage
0x80121fc
mismatch156binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_scalar_to_signed30
0x80135a0
mismatch
CT inconclusive
156binary calls __stack_chk_fail, which the source does not call at this point
tx_serialize_output
0x8022748
mismatch156binary calls __stack_chk_fail where the source is calling memcpy
curve25519_expand
0x8038950
mismatch
CT inconclusive
156binary calls __stack_chk_fail, which the source does not call at this point
poly1305_update
0x8045560
mismatch156memory at return: 4-byte value stored at (r0 + 20): source gives 0xd10e3933, binary gives 0xa1fe88 for r0=0xffffffc4 r1=0x3fffffff r2=0x1 mem[0x0]=0x17 mem[0x1]=0xfa mem[0x2]=0x8f mem[0x3]=0xbb mem[0x4]=0x0a mem[0x5]=0xf0 mem[0x6]=0xfa mem[0x7]=0xff
pb_read
0x804ac70
mismatch152binary calls __stack_chk_fail, which the source does not call at this point
blake2s_init_param
0x8042ff4
mismatch148binary calls __stack_chk_fail, which the source does not call at this point
random_buffer
0x804e98c
mismatch148binary calls memzero, which the source does not call at this point
secp256k1_fe_impl_negate_unchecked
0x8011de8
mismatch
CT inconclusive
144binary calls __stack_chk_fail, which the source does not call at this point
ripemd160_process
0x803f3c8
mismatch144binary calls __stack_chk_fail, which the source does not call at this point
read_item
0x8049aa4
mismatch144binary calls __stack_chk_fail, which the source does not call at this point
winusb_control_vendor_request
0x804f784
mismatch144binary calls memzero, which the source does not call at this point
secp256k1_scalar_set_b32
0x8012628
mismatch
CT inconclusive
140binary calls __stack_chk_fail, which the source does not call at this point
pb_decode_varint
0x804ad70
mismatch140binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_ge_to_bytes
0x8015818
mismatch
CT inconclusive
136binary calls __stack_chk_fail, which the source does not call at this point
format_number
0x8025ee0
mismatch136binary calls __stack_chk_fail, which the source does not call at this point
bn_multiply_reduce_step
0x803491c
mismatch136binary calls __stack_chk_fail, which the source does not call at this point
blake256_Init
0x8041704
mismatch132binary calls __stack_chk_fail, which the source does not call at this point
webusb_control_vendor_request
0x804f624
mismatch132argument 2 of call #2 to memcpy: source gives 0x528a0000, binary gives 0xd7660005 for r0=0x455fc r1=0x1f260fe4 r2=0x1f260fe0 r3=0xcee00006 ret1:memcpy=0x1 stk0=0x7febefe7 mem[0x1f260fe0]=0xfe mem[0x1f260fe1]=0xff mem[0x1f260fe2]=0xff mem[0x1f260fe3]=0xff mem[0x1f260fe5]=0x01 mem[0x1f260fe6]=0x01 mem[0x1f260fe7]=0x00 mem[0x1f260fe8]=0x02
secp256k1_scalar_from_signed30
0x8013520
mismatch
CT inconclusive
128binary calls __stack_chk_fail, which the source does not call at this point
secp256k1_keypair_load
0x8015984
mismatch
CT inconclusive
128binary calls __stack_chk_fail where the source is calling <indirect call>
u2fhid_init_cmd
0x802d914
mismatch128binary calls __stack_chk_fail, which the source does not call at this point
blake2b_init_param
0x8041d74
mismatch128binary calls __stack_chk_fail, which the source does not call at this point
usb_standard_set_interface
0x804f018
mismatch128binary calls memzero, which the source does not call at this point
secp256k1_fe_impl_to_storage
0x8012180
mismatch124binary calls __stack_chk_fail, which the source does not call at this point

Showing 100 of 1264.

Raw results

Results are produced by scripts anyone can re-run. MIT licensed.