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
Alex Beregszaszi
1b8e3d557f
Implement ecdsa_get_ethereum_pubkeyhash()
2016-05-23 19:10:06 +01:00
Alex Beregszaszi
7d68a6ee17
Add ecdsa_uncompress_pubkey()
...
Code based on @Arachnid's PR, but has more strict checks
2016-05-17 19:38:14 +01:00
Jochen Hoenicke
409783ba64
New function ecdsa_verify_recover
...
Moved the code from Trezor firmware to here for recovering the public key
when verifying a bitcoin message. Fixed the signing and verification for
the unlikely case the r value overflows.
2016-04-25 18:02:24 +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
0bc1b70c4a
Use different seed modifier for different curves
2016-04-20 10:38:11 +02:00
Jochen Hoenicke
f2081d88d8
New jacobian_add that handles doubling.
...
Fix bug where jacobian_add is called with two identical points.
2015-08-05 21:23:04 +02:00
Pavol Rusnak
2e09a9ff35
add b to ecdsa_curve structure
2015-08-05 18:06:10 +02:00
Pavol Rusnak
d659fd49a5
return back normalization of signatures
2015-08-03 21:47:06 +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
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
b4cdba8489
export pby from ecdsa_sign functions
2014-12-08 21:08:49 +01:00
Pavol Rusnak
df3606dd5e
introduce ecdsa_get_address_raw
2014-11-16 21:17:39 +01:00
Pavol Rusnak
b9d5896174
make pubkey validation optional, extract options to separate header
2014-07-07 20:14:36 +02:00
Ondrej Mikle
03fee34550
Validating of public key curve point.
2014-07-07 15:11:40 +02:00
Ondrej Mikle
d827b2c862
Account for case when point.y == 0 when doubling.
2014-07-04 17:40:35 +02:00
Ondrej Mikle
da6a09880d
Handling of special cases in EC arithmetic.
2014-07-04 15:30:15 +02:00
Pavol Rusnak
5e9cd15527
use new base58 code for address functions, add function for obtaining wif
2014-05-22 22:29:53 +02:00
Pavol Rusnak
612f5ab050
fix copyright headers
2014-05-22 20:54:58 +02:00
Pavol Rusnak
b5ceb14f8d
extract ecdsa_get_pubkeyhash
2014-02-21 23:33:14 +01:00
Pavol Rusnak
6a856479a8
introduce point_multiply
2014-02-05 23:38:37 +01:00
Pavol Rusnak
fc144587e6
introduce ecdsa_verify_digest
2014-02-04 19:12:43 +01:00
Pavol Rusnak
8aaebe761b
introduce uncompress_coords
2014-02-04 18:55:17 +01:00
Pavol Rusnak
81f462a5c5
add ecdsa_sig_to_der
2014-02-02 22:01:43 +01:00
Pavol Rusnak
73489fbd33
split signing into ecdsa_sign_digest and ecdsa_sign/ecdsa_sign_double
2014-02-02 20:36:03 +01:00
Pavol Rusnak
a40a077613
rework ecdsa_address_to_hash160 into ecdsa_address_decode
2014-01-31 15:26:51 +01:00
Pavol Rusnak
2e4ec7fe0a
introduce ecdsa_address_to_hash160
2014-01-30 20:34:05 +01:00
Pavol Rusnak
ed7e2e5058
implement public child key derivation
2014-01-14 14:35:13 +01:00
Pavol Rusnak
9da3b35962
extract xprv_fill_public method
2013-11-08 16:02:48 +01:00
Pavol Rusnak
0fc4ad0976
move declaration
2013-10-08 21:07:53 +02:00
Pavol Rusnak
f87e706407
add define for RFC6979
2013-10-03 18:19:30 +02:00
Pavol Rusnak
71ff1c5124
replace infinite loops with loops with counters
2013-09-27 15:55:55 +02:00
Pavol Rusnak
f4f246f3d7
optimize computations
2013-09-27 15:42:52 +02:00
Pavol Rusnak
896905c5c8
remove der encoding, introduce 33/65 bytes pubkeys, 64 bytes signature
2013-09-23 21:13:44 +02:00
Pavol Rusnak
2df62d4877
use unit tests via Check instead of small test programs
2013-09-21 17:41:02 +02:00
Pavol Rusnak
92f070498f
add function for computing addresses
2013-09-20 17:13:24 +02:00
Pavol Rusnak
afc9bcfe30
implement bip32 - https://en.bitcoin.it/wiki/BIP_0032
2013-09-12 21:20:03 +02:00
Pavol Rusnak
07d1c22730
refactor code -> bignum.c/h
2013-09-12 03:18:35 +02:00
Pavol Rusnak
603acbd1be
implement RFC 6979
2013-09-11 19:02:22 +02:00
Pavol Rusnak
3f737896a4
ecdsa_get_public_key and ecdsa_verify methods
2013-09-09 17:52:25 +02:00
mog
c87691205b
added support for getting public key from a private key.
2013-09-05 03:57:26 -05:00
Pavol Rusnak
ee09a6a7b2
param names cleanup
2013-08-19 12:40:58 +02:00
Pavol Rusnak
ccbc219b29
import sources
2013-08-17 14:20:15 +02:00