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

53 Commits

Author SHA1 Message Date
Peter D. Gray
cb8c910a0c Makefile: simplify include path, move subdirs to where used in C files 2018-01-13 14:51:51 +01:00
Saleem Rashid
136c62e970 bip32: Add curve to hdnode_deserialize 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
ce0f3919e3 bip32: Add hdnode_nem_{en,de}crypt 2017-09-02 01:39:09 +02:00
Saleem Rashid
abda0f6504 bip32: Add hdnode_nem_get_shared_key 2017-09-02 01:39:09 +02:00
Saleem Rashid
8edc0c58d3 bip32: Add hdnode_get_nem_address 2017-09-02 01:39:09 +02:00
Pavol Rusnak
c950342063
refactor hdnode_public_ckd_address_optimized 2017-07-24 22:57:20 +02:00
Pavol Rusnak
671dad42df
whitespace in bip32.[ch], formatting in readme 2017-05-08 15:27:20 +02:00
Peter Banik
aaf45d704e
introduce version attributes to hdnode_serialize_public/private and hdnode_deserialize functions 2017-04-21 13:42:58 +02:00
Karel Bilek
08545a15e7 Experiment - generating segwit addresses 2017-04-11 16:59:29 +02:00
Jochen Hoenicke
aa16b53bba Refactored duplicated code (#84)
Changed signature of public_ckd_address_optimized to not include the
compressed public_key (uncompressed is in pub).
2017-03-30 17:38:49 +02:00
Pavol Rusnak
b55473a01e
add fingerprint output parameter to hdnode_private_ckd_cached function 2016-12-12 12:07:33 +01:00
Pavol Rusnak
707c869fb9 Merge pull request #74 from romanz/curve25519
Add support for Curve25519-based ECDH
2016-10-16 01:28:45 +02:00
Roman Zeyde
906c543ebc Implement ECDH with Curve25519 at BIP32 module 2016-10-14 23:36:19 +03:00
Jan Pochyla
f45bcc65f2 bip32: deserialize the fingerprint 2016-10-14 14:44:05 +02:00
Pavol Rusnak
4fb15a13d8
add hdnode_get_address 2016-10-08 18:18:32 +02:00
Pavol Rusnak
d10ec230c0
add support for multibyte address versions 2016-10-08 17:56:12 +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
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
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
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
b5f89bb478
fpr -> fingerprint 2016-07-04 17:29:48 +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
110965f31d
further optimize emscripten 2016-05-12 19:29:24 +02:00
Pavol Rusnak
6dd9ed0756
add hdnode_public_ckd_address_optimized 2016-05-12 17:19:42 +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
c983afd72f Added curve type to HDNode
Every curve gets it's own hierarchy and the curve is remembered in
HD node.  Fixed the private/public key derivations to use the right
modulus.
2016-04-19 18:21:56 +02:00
Roman Zeyde
7c58fc11a4 Add support for NIST256P1 elliptic curve
This enables SSH ECDSA public key authentication.
2015-06-26 10:33:14 +03:00
Pavol Rusnak
aa1833ba3f add stdlib to header 2015-01-26 19:12:22 +01:00
Pavol Rusnak
f4e6010e18 implement BIP32 cache 2015-01-26 19:10:19 +01:00
Dustin Laurence
8ce1f34233 Add prototypes for private functions 2015-01-23 12:12:40 -08:00
Pavol Rusnak
89a7d7797b replace base58 implementation 2014-12-23 03:11:58 +01:00
Pavol Rusnak
10a92c3c62 use const in hdnode_from_* methods 2014-12-13 19:54:01 +01:00
Pavol Rusnak
c5d9b2ea2f remove forgotten declaration 2014-11-16 21:00:52 +01:00
Pavol Rusnak
8820ae9873 add more checks for improbable cases; rework gui testing app 2014-08-07 18:35:54 +02:00
Pavol Rusnak
612f5ab050 fix copyright headers 2014-05-22 20:54:58 +02:00
Pavol Rusnak
c1140e071e added deserialization 2014-05-21 00:22:48 +02:00
Pavol Rusnak
44116b8a74 make serialize api more friendly 2014-05-15 19:35:28 +02:00
Pavol Rusnak
c08bbfa58e fix last commit 2014-05-15 18:50:28 +02:00
Pavol Rusnak
c1dc507189 add hdnode serialization function 2014-05-15 17:36:23 +02:00
Pavol Rusnak
d5e1ff8be8 remove version_byte and address from bip32 2014-02-21 22:51:49 +01:00
Pavol Rusnak
18dea22213 get rid of bip32 versions, it's a mess :( 2014-02-21 19:41:33 +01:00
Pavol Rusnak
1034b28f90 use both private and public bip32 versions 2014-02-19 16:58:48 +01:00
Pavol Rusnak
c0ee25c851 don't use implicit versions in bip32 2014-01-21 18:38:44 +01:00
Pavol Rusnak
ed7e2e5058 implement public child key derivation 2014-01-14 14:35:13 +01:00
Pavol Rusnak
353606e2df add hdnode_coin_version to be able to set coin version from outside 2013-11-28 02:47:00 +01:00
Pavol Rusnak
150c770e4e xprvnode -> hdnode, add hdnode_from_pub function 2013-11-25 15:37:49 +01:00
Pavol Rusnak
9da3b35962 extract xprv_fill_public method 2013-11-08 16:02:48 +01:00