Pavol Rusnak
87c920a7e7
use BLOCK_LENGTH and DIGEST_LENGTH across all hash functions
2017-03-20 20:20:14 +01:00
Pavol Rusnak
9a2310fc53
add Blake2b
2017-02-28 18:14:54 +01:00
Jochen Hoenicke
1fb56e3466
Test cases for multibyte address prefixes
2017-01-04 15:16:55 +01:00
Pavol Rusnak
b55473a01e
add fingerprint output parameter to hdnode_private_ckd_cached function
2016-12-12 12:07:33 +01:00
Saleem Rashid
0acfb2cf28
tests: add SHA1 test
2016-11-05 15:14:37 +01:00
Pavol Rusnak
f4e4c29356
add blake2s, add unittests for blake2s and sha3
2016-11-01 16:22:20 +01:00
Pavol Rusnak
ce9022ad5d
fix tests.c when USE_GRAPHENE=0
2016-10-24 12:44:25 +02:00
Roman Zeyde
420c71992a
tests: add BIP32 ECDH ( #76 )
...
* tests: add BIP32 ECDH
* tests: BIP32 ECDH errors
2016-10-24 12:40:00 +02:00
Pavol Rusnak
ca4057aca0
tests: cleanup fromhex function
2016-10-20 12:04:05 +02:00
Pavol Rusnak
e6574f8eea
extract ck_assert_mem macros to separate file check_mem.h
2016-10-19 20:42:50 +02:00
Fabian Schuh
54cc18c493
Steem integration
2016-10-16 01:41:20 +02:00
Jan Pochyla
f45bcc65f2
bip32: deserialize the fingerprint
2016-10-14 14:44:05 +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
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
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
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
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
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
Jochen Hoenicke
d8e17d5d4d
Test cases for sha256 and sha512
2016-07-13 22:17:58 +02:00
Pavol Rusnak
dc167592d5
increase timeout in test_codepoints
2016-07-04 17:32:02 +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
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
Pavol Rusnak
f60cd681f6
fix sign-compare warning
2016-05-16 16:42:34 +02:00
Pavol Rusnak
31e05edca7
add script parsing functions
2016-05-16 14:45:09 +02:00
Pavol Rusnak
242a5de275
simplify pbkdf2 (support only klen == hashlen) and split it
2016-05-01 01:18:50 +02:00
Pavol Rusnak
5c4e131ada
add speed benchmark (secp256k1 vs ed25519)
2016-04-26 02:15:07 +02:00
Pavol Rusnak
91c64858d0
Merge pull request #57 from jhoenicke/master
...
Added Unit test, fixed one corner case.
2016-04-26 01:03:46 +02:00
Pavol Rusnak
0054893b60
add test speed for nist256p1 curve as well
2016-04-26 00:17:45 +02:00
Jochen Hoenicke
7b07dff25c
Added Unit test, fixed one corner case.
2016-04-25 22:55:30 +02:00
Pavol Rusnak
0590192536
add testcase for ed25519
2016-04-25 17:46:01 +02:00
Jochen Hoenicke
295a493846
Test vectors for ed25519 + BIP-0032 / SLIP-0010
2016-04-23 23:44:01 +02:00
Jochen Hoenicke
55edf71e27
ed25519 support
2016-04-22 18:21:58 +02:00
Jochen Hoenicke
698f40f385
BIP-32 without gaps, prepare non-ecdsa curves
...
* Split ecdsa_curve into curve_info and ecdsa_curve to support bip32 on
curves that don't have a ecdsa_curve.
* Don't fail in key derivation but retry with a new hash.
* Adapted test case accordingly
2016-04-22 17:43:15 +02:00
Jochen Hoenicke
16ff4387ae
New test case for a bip32 hole in nist256
2016-04-20 20:35:22 +02:00
Jochen Hoenicke
d577410fc4
Unit tests for the NIST256P1 curve
2016-04-20 15:13:40 +02:00
Jochen Hoenicke
b34be66a9c
Updated tests
2016-04-20 10:43:53 +02:00