1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00
Commit Graph

22 Commits

Author SHA1 Message Date
Saleem Rashid
a1e911aa4c transaction: Do not hardcode HASHER_SHA2 2017-12-10 20:53:44 +01:00
Saleem Rashid
54b0869535 signing: Use Hasher instead of SHA256_CTX 2017-12-09 16:28:40 +01:00
Jochen Hoenicke
e1fa7af1da Byte-precise size estimate for fees
Fixes issue #232.

It assumes largest possible signature size for all inputs.  For segwit
multisig it can be .25 bytes off due to difference between segwit
encoding (varint) vs. non-segwit encoding (op_push) of the multisig script.
2017-11-14 13:39:17 +01:00
Jochen Hoenicke
a8bc3cb6bd Remove add_hash_type fields.
The 4 byte hash_type/forkid is part of the signed message, but not
part of the transaction.  Instead of hacking it into the transaction,
add it after the transaction when computing the signature.
2017-11-13 22:20:08 +01:00
Jochen Hoenicke
b5fa8a266a New CoinInfo separated from protobuf structures
Having CoinType using the protobuf structures has several disadvantages.
- We always need to change trezor-common if we need a new field (like
  bech32 prefix)
- Every time Trezor initializes it sends all this information out and
  nobody cares.
- The protobuf structures add storage overhead due to their fixed size.

I also removed most of the `has_` fields except for forkid:
- `has_segwit` was merged with segwit
- `has_coin_shortcut` can be replaced by test for NULL if necessary.

The fields were reordered for better padding.
2017-11-05 19:23:34 +01:00
Pavol Rusnak
18d8cb3c56
add project website (trezor.io) to license header 2017-11-05 17:47:23 +01:00
Saleem Rashid
a34554b091 signing: Add SIGHASH_FORKID support 2017-07-30 22:51:18 +02:00
Pavol Rusnak
91a1b6c4bc
drop EstimateTxSize (and TxSize) 2017-06-28 18:49:44 +02:00
Pavol Rusnak
b1995bb8d1
remove segwit warning, don't enable segwit on coins that don't have segwit=true in definition 2017-05-04 18:54:54 +02:00
Jochen Hoenicke
7b1381766f
Change address support for segwit.
Rewrote change address support for segwit.
Also checks the bip32 path of change address.
2017-03-29 20:59:01 +02:00
Jochen Hoenicke
b7b9891cb4
Signing for Segnet Transaction works
see segnet4 txid:
aa434a6ef4fcf350e319bacbd725fa7446f797cb3ed0cd0582826a49d3351ffa
2016-11-05 22:47:21 +01:00
Jochen Hoenicke
e5000fb196
segwit sign (completely untested) 2016-11-05 22:47:18 +01:00
Jochen Hoenicke
5c60be9854
hashes for segwit signature 2016-11-05 22:37:01 +01:00
Pavol Rusnak
e9f0706c2e
fix prevtx hashing when input count is 0 2016-10-21 13:20:57 +02:00
Pavol Rusnak
c288a0e328
implement TXEXTRADATA transaction RequestType 2016-10-20 13:25:40 +02:00
Daira Hopwood
69d99d202d
Add support for multi-byte address prefixes. 2016-10-10 00:05:45 +02:00
Pavol Rusnak
30a55829e5 rework hashing of transactions 2014-12-21 20:34:14 +01:00
Pavol Rusnak
92cfcd1565 implement GetAddress.multisig field 2014-12-10 18:04:51 +01:00
Pavol Rusnak
91451f88b5 multisig 2014-12-06 19:12:55 +01:00
Pavol Rusnak
f75515544f move Sign/Verify to crypto.c/h, implement Encrypt/Decrypt 2014-11-25 19:32:04 +01:00
Pavol Rusnak
7cba60895d update protobuf, disable SimpleSignTx 2014-06-05 23:45:01 +02:00
Pavol Rusnak
0d0a1ab5f2 import v1.0.0 2014-04-29 14:38:32 +02:00