1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 00:28:10 +00:00
Commit Graph

610 Commits

Author SHA1 Message Date
Dusan Klinec
5708a7257f ed25519-donna/modm: comment typo fix 2018-04-30 23:55:11 +01:00
Pavol Rusnak
1adcaea9cd
remove debug printfs from test_check_cashaddr 2018-04-23 15:20:01 +01:00
Yura Pakhuchiy
bd81c2c6e7 Groestl hash: remove even more dead code 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
c861ad8bbc Groestl hash: more cleanups 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
f15605bd45 Groestl hash: fix -Wshadow warnings 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
9e08e8ce63 Groestl hash cleanup
- Remove unused code
- Remove x86 specific optimizations (to test code which closer to ARM on
emulator)
- Fix -Wundef warnings
2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
e7281cf9f5 Add GRS curve 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
5cb15e3420 Add tests for GRS addresses 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
08512053c4 Groestl hash: do it twice and truncate to 256 bits 2018-04-23 16:15:59 +02:00
Yura Pakhuchiy
2fdcebfbb6 Add Groestl hash 2018-04-23 16:15:59 +02:00
onvej-sl
8b61a7e365 python3 migration (#149) 2018-04-05 16:02:07 +02:00
Pavol Rusnak
7ea31aecf7
use python3 in travis 2018-04-05 14:52:59 +02:00
Pavol Rusnak
7111431890
move tests into tests/ 2018-04-05 13:26:59 +02:00
Pavol Rusnak
e81fb38ab4
fix cashaddr test 2018-04-05 11:53:00 +02:00
Jochen Hoenicke
e65adcf5ca Added cashaddr support (#120)
The new bitcoincash address format.
2018-04-05 11:15:05 +02:00
Jochen Hoenicke
c61ab76ad7 Reworked bn_format.
- Fix off-by-one in buffer size.
- Don't return uninitialized stack if number too large.
2018-04-05 09:24:41 +02:00
Jochen Hoenicke
9add21439a Adapted sha1 to match sha2 code.
Also fixes an unaligned uint32 access.
2018-04-05 09:24:41 +02:00
Jochen Hoenicke
2350bb015c Fix another undefined shift.
Note that `(1 << j)` is undefined for j == 31, so `(1u << j)` should be
used.
2018-04-05 09:24:41 +02:00
Peter D. Gray
b0af159096 bip32, options: optionally exclude 25519 curves in BIP32 support 2018-04-03 18:43:06 +02:00
Tomas Susanka
877998fa1a bip32/nem: IV is copied before encryption 2018-04-03 18:29:03 +02:00
Saleem Rashid
b9043659c5 test_openssl: Fix failing test 2018-04-03 18:28:06 +02:00
Saleem Rashid
c70e440128 hasher: Replace hasher_Double with HASHER_*D
This allows us to finely control when to use a single hash or a double hash in
various places. For example, Bitcoin signatures use double SHA256, but Decred
signatures use a single BLAKE256. However, both use double hashes for Base58.
2018-04-03 18:28:06 +02:00
Jochen Hoenicke
3d7d99a3e3 Fix out of bounds read
b58tobin needs to check if there are more leading zeros requested by
the address than there are available
2018-03-27 15:04:55 +02:00
Jochen Hoenicke
009850f6c9 Fixed undefined behavior
This fixes a shift by 32 and shifts on signed integer that overflow.
2018-03-27 15:04:55 +02:00
Tomas Susanka
49272f8d86 bip32/nem: added test data for encryption of block size multiple 2018-03-20 17:18:28 +01:00
Pavol Rusnak
2e528be1e9
add warning message to rand.c 2018-01-21 23:38:32 +01:00
Pavol Rusnak
bb4c3d0525
introduce and use memzero instead of explicit_bzero 2018-01-18 15:18:09 +01:00
Pavol Rusnak
b7f73ee3ff
use explicit_bzero 2018-01-16 19:41:27 +01:00
Pavol Rusnak
72841c4fa1
declare random_buffer as weak symbol 2018-01-15 18:28:02 +01:00
Pavol Rusnak
0d8a3beeaf
declare random32 always 2018-01-13 15:16:34 +01:00
Pavol Rusnak
b3f026c742
extern declaration of random32 2018-01-13 15:14:45 +01:00
Pavol Rusnak
46fa586b12
further work on making rand.{c,h} more global 2018-01-13 15:07:19 +01:00
Peter D. Gray
65e976d70c rand.c: platform depedenant code can be removed using CPP flag 2018-01-13 14:52:42 +01:00
Peter D. Gray
cb8c910a0c Makefile: simplify include path, move subdirs to where used in C files 2018-01-13 14:51:51 +01:00
Pavol Rusnak
a54c5fe89e
test_openssl: fix build with openssl 1.1.0+
OpenSSL 1.1.0 made R and S fields of ECDSA_SIG structure internal.
We need to use ECDSA_SIG_set0 function now. For some reason the test fails,
but previously the code was not even possible to compile with OpenSSL 1.1.0.

Still need to figure out why the test fails :-(
2018-01-07 21:51:33 +01:00
Pavol Rusnak
8d8bc9c762
bip39: use static modifier 2018-01-02 14:15:08 +01:00
Saleem Rashid
2782467555 blake256: Replace with working implementation 2017-12-23 13:45:36 +01:00
Saleem Rashid
74e74f5eed nem: Prevent underflow in NEM_DECRYPTED_SIZE 2017-12-16 00:18:26 +01:00
Saleem Rashid
44480ca15d nem: Fix NEM_ENCRYPTED_SIZE
Include the extra padding block for multiples of AES_BLOCK_SIZE
2017-12-16 00:18:26 +01:00
Saleem Rashid
d41556d7fc nem: Remove NEM_DECRYPTED_PAYLOAD_SIZE
It is broken and completely useless
2017-12-15 22:09:30 +01:00
Pavol Rusnak
921b59e1d8
blake256: add BLAKE256_BLOCK_LENGTH 2017-12-13 20:11:37 +01:00
Saleem Rashid
764cc4c6e8 bip32: Add secp256k1-decred 2017-12-10 20:07:13 +01:00
Saleem Rashid
136c62e970 bip32: Add curve to hdnode_deserialize 2017-12-10 20:07:13 +01:00
Saleem Rashid
b41f5407cc test_check: Attribute test vectors to Monero 2017-12-10 20:07:13 +01:00
Saleem Rashid
8e725f4d3e test_openssl: Fix SHA2 name conflict 2017-12-10 20:07:13 +01:00
Peter Banik
173c62f0f3 Fixed test suite to use generic hasher functions 2017-12-10 20:07:13 +01:00
Saleem Rashid
6b813bc473 hasher: Add HASHER_BLAKE 2017-12-10 20:07:13 +01:00
Saleem Rashid
7cdbec2d11 blake256: Initial commit 2017-12-10 20:07:13 +01:00
Saleem Rashid
b41a51805f Use hasher_Raw instead of sha256_Raw 2017-12-10 20:07:13 +01:00
Saleem Rashid
a70caa3dbc hasher: Initial commit 2017-12-10 20:07:13 +01:00