Ondřej Vejpustek
3612620268
build(crypto,core): make secp256k1-zkp context as small as possible
2021-11-18 19:05:40 +01:00
Martin Milata
345c90ccba
docs(common): add section on reproducible builds
2021-11-16 17:08:57 +01:00
Andrew Kozlik
221977ad9d
chore(core): Convert SIGHASH_* consts to SigHashType enum.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
aaceb5bcc6
chore(core): Remove USE_SECP256K1_ZKP_BIP340 build option.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
ae35086bb9
refactor(core): Rename Hash143 to SigHasher and replace preimage_hash() with two functions.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
85ff3682c9
test(crypto): Add BIP-341 test vectors.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
398cea8f40
test(core): Add unit tests for BIP-341 signature hash.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
03b1b3bc6b
feat(core): Show path warning for SignMessage.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
e559c5688b
feat(tests): Test fake Taproot transaction attack.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
ef2ad57ec8
fix(core): Fix CoinJoin approval check.
...
After fixing the TxWeightCalculator the approver needs to account for the
weight of the coordinator's output.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
56ac799626
feat(core): Support external inputs in TxWeightCalculator.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
f9f0b517e2
feat(core): Support Taproot in TxWeightCalculator.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
a635876807
test(core): Add multisig unit tests for TxWeightCalculator.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
9b579094c0
fix(core): Fix TxWeightCalculator.
...
- Refactor TxWeightCalculator to count inputs and outputs itself.
- Fix witness data weight by adding the weight of the witness stack item count
for each input in segwit transactions and removing the weight of the
nonsensical extra inputs count.
- Get multisig pubkey count from multisig.nodes or multisig.pubkeys like in
multisig_get_pubkeys().
- Fix size of multisig script length encoding in segwit (varint vs. OP_PUSH).
- Improve comments.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
a5bd1643fc
fix(core): Fix OP_PUSH writing.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
93c02e2616
feat(tests): Add device test for external presigned Taproot input.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
5837750aaa
feat(tests): Add fee bump device test for Taproot.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
f0d6e961a9
feat(tests): Add tests for spending Taproot UTXOs.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
554888ef84
fix(tests): Fix UI tests which fail earlier due to scriptPubKey derivation.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
ed9d3e3e9b
fix(tests): Add script_pubkey field to external inputs.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
7653efb415
chore(core): Disable Taproot for altcoins.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
c0f853dc78
chore(core): Disable ownership proof generation for Taproot.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
475b95b11e
feat(core): Disable prevtx streaming for Taproot.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
84e31310a1
feat(core): Support Taproot in SignatureVerifier.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
a17cdb7cfa
feat(core): Implement Taproot signing.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
381e8bc85a
feat(core): Implement the BIP-341 common signature message computation.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
99e4ed6f42
chore(core): Support script_pubkey parameter for Bitcoin inputs.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
630c06e782
feat(core): Support Taproot scripts.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
68ad1b07d2
feat(core): Recognize Taproot inputs.
2021-11-13 13:33:46 +01:00
Pavol Rusnak
57fddcfd9d
feat(core): recognize Taproot change-outputs
2021-11-13 13:33:46 +01:00
Andrew Kozlik
390bcf4612
feat(tests): Add BIP86 test vectors for get_address().
2021-11-13 13:33:46 +01:00
Pavol Rusnak
7091417c5d
feat(tests): add taproot cases to test_msg_getaddress_segwit_native
2021-11-13 13:33:46 +01:00
Andrew Kozlik
dd7ed61939
feat(core): Implement GetAddress for taproot.
2021-11-13 13:33:46 +01:00
Pavol Rusnak
6406f0640d
feat(core): introduce PATTERN_BIP86 to keychain
2021-11-13 13:33:46 +01:00
Andrew Kozlik
ae41f7dec8
fix(core): Fix bip340 module build.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
59c0f4383d
feat(core): Add key tweaking functions to trezorcrypto.bip340.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
3f5c11a919
test(crypto): Add unit test for BIP340 tweak.
2021-11-13 13:33:46 +01:00
Andrew Kozlik
4a6bd14993
feat(crypto): Add key tweaking functions to zkp_bip340.c.
2021-11-13 13:33:46 +01:00
matejcik
fd0d1ed871
git subrepo push common
...
subrepo:
subdir: "common"
merged: "d84a6fcaf"
upstream:
origin: "git+ssh://git@github.com/trezor/trezor-common"
branch: "master"
commit: "d84a6fcaf"
git-subrepo:
version: "0.4.1"
origin: "https://github.com/ingydotnet/git-subrepo "
commit: "a04d8c2"
2021-11-11 15:05:17 +01:00
Andrew Kozlik
0737deedc4
fix(legacy): Fix split_message() to correctly handle strings that are not null-terminated.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
d8de95767d
feat(legacy): Use fixed font in SignMessage and VerifyMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
bec0634bae
feat(core): Improve message signing UI.
...
- Add "Confirm message" subheader to SignMessage and VerifyMessage.
- Unify font for SignMessage and VerifyMessage to fixed-width font.
- Fix device tests.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
c60305d8f0
feat(legacy): Implement pagination in SignMessage and VerifyMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
5e6e56ac4d
feat(legacy): Show address confirmation in SignMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
39a0901e99
fix(tests): Fix SignMessage tests after adding address dialog.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
9a7990d087
feat(tests): Add no_script_type device tests for SignMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
cf14e06aa0
feat(core): Show address confirmation in SignMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
4146ab7f9e
feat(legacy): Support no_script_type option in SignMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
bc4a56b2c0
feat(core): Support no_script_type option in SignMessage.
2021-11-10 17:35:57 +01:00
Andrew Kozlik
c2f1850abb
feat(common): Add no_script_type option to SignMessage.
2021-11-10 17:35:57 +01:00