1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-13 01:48:21 +00:00
Commit Graph

28 Commits

Author SHA1 Message Date
Pavol Rusnak
b679a6b2a7
rename hasher_multisig to hasher_script 2018-09-05 19:53:35 +02:00
Pavol Rusnak
f9caee2489
introduce hasher_multisig to curve_info 2018-09-05 18:30:51 +02:00
leoreinaux
1863045da4 add smartcash curve (#176) 2018-08-30 12:02:42 +02:00
Pavol Rusnak
5d62454c6a
refactor hashers, introduce HASHER_SHA2_RIPEMD160 2018-08-01 15:03:43 +02:00
Matheus Degiovani
0b0f01fb59 Fix decred bip32 name 2018-08-01 13:31:46 +02:00
Yura Pakhuchiy
e7281cf9f5 Add GRS curve 2018-04-23 16:15:59 +02:00
Saleem Rashid
c70e440128 hasher: Replace hasher_Double with HASHER_*D
This allows us to finely control when to use a single hash or a double hash in
various places. For example, Bitcoin signatures use double SHA256, but Decred
signatures use a single BLAKE256. However, both use double hashes for Base58.
2018-04-03 18:28:06 +02:00
Saleem Rashid
764cc4c6e8 bip32: Add secp256k1-decred 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
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
0bc1b70c4a Use different seed modifier for different curves 2016-04-20 10:38:11 +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
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
Jochen Hoenicke
ec057a5102 "More" constant time point multiplication
About the same speed, about the same precomputation table requirements.
Simpler code.
2015-03-17 19:18:34 +01:00
Jochen Hoenicke
7d4cf5cedd Optimized the bn_inverse method.
The new method needs about 30 % less time for prime256k1 and is about
twice as fast for other moduli.  The base algorithm is the same.
The code is also a bit smaller and doesn't need the 8 kb precomputed
table.

Important canges:
1. even/odd distinction so that we need to test only one of the numbers
   for being even.  This also leads to less duplicated code.
2. Allow for shifting by 32 bits at a time in the even test.
3. Pack u,s and v,r into the same array, which saves a bit of stack memory.
4. Don't divide by two after subtraction; this simplifies code.
5. Abort as soon as u,v are equal, instead of subtracting them.
6. Use s instead of r after the loop; no negation needed.
7. New code that divides by 2^k fast without any precomputed values.
2015-03-17 19:17:47 +01:00
Pavol Rusnak
019d779a94 Revert "Revert "add more precomputation to ecdsa signing""
This reverts commit 3747ba4323.
2014-07-03 10:09:45 +02:00
Pavol Rusnak
3747ba4323 Revert "add more precomputation to ecdsa signing"
This reverts commit 06dd166a82.
2014-07-03 01:18:00 +02:00
Pavol Rusnak
612f5ab050 fix copyright headers 2014-05-22 20:54:58 +02:00
Pavol Rusnak
06dd166a82 add more precomputation to ecdsa signing 2014-05-15 17:11:26 +02:00
Jan Pochyla
2e22e731d6 remove field name struct init for MSVC compatibility 2014-02-15 15:57:43 +01:00
Pavol Rusnak
e04ec2a831 add check to mnemonic_from_data as well 2013-11-26 01:29:06 +01:00
Pavol Rusnak
9205c0d952 use canonical signatures (if S > Order/2: S = Order - S) 2013-10-08 14:06:48 +02:00
Pavol Rusnak
678e5b1af2 use #if instead of #ifdef for conditional macros 2013-10-03 17:32:27 +02:00
Pavol Rusnak
ccbc219b29 import sources 2013-08-17 14:20:15 +02:00