1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-20 23:09:13 +00:00
Commit Graph

84 Commits

Author SHA1 Message Date
arbitrarylink
f051225730 feat(core,legacy): add support for Ethereum 64-bit chain_id
* Changes from original PR

* Now that we are rejecting chain_ids of 0, we need to have the tests set the chain_ids to at least 1.

* Ran 'make gen' and uploaded changed files.

* Ran make style_check and fixed reported errors

* Added changelog files

* Reverted changes concerning chain_id 0 being rejected.

* Adds tests for MAX_CHAIN_ID and MAX_CHAIN_ID+1.  Also reverts MAX_CHAIN_ID to the previous value.

* Added missing whitespace around arithmetic operator.

Co-authored-by: Michael Hatton <michaelhatton@Michaels-Mini.fios-router.home>
2021-09-10 15:09:03 +02:00
Ondřej Vejpustek
4827969cc8 fix(crypto): unify function headers in sha2.c and sha2.h 2021-09-08 14:00:02 +02:00
Ondřej Vejpustek
10bc747dc6 fix(crypto): fix argument type of ed25519_hram() 2021-09-08 14:00:02 +02:00
Christian Reitter
ba8eb408ea crypto: new iteration of fuzz testing code, improved dictionary script, minor documentation changes 2021-08-05 17:03:04 +02:00
Christian Reitter
78f879aaf1 crypto: improve fuzz testing code, harnesses, documentation and scripts 2021-08-05 17:03:04 +02:00
Andrew Kozlik
c1843f9f9f style(legacy): Remove nested conditional operators. 2021-07-22 10:54:49 +02:00
Pavol Rusnak
f740515c85 fix(core,crypto): add more test cases from bip-173 2021-07-21 11:20:11 +02:00
Andrew Kozlik
ce18f4bc8a test(crypto): Add progressive tests for hash functions. 2021-06-11 20:22:42 +02:00
Andrew Kozlik
b2cc3bcb36 fix(crypto): Fix incorrect handling of empty input in blake256_Update(). 2021-06-11 20:22:42 +02:00
Adam R
c4bf522b31
feat(crypto): add extra BIP32 test (test vector #4) (#1646) 2021-06-03 15:37:23 +02:00
Ondřej Vejpustek
e1a5f42c81 feat(core): make chacha_drbg more robust 2021-05-21 13:42:53 +02:00
Pavol Rusnak
b04d5bd514 fix(crypto): use ck_assert_uint_eq where we compare unsigned values 2021-05-13 14:13:56 +02:00
xloem
e821104237
fix(crypto): update case of windows.h (#1560)
When building for windows on a case-sensitive system, mingw always comes with a lower-case windows.h
2021-04-08 14:16:23 +02:00
Fabien
9ef26c347e Add support for Schnorr crypto (BCH variant)
Support Schnorr signature and verification defined in
https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/2019-05-15-schnorr.md.

The implementation is based on https://github.com/Bitcoin-ABC/secp256k1
as well as the test vectors.
2021-03-09 14:22:56 +01:00
Pavol Rusnak
d6d1cd7b4c style(crypto): cleanup unused functions 2021-03-09 13:21:34 +01:00
Pavol Rusnak
93215ae3c7 style: reformat with clang-format 11 2021-01-04 14:40:16 +01:00
Rafael Korbas
edf9b4ee85 Refactor mnemonic_to_entropy to not (misleadingly) return checksum 2020-12-19 20:17:16 +01:00
Andrew Kozlik
b90ce7f2fc test(crypto): Add unit tests for ecdsa_sig_from_der(). 2020-12-17 16:33:33 +01:00
Andrew Kozlik
9f6d4ec538 chore(crypto): Implement DER signature parsing. 2020-12-17 16:33:33 +01:00
Pavol Rusnak
78be2c9cac fix(crypto): fix build on clang/arm64 2020-12-17 00:09:47 +01:00
Andrew Kozlik
acf7294ca2 test(crypto): Add more unit tests for invalid T9 prefix in SLIP39 word lookup. 2020-12-15 13:41:42 +01:00
Andrew Kozlik
55f3df6b0c chore(crypto): Rework SLIP-39 word lookup. 2020-12-15 13:41:42 +01:00
Andrew Kozlik
e3afd984ae test(crypto): Add SLIP39 word completion test. 2020-12-15 13:41:42 +01:00
Andrew Kozlik
e615fc6263 chore(crypto): Rename wordlist to slip39_wordlist and add include guards. 2020-12-15 13:41:42 +01:00
Andrew Kozlik
7fc1851279 fix(crypto): Improve naming and robustness of SLIP39's T9 mask lookup. 2020-12-15 13:41:42 +01:00
Andrew Kozlik
c5f26beeea fix(crypto): Fix undefined behavior in xmr_read_varint(). 2020-12-03 20:05:05 +01:00
Andrew Kozlik
dab353f888 test(crypto): Test signature verification for a digest which is equal to the group order. 2020-12-02 17:11:29 +01:00
Andrew Kozlik
fed59ec770 fix(crypto): In ecdsa_verify_digest() allow the digest to be equal to the order of the group. 2020-12-02 17:11:29 +01:00
Pavol Rusnak
50fdd183c2
ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00
Andrew Kozlik
7ae338bd87 chore(crypto): Improve comments and error handling in ecdsa_verify_digest(). 2020-10-23 15:05:07 +02:00
Andrew Kozlik
c67ecb984b chore(crypto): Move XPUB_MAXLEN and ADDRESS_MAXLEN from modtrezorcrypto to bip32.h. 2020-10-13 13:13:49 +02:00
Andrew Kozlik
5429acdb7f
crypto: fix undefined behavior in shamir unbitslice (#1219) 2020-08-24 14:25:43 +02:00
Christian Reitter
676ac1571a crypto: add fuzz testing harnesses and documentation 2020-07-07 14:41:10 +02:00
Ondřej Vejpustek
9598d17f10 crypto: make bn_format faster 2020-06-26 12:29:21 +02:00
Ondřej Vejpustek
015c294857 crypto/tests: parametrize test_bn_format 2020-06-26 12:29:21 +02:00
Ondřej Vejpustek
e630279487 crypto: fix comment 2020-06-17 18:56:03 +02:00
Ondřej Vejpustek
76849f0bd6 crypto: make ecdsa_recover_pub_from_sig faster 2020-06-17 18:56:03 +02:00
Ondřej Vejpustek
24ceb0ab6b crypto/bignum: change limb size to 29, add tests 2020-05-24 14:36:38 +00:00
Andrew Kozlik
3843f917e9 crypto: Check for invalid characters in Monero Base58 decode. 2020-05-24 14:36:37 +00:00
Andrew Kozlik
20dd1ddc60 crypto: Fix buffer overflow in b58tobin. 2020-05-24 14:36:37 +00:00
Ondřej Vejpustek
4504469e80 crypto: add tests for chacha_drbg 2020-04-16 11:51:28 +02:00
Ondřej Vejpustek
d5bfe6b32f crypto: add chacha_drbg 2020-04-16 11:51:28 +02:00
Pavol Rusnak
ff706eb70b
crypto: split hdnode_deserialize into hdnode_deserialize_{public,private} 2020-04-06 16:28:02 +00:00
Pavol Rusnak
b5446bd125
crypto: fix last commit 2020-02-17 19:16:54 +00:00
Pavol Rusnak
1859b5b588
crypto: update bip39bruteforce.c to segwit-in-p2sh 2020-02-17 19:01:43 +00:00
Ondřej Vejpustek
e7a81560f1
crypto: derive public key in hdnode_sign only for supported ed25519 curves 2020-01-18 15:18:03 +00:00
Pavol Rusnak
76eefd026f
all: let's use -Wno-missing-braces because clang does not respect
initialization of structs with = {0};
2019-10-11 09:59:32 +02:00
Ondřej Vejpustek
11aa654abc
crypto: explicitly initialize variable length arrays 2019-10-09 17:05:34 +02:00
Ondřej Vejpustek
fdad317d8c
crypto: explicitly initialize variables 2019-10-09 17:05:33 +02:00
Pavol Rusnak
8eee90fd9a
crypto: sync base58.c with upstream 2019-09-29 08:46:21 +00:00