Pavol Rusnak
ad73c0d4e7
fix ecdsa_address_decode
2016-10-09 23:42:21 +02:00
Pavol Rusnak
4fb15a13d8
add hdnode_get_address
2016-10-08 18:18:32 +02:00
Pavol Rusnak
8764e26368
ecdsa_address_decode now needs version
2016-10-08 18:13:23 +02:00
Pavol Rusnak
430a5087c8
introduce MAX_ADDR_RAW_SIZE and MAX_WIF_RAW_SIZE macros
2016-10-08 18:01:44 +02:00
Pavol Rusnak
d10ec230c0
add support for multibyte address versions
2016-10-08 17:56:12 +02:00
Jochen Hoenicke
157caf3763
ecdsa: fix out-of-bounds read in point_multiply ( #71 )
...
Fixes #70 .
2016-10-06 16:54:25 +02:00
Jochen Hoenicke
133c068f37
Reworked rfc6979 signing. ( #72 )
...
This adds an is_canonic parameter to all sign functions. This is a
callback that determines if a signature corresponds to some coin
specific rules. It is used, e. g., by ethereum (where the recovery
byte must be 0 or 1, and not 2 or 3) and or steem signatures (which
require both r and s to be between 2^248 and 2^255).
This also separates the initialization and the step function of the
random number generator, making it easy to restart the signature
process with the next random number.
2016-10-06 16:54:07 +02:00
Jan Pochyla
00413c0b6e
bip32: serialization returns nu. of written bytes
2016-10-06 12:36:23 +02:00
Saleem Rashid
db1b638cdf
gui: update for newer HDNode API ( #68 )
2016-09-11 00:35:02 +02:00
Pavol Rusnak
62b8f845f2
Merge pull request #67 from jhoenicke/master
...
sha2: fix unaligned access.
2016-08-29 22:03:32 +02:00
Jochen Hoenicke
19a1f501c4
Simplified sha256_Final/sha512_Last
...
- Fix the bug where we zero too many bytes in sha512_Last
(SHORT_BLOCK_LENGTH != BLOCK_LENGTH -2).
- Get rid of an if branch.
- Don't reverse the last two words in 512_Last that are written later.
- make 256_Final and 512_Last look the same.
2016-08-29 21:55:57 +02:00
Jochen Hoenicke
b3e6eecfce
sha2: Fix unaligned access
2016-08-29 21:55:11 +02:00
Pavol Rusnak
10a2a0014b
Merge pull request #66 from axic/bignum
...
Bignum: add bn_one
2016-08-28 14:28:27 +02:00
Alex Beregszaszi
7e7e462be7
bignum: introduce bn_one
2016-08-27 13:15:20 +01:00
Alex Beregszaszi
e1dfa81ec5
tests: add bn_is_less
2016-08-27 13:07:10 +01:00
Pavol Rusnak
2bd84028c5
Merge pull request #65 from axic/bignum
...
Bignum: add tests and support little endian mode
2016-08-26 15:44:04 +02:00
Alex Beregszaszi
8581614d66
bignum: introduce write uint32/uint64
2016-08-26 12:41:54 +01:00
Alex Beregszaszi
7956c2f2f1
bignum: implement bitcount
2016-08-26 12:31:51 +01:00
Alex Beregszaszi
29e82018cd
bignum: rename bn_load_uint* to bn_read_uint*
2016-08-26 12:14:01 +01:00
Alex Beregszaszi
4eb2bd239c
tests: add bn_zero/bn_is_zero
2016-08-26 12:12:54 +01:00
Alex Beregszaszi
97454d9cbc
bignum: use the compiler's built in memory copy for bn_copy
2016-08-26 12:12:54 +01:00
Alex Beregszaszi
d061139da9
bignum: introduce load uint32/uint64
2016-08-26 12:12:54 +01:00
Alex Beregszaszi
339d2f44a9
bignum: introduce is_even/is_odd
2016-08-26 12:12:54 +01:00
Alex Beregszaszi
dd25a2ee5a
bignum: introduce copy
2016-08-26 01:08:55 +01:00
Alex Beregszaszi
62a0db8c4e
bignum: introduce read/write_le
2016-08-25 23:18:24 +01:00
Alex Beregszaszi
ec316b6afc
tests: add bn_is_equal
2016-08-25 23:07:28 +01:00
Alex Beregszaszi
8eebfb1986
tests: add bn_write_be
2016-08-25 22:51:34 +01:00
Alex Beregszaszi
d890f4d859
tests: include bn_read_be
2016-08-25 22:48:06 +01:00
Pavol Rusnak
7ce6b8b147
Merge pull request #63 from jhoenicke/master
...
Moved get_ethereum_address from ecdsa to bip32
2016-08-22 11:09:02 +02:00
Pavol Rusnak
3661b04936
Merge pull request #64 from spudowiar/ignore-dependency-generation
...
Add generated dependency files to .gitignore
2016-08-22 11:07:37 +02:00
Saleem Rashid
a17bac1ab3
gitignore: ignore *.d files
...
Makefile in trezor/trezor-mcu uses dependency generation now, without
ignoring these files, git marks the submodules as dirty.
2016-08-21 20:25:35 +01:00
Jochen Hoenicke
f4ed55377d
Moved get_ethereum_address from ecdsa to bip32
...
The new name of the function is `hdnode_get_ethereum_address`
and it gets a hdnode as input as opposed to a public key. This
also avoids first computing the compressed public key and then
uncompressing it.
Test cases were adapted to work with new function. The test-vectors
are the same as for bip32 and independently checked with an adhoc
python implementation.
2016-08-18 16:21:33 +02:00
Pavol Rusnak
245e2cc23d
update bip39bruteforce tool
2016-08-15 15:21:26 +02:00
Pavol Rusnak
4d6d9fe8ba
Merge pull request #62 from jhoenicke/pbkdf2_fast
...
Faster PBKDF2
2016-07-19 16:43:49 +02:00
Jochen Hoenicke
d8e17d5d4d
Test cases for sha256 and sha512
2016-07-13 22:17:58 +02:00
Jochen Hoenicke
9101c050aa
Smoother progress bar for wakeup
...
Call interrupt twice as often; makes progress bar smoother.
2016-07-13 22:17:49 +02:00
Jochen Hoenicke
32bda8d1d9
Faster PBKDF2 by reusing intermediate results.
...
The old implementation needed 6 sha transformations per iterations:
- 2 for computing sha512 of seed,
- 2 for computing digests of ipads/opads,
- 2 for computing digests of intermediate hashes.
The first 4 transformations are the same in every iteration so we cache
them. A new function hmac_sha512_prepare computes these digests.
We made sha512_Transform visible in pbkdf2 and prevent unneccessary
big/little endian conversions back and forth.
2016-07-13 22:17:23 +02:00
Pavol Rusnak
4912ac550c
Revert "add __dummy field to HDNode where fingerprint used to be (in order not to binary compatibility)"
...
This reverts commit 9a8df5a4bb
.
2016-07-04 18:49:25 +02:00
Pavol Rusnak
c80f0fbc52
remove cpython wrapper - it's broken and nobody uses it
2016-07-04 18:27:28 +02:00
Pavol Rusnak
9a8df5a4bb
add __dummy field to HDNode where fingerprint used to be (in order not to binary compatibility)
2016-07-04 17:37:28 +02:00
Pavol Rusnak
dc167592d5
increase timeout in test_codepoints
2016-07-04 17:32:02 +02:00
Pavol Rusnak
b5f89bb478
fpr -> fingerprint
2016-07-04 17:29:48 +02:00
Pavol Rusnak
ab81351de1
Merge pull request #61 from jhoenicke/master
...
Compute pubkey only on demand.
2016-07-04 17:28:18 +02:00
Pavol Rusnak
d61a151900
add bn_divmod1000 including unit test
2016-06-28 20:05:01 +02:00
Jochen Hoenicke
3390fcf89e
Compute pubkey only on demand.
...
Remove fingerprint from hdnode structure (if you need it, call
hdnode_fingerprint on the parent hdnode).
Only compute public_key, when hdnode_fill_public_key is called.
2016-06-27 10:13:10 +02:00
Pavol Rusnak
16f477787d
Merge pull request #59 from axic/feature/ethereum
...
Support Ethereum pubkeyhash
2016-06-14 13:55:13 +02:00
Alex Beregszaszi
ec7bea4308
Add tests for ecdsa_get_ethereum_pubkeyhash()
2016-06-13 22:18:40 +01:00
Alex Beregszaszi
ca2fcbf3e3
Add tests for ecdsa_uncompress_pubkey()
2016-06-13 21:59:52 +01:00
Alex Beregszaszi
4e7da75c6e
Rewrite ecdsa_uncompress_pubkey() using ecdsa_read_pubkey()
2016-05-23 19:10:06 +01:00
Alex Beregszaszi
aecf8671a1
Add sha3 to cmake
2016-05-23 19:10:06 +01:00