Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
a8f976c
chore(python): move dev keys from BootloaderV2Image
M1nd3r Aug 7, 2025
db52028
refactor(core): make SLIP-24 UI independent of ETH
ibz Aug 5, 2025
c27dba5
feat(core): use new SLIP-24 UI for Bitcoin
ibz Aug 5, 2025
e3e2b8c
fix(core): allow text details memos in Bitcoin
ibz Aug 5, 2025
02741b2
refactor(core): drop outdated Bitcoin SLIP-24 UI
ibz Aug 5, 2025
8805f9c
feat(tests): SLIP-24 tests for Bitcoin
ibz Aug 5, 2025
d568f80
chore(tests): update fixtures
ibz Aug 6, 2025
04adf71
feat(core): SLIP-24 UI for Ripple
ibz Aug 5, 2025
16bc848
fix(core): Ripple unit formatting
ibz Aug 8, 2025
022c7fe
fix(core): remove unnecessary changelog
ibz Aug 8, 2025
41f6072
chore(translations): normalize strings to NFC not NFKC
matejcik May 27, 2025
658bec5
chore(tools): warn about unsupported characters
bieleluk Aug 8, 2025
24bc11f
feat(core): adjust wireless setup QR code
obrusvit Aug 6, 2025
b8c7822
feat(core): derive entropy from master key
cepetr Jul 22, 2025
4aa64d8
fix(core): reset primask in emergency rescue
TychoVrahe Aug 6, 2025
b56da39
feat(core): adjust Eckhart screen border
obrusvit Aug 7, 2025
6e6fe3a
feat(core): render logo on welcome screen
obrusvit Aug 7, 2025
b3ba006
feat(core): show pairing code in big font in bld
obrusvit Aug 7, 2025
98692d5
refactor(core): rename debug overlay to performance overlay
TychoVrahe Jul 31, 2025
4926a02
fix(core): fix eckhart performance overlay
TychoVrahe Jul 31, 2025
74c3dea
refactor(core): rewrite debug overlay in rust
TychoVrahe Jul 31, 2025
8d65415
fix(core): fix BLE pairing
TychoVrahe Aug 5, 2025
a12ecd9
chore(core): update T3W1 embedded binaries
TychoVrahe Aug 5, 2025
fe24219
chore(core): make CPace implementation more explanatory
M1nd3r Aug 11, 2025
532d7d8
chore(tests): adjust THP pairing tests to the new `code_code_entry` e…
M1nd3r Aug 11, 2025
572cddd
chore(core): change encoding of `code_code_entry` used in CPace
M1nd3r Aug 11, 2025
d3399e0
chore(python): fix `code_entry_code` encoding in trezorlib
M1nd3r Aug 11, 2025
601ef83
test(core): allow wiping via DebugLink
romanz Aug 5, 2025
09fc377
chore(core): remove THP fallback support
romanz Jul 20, 2025
20a519e
refactor(core): move message reassembly into a separate class
romanz Aug 7, 2025
384e015
fix(build): no ui_debug_overlay only in prod
obrusvit Aug 11, 2025
4b9deb7
chore(core): remove logging from `alternating_bit_protocol`
romanz Aug 8, 2025
f1c08bc
chore(core): reduce default value in `MockHID` c-tor
romanz Aug 8, 2025
8b06fda
chore(core): fix a small typo in `thp_common.py`
romanz Aug 8, 2025
18db6c9
refactor(core): introduce `ThpContext`
romanz Aug 8, 2025
71e589b
chore(core): remove unused `interface_manager`
romanz Aug 11, 2025
33259c9
fix(core): don't reuse `Shutdown` exception object
romanz Aug 11, 2025
f0015e5
fix(core): don't reuse `FORBIDDEN_KEY_PATH` exception object
romanz Aug 12, 2025
697c3a5
chore(core): export `memzero()` via `trezor.utils`
romanz Aug 12, 2025
e1b5602
refactor(core): simplify THP write-related code
romanz Aug 8, 2025
b7fb51a
chore(core): regen foreign chars
obrusvit Aug 8, 2025
23b2fc6
chore(core): remove all fonts data
obrusvit Aug 8, 2025
2454d37
refactor(core/prodtest): unify binary update function
TychoVrahe Aug 4, 2025
c20d9fb
feat(core/prodtest): add boardloader update command
TychoVrahe Aug 4, 2025
24e318d
feat(core/tools): make nrf update script more universal and allow upd…
TychoVrahe Aug 4, 2025
e5bf739
chore(core): remove reflash tool
TychoVrahe Aug 4, 2025
d5d38b2
chore(core/prodtest): improve nrf-update and bootloader-update descri…
TychoVrahe Aug 11, 2025
f4fb558
chore: remove forgotten diff file
obrusvit Aug 12, 2025
8a8ecdf
refactor(core): cleanup storage syscalls, prepare early initialization
cepetr Jul 31, 2025
9951c96
refactor(core): remove circular dependencies, new 'storage' feature
cepetr Jul 31, 2025
7502821
refactor(core): simplify entropy module, relocate/rename to storage_salt
cepetr Jul 31, 2025
2f74e03
chore(core): remove unused define
cepetr Jul 31, 2025
3adda59
chore(core): set T3W1 full name
TychoVrahe Aug 12, 2025
12cafe7
chore(core): remove unusued code from BldHeader
obrusvit Aug 12, 2025
218805d
feat(core): SLIP-24 payment requests for Cardano
ibz Aug 8, 2025
5b27988
feat(core): SLIP-24 payment requests for Solana
ibz Aug 12, 2025
d9b204a
fix(tests): add t3w1 to skiplist
ibz Aug 13, 2025
538aa5c
feat(core): extend THP credentials with app_name
mmilata Aug 13, 2025
6897cef
feat(core): add Eckhart LED colors palette
obrusvit Aug 12, 2025
8c171c2
feat(core): use LED colors for diode in Eckhart
obrusvit Aug 12, 2025
618ee3c
chore(core): expose BLE connection flags to python
mmilata Aug 13, 2025
7d82a8a
feat(core): adjust RSOD
obrusvit Aug 7, 2025
3b97bd1
fix(core/io): Incomplete disabling of haptics
bieleluk Aug 12, 2025
2e082f4
feat(core): introduce props spacing
bieleluk Jul 23, 2025
c827a00
chore(core): change string tuple to propertytype
bieleluk Jul 24, 2025
913ac8e
chore(core): add default params to propslist
bieleluk Aug 6, 2025
681afd4
feat(core): Rename otp-device-id-write to otp-device-sn-write.
andrewkozlik Aug 14, 2025
76a9b91
chore: bump `cachix/install-nix-action` to v31
romanz Aug 15, 2025
10aef49
chore(tests): vertical menu content
bieleluk Aug 6, 2025
65b753d
chore(tests): make go to menu item an action
bieleluk Aug 6, 2025
d165262
fix(core/tests): wrong eckhart action
bieleluk Aug 12, 2025
88d7d4a
test(core): reduce the probability for `test_repeated_backup_via_devi…
romanz Aug 14, 2025
7f5df8f
fix(python): fix BootloaderV2Image verify
M1nd3r Aug 14, 2025
b85ab37
feat(bolt): SLIP-24 payment requests
ibz Aug 14, 2025
386fd4c
fix(core): preserve BLE peer count info during suspend
TychoVrahe Aug 15, 2025
fb9a087
fix(core): don't reuse `TASK_CLOSED` exception object
romanz Aug 15, 2025
7ee8637
fix(core/bootloader): improve failed communication behavior
TychoVrahe Aug 14, 2025
093ad5f
chore(core/eckhart): update tutorial screen
bieleluk Aug 8, 2025
7700537
chore(core/eckhart): adapt loader for click tests
bieleluk Aug 18, 2025
89d09b6
feat(core): implement explicit secret sector locking mechanism
TychoVrahe Aug 13, 2025
c505499
feat(core): use explicit secret locking on T3W1 and allocate space fo…
TychoVrahe Aug 13, 2025
7499713
fix(core/prodtest): fix tropic version and chip id commands error han…
TychoVrahe Aug 13, 2025
c1b769a
chore(core): update libtropic
TychoVrahe Aug 13, 2025
ab3c671
fix(core): tropic fixes after libtropic update
TychoVrahe Aug 13, 2025
139f582
feat(core/prodtest): implement tropic FW update
TychoVrahe Aug 13, 2025
d31832d
fix(core): initialize tropic model device in emulator
TychoVrahe Aug 13, 2025
b7f2e6f
feat(core): remove `tropic.get_certificate()`
onvej-sl Jul 24, 2025
ec41236
fix(core): fix irq locking in ble driver
cepetr Aug 18, 2025
affeefa
chore(python): add ROOT signing public keys
M1nd3r Aug 15, 2025
f82944d
chore(embed): add boardloader ec/pq and secmon public keys to T3W1 model
M1nd3r Aug 15, 2025
02d058e
feat(core): extend fuel gauge UI component
obrusvit Aug 17, 2025
26b3d50
feat(core): show chrg icon in Eckhart BldHeader
obrusvit Aug 17, 2025
469ebc9
fix(python): skip `EndSession` in case of invalidated THP channel
romanz Aug 18, 2025
ccb728b
ci(core): disable `core_flash_size_compare:` job
romanz Aug 16, 2025
1831084
ci: increase `poetry install` timeout
romanz Aug 16, 2025
45e870b
test(core): send `Cancel` only on T1B1
romanz Aug 16, 2025
614044d
refactor(core): move checksum validation to `Channel`
romanz Aug 12, 2025
6fb28ff
refactor(python): define `MAX_RETRANSMISSION_COUNT` in `protocol_v2`
romanz Aug 16, 2025
56f9490
feat(core): add THP transport-level PING/PONG messages
romanz Aug 15, 2025
478aa79
feat(core/eckhart): haptic feedback for HTC animation
bieleluk Aug 11, 2025
fd2d9d0
style(core): make style consistent
onvej-sl Aug 18, 2025
f9b0af2
fix(core): fixes after libtropic update
onvej-sl Jul 24, 2025
68ecf16
chore(core): update ts-tvl to 2.2
onvej-sl Jul 24, 2025
7494b61
feat(core/prodtest): implement tropic prodtest
onvej-sl Jul 24, 2025
fbd36c8
chore(core): update UI fixtures for T2T1
romanz Aug 19, 2025
ba3056b
fix(core): don't reuse `_TIMEOUT_ERROR` exception object
romanz Aug 19, 2025
ad3cb11
feat(core/bootloader): start the device on short press
TychoVrahe Aug 12, 2025
1f58816
feat(core/bootloader): improve bootloader entry sequence on T3W1
TychoVrahe Aug 12, 2025
e5e2e06
fix(core): fine tune BLE behavior after unexpected events
TychoVrahe Aug 19, 2025
e3fcde1
feat(core/eckhart): add label keyboard layout
bieleluk Aug 18, 2025
e06b331
fix(core): unify power manager timings.
kopecdav Aug 13, 2025
0e72c21
feat(core/eckhart): regulatory screen
bieleluk Aug 19, 2025
6dc393a
refactor(core): improve Stellar signing UX
overcat Jul 2, 2025
ebf0d7c
fix(core): set model variant in THP DeviceProperties
mmilata Aug 12, 2025
308f9e9
refactor(core): step `loop.race()` task without `loop.schedule()`
romanz Jun 9, 2025
d9a5a3c
test(core): allow joining debuglink task before restarting event loop
romanz Aug 17, 2025
d9286ea
feat(core): join debuglink task before restarting Codec v1 event loop
romanz Aug 18, 2025
a303f9c
refactor(python): don't return SEQ bit for irrelevant THP messages
romanz Aug 18, 2025
3406932
refactor(python): inline `ProtocolV2Channel.prepare_channel_without_p…
romanz Aug 18, 2025
8b19697
feat(python): ignore retransmitted THP payloads
romanz Aug 18, 2025
e451adc
chore(core): remove forgotten `log.info()` in `interface_context.py`
romanz Aug 20, 2025
441283c
fix(prodtest): remove extra crlf in response in non-interactive mode
cepetr Aug 20, 2025
ac426c6
fix(prodtest): fix wpc-info command output
cepetr Aug 21, 2025
755f6ab
fix(prodtest): fix secrets-certdev-write arg count check
cepetr Aug 21, 2025
8e51245
fix(core/prodtest): fix conditional usage of tropic testing keys
TychoVrahe Aug 21, 2025
12c045d
test(core): wait for device availability to avoid UI tests flakiness
romanz Aug 15, 2025
c320020
feat(core): reimplement THP event loop restarts
romanz Aug 13, 2025
5bb49f1
test(core): wait for debuglink task before restarting THP event loop
romanz Aug 17, 2025
3ca9525
feat(core): reimplement THP retransmissions
romanz Aug 19, 2025
f947c4c
feat(core/bootloader): stronger haptic effect on power on
TychoVrahe Aug 21, 2025
b14e343
build(core): fix dependency versions in trezor-core-tools
matejcik Aug 20, 2025
a6f6dbb
fix(core): increase prodtest stack size
cepetr Aug 21, 2025
dbda8d0
feat(core): firmware suspend by power button
obrusvit Jun 12, 2025
b4f857b
fix(python): correct CLI error message on uninitialized device
romanz Aug 21, 2025
ff68e6b
fix: re-lock Poetry env using the version from Nix
obrusvit Aug 21, 2025
d86a50d
fix(core): increase `MAX_SUBSCREENS` a bit
romanz Aug 21, 2025
6335c00
fix(core): avoid infinite THP error loop
romanz Aug 21, 2025
326d381
chore(core): fix log formatting in `trezor/wire/thp/channel.py`
romanz Aug 21, 2025
bd31cc4
chore(core): update T3W1 embedded binaries
obrusvit Aug 22, 2025
031247b
chore(core/eckhart): invert QR screen colors
bieleluk Aug 19, 2025
62b26ca
chore(core/eckhart): make paginate buttons equally sized
bieleluk Aug 20, 2025
73f3a6d
chore(core/eckhart): enable menu separators by default
bieleluk Aug 19, 2025
9ac1dbd
chore(core/eckhart): update apply settings label flow
bieleluk Aug 19, 2025
d8cff7a
chore(core/eckhart): extend header buttons
bieleluk Aug 19, 2025
97396ff
chore(core/eckhart): device menu translations
bieleluk Aug 18, 2025
18b2005
chore(core/eckhart): update device menu about screen
bieleluk Aug 18, 2025
9dfa7f4
chore(core/eckhart): extend device menu FwUI param list
bieleluk Aug 24, 2025
6e4b343
chore(core): add new menu length
bieleluk Aug 24, 2025
a484420
chore(core): add secmon keys to trezorlib
TychoVrahe Aug 20, 2025
eecd1e8
chore(core): add LED enable/disable functionality
bieleluk Aug 13, 2025
c693963
refactor(python): refactor THP-related exception types
romanz Aug 20, 2025
dc82cd1
fix(core): correct `ticks_diff` arguments' order
romanz Aug 21, 2025
c95f5b5
chore(core): exclude logging on non-debug builds
romanz Aug 21, 2025
af2e787
refactor(core): inline THP `PairingContext` confirmation methods
romanz Aug 24, 2025
d680f9e
chore(core): remove `thp.pairing._skip_pairing_dialog()`
romanz Aug 24, 2025
ff18b00
chore(core): move `show_pairing_dialog()` to `trezor.wire.thp.ui` module
romanz Aug 25, 2025
d5ebdd8
feat(cardano): Message signing
jaskp Dec 20, 2023
13cf5c3
feat(cardano): Show path, address params and longer payload chunk
jaskp Feb 13, 2024
6d42732
fix(cardano): Change display_ascii flag to prefer_hex_display
jaskp Feb 11, 2024
5bc7576
fix(cardano): Return pubkey
jaskp Feb 11, 2024
2703ba6
chore(cardano): add missing translations
davidmisiak May 16, 2024
063b621
chore(cardano): update UI fixtures
davidmisiak May 16, 2024
2a3153c
chore(cardano): changes after rebase
jaskp Aug 8, 2025
7311704
feat(cardano): stop hashing in message signing
jaskp Aug 11, 2025
5343ea9
feat(cardano): replace chunking with length+offset
jaskp Aug 11, 2025
f1c4d45
feat(cardano): reject probable hashes
jaskp Aug 11, 2025
0f94f34
fix: changelog formatting
jaskp Aug 11, 2025
e1ae222
chore(cardano): rename payload
ibz Aug 21, 2025
ed8cbe5
fix(cardano): stop trimming long messages
ibz Aug 25, 2025
30eb997
chore(tests): update fixtures
ibz Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ runs:
using: "composite"
steps:
- name: Install nix
uses: cachix/install-nix-action@v23
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Dependencies nixpkgs
run: timeout -v --kill-after=10 500 nix-shell --arg fullDeps "${{ inputs.full-deps }}" --run "true"
shell: sh
- name: Dependencies poetry
run: timeout -v --kill-after=10 100 nix-shell --arg fullDeps "${{ inputs.full-deps }}" --run "poetry install"
run: timeout -v --kill-after=10 200 nix-shell --arg fullDeps "${{ inputs.full-deps }}" --run "poetry install"
shell: sh
31 changes: 1 addition & 30 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
submodules: recursive
- uses: ./.github/actions/environment
- run: nix-shell --run "poetry run make -C core build_unix"
- run: nix-shell --arg fullDeps true --run "cd vendor/ts-tvl/tvl/server/model_config && poetry env use 3.12 && poetry install && poetry run model_server tcp -c model_config.yml &"
- run: nix-shell --arg fullDeps true --run "cd vendor/ts-tvl/model_configs/example_config && poetry env use 3.12 && poetry install && poetry run model_server tcp -c example_config.yml &"
- run: nix-shell --run "poetry run make -C core test"
- run: nix-shell --run "poetry run make -C core test_emu_sanity" # sanity check non-frozen emulator

Expand Down Expand Up @@ -527,35 +527,6 @@ jobs:
- uses: ./.github/actions/environment
- run: nix-shell --run "poetry run core/tools/size/checker.py core/build/firmware/firmware.elf"

# Compares the current flash space with the situation in the current master
# Fails if the new binary is significantly larger than the master one
# (the threshold is defined in the script, currently 5kb).
# Also generates a report with the current situation
core_flash_size_compare:
name: Flash size comparison
runs-on: ubuntu-latest
needs: core_firmware
strategy:
fail-fast: false
matrix:
model: [T2T1] # FIXME: T2T1 url is hardcoded in compare_master.py
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: core-firmware-${{ matrix.model }}-universal-normal
path: core/build
- uses: ./.github/actions/environment
- run: nix-shell --run "poetry run core/tools/size/compare_master.py core/build/firmware/firmware.elf -r firmware_elf_size_report.txt"
- uses: actions/upload-artifact@v4
with:
name: core-test-flash-size-${{ matrix.model }}
path: firmware_elf_size_report.txt
retention-days: 7

# Monero tests.
core_monero_test:
name: Monero test (${{ matrix.model }}, ${{ matrix.asan }})
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
[submodule "vendor/libtropic"]
path = vendor/libtropic
url = https://github.com/tropicsquare/libtropic.git
branch = develop
[submodule "vendor/ts-tvl"]
path = vendor/ts-tvl
url = https://github.com/tropicsquare/ts-tvl
Expand Down
47 changes: 47 additions & 0 deletions common/protob/messages-cardano.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option java_package = "com.satoshilabs.trezor.lib.protobuf";
option java_outer_classname = "TrezorMessageCardano";

import "messages-common.proto";
import "options.proto";

enum CardanoDerivationType {
LEDGER = 0;
Expand Down Expand Up @@ -237,6 +238,7 @@ message CardanoSignTxInit {
optional uint32 reference_inputs_count = 21 [default=0];
optional bool chunkify = 22; // display the address in chunks of 4 characters
optional bool tag_cbor_sets = 23 [default=false]; // use tag 258 for sets in cbor
optional common.PaymentRequest payment_req = 24 [(experimental_field)=true]; // SLIP-24 payment request
}

/**
Expand Down Expand Up @@ -524,3 +526,48 @@ message CardanoTxBodyHash {
*/
message CardanoSignTxFinished {
}

/**
* Request: Ask device to sign a message containing arbitrary data
* @start
* @next CardanoMessageDataRequest
* @next CardanoMessageSignature
*/
message CardanoSignMessageInit {
optional uint32 protocol_magic = 1; // network's protocol magic
optional uint32 network_id = 2; // network id - mainnet or testnet
repeated uint32 signing_path = 3; // BIP-32-style path to derive the signing key from master node
required uint32 payload_size = 4; // size of the payload to be signed
required bool prefer_hex_display = 5; // whether to decode payload as hex even if valid ascii
optional CardanoAddressParametersType address_parameters = 6;
required CardanoDerivationType derivation_type = 7;
}

/**
* Device requests data chunk with specific size and offset
* @next CardanoMessageDataResponse
*/
message CardanoMessageDataRequest {
required uint32 length = 1; // size of data chunk to read
required uint32 offset = 2; // offset from start of payload
}

/**
* Client provides requested data chunk
* @next CardanoMessageDataRequest
* @next CardanoMessageSignature
*/
message CardanoMessageDataResponse {
required bytes data = 1; // the requested data chunk
}


/**
* Response: Contains signature for message and address used in signed headers
* @end
*/
message CardanoMessageSignature {
required bytes signature = 1; // signature for structure containing payload and protected headers
required bytes address = 2; // value of the address field in protected headers
required bytes pub_key = 3; // public key given by signing path
}
4 changes: 4 additions & 0 deletions common/protob/messages-solana.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
syntax = "proto2";
package hw.trezor.messages.solana;

import "messages-common.proto";
import "options.proto";

/**
* Request: Ask device for public key corresponding to address_n path
* @start
Expand Down Expand Up @@ -69,6 +72,7 @@ message SolanaSignTx {
repeated uint32 address_n = 1; // BIP-32 path to derive the key to sign with
required bytes serialized_tx = 2; // serialized tx to be signed
optional SolanaTxAdditionalInfo additional_info = 3;
optional common.PaymentRequest payment_req = 4 [(experimental_field)=true]; // SLIP-24 payment request
}

/**
Expand Down
6 changes: 4 additions & 2 deletions common/protob/messages-thp.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ message ThpCreateNewSession {
* @next ThpPairingRequestApproved
*/
message ThpPairingRequest {
optional string host_name = 1; // Human-readable host name
optional string host_name = 1; // Human-readable host name (browser name for web apps)
optional string app_name = 2; // Human-readable application name
}

/**
Expand Down Expand Up @@ -245,8 +246,9 @@ message ThpEndResponse {}
*/
message ThpCredentialMetadata {
option (internal_only) = true;
optional string host_name = 1; // Human-readable host name
optional string host_name = 1; // Human-readable host name (browser name for web apps)
optional bool autoconnect = 2; // Whether host is allowed to autoconnect without user confirmation
optional string app_name = 3; // Human-readable application name
}

/**
Expand Down
4 changes: 4 additions & 0 deletions common/protob/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ enum MessageType {
MessageType_CardanoTxInlineDatumChunk = 335 [(wire_in) = true];
MessageType_CardanoTxReferenceScriptChunk = 336 [(wire_in) = true];
MessageType_CardanoTxReferenceInput = 337 [(wire_in) = true];
MessageType_CardanoSignMessageInit = 338 [(wire_in) = true];
MessageType_CardanoMessageDataRequest = 339 [(wire_out) = true];
MessageType_CardanoMessageDataResponse = 340 [(wire_in) = true];
MessageType_CardanoMessageSignature = 341 [(wire_out) = true];

// Ripple
MessageType_RippleGetAddress = 400 [(wire_in) = true];
Expand Down
37 changes: 37 additions & 0 deletions common/tests/fixtures/cardano/sign_message.failed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"setup": {
"mnemonic": "all all all all all all all all all all all all",
"passphrase": ""
},
"tests": [
{
"description": "Missing network id and protocol magic",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"address_parameters": {
"addressType": 0,
"path": "m/1852'/1815'/0'/0/0",
"stakingPath": "m/1852'/1815'/0'/2/0"
},
"payload": "",
"prefer_hex_display": true
},
"result": {
"error_message": "Must specify network_id and protocol_magic if using address_parameters"
}
},
{
"description": "Reject probable hash 28-byte non-ASCII payload",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"network_id": 1,
"protocol_magic": 764824073,
"payload": "ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00",
"prefer_hex_display": true
},
"result": {
"error_message": "The payload is interpreted as a hash and cannot be signed"
}
}
]
}
125 changes: 125 additions & 0 deletions common/tests/fixtures/cardano/sign_message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"setup": {
"mnemonic": "all all all all all all all all all all all all",
"passphrase": ""
},
"tests": [
{
"description": "Sign short non-ASCII payload",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"payload": "ff00",
"prefer_hex_display": true
},
"result": {
"signature": "5ad6ba670e65353b2c1ad4053a1ed4a9348a73fe965ffa0afafa24bad06e3eb3e325d49029604c09bf665c3c43a750ec81a43b1f8b746b07e999b913b980d006",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Sign short non-ASCII payload with address parameters",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"network_id": 1,
"protocol_magic": 764824073,
"payload": "ff00",
"address_parameters": {
"addressType": 0,
"path": "m/1852'/1815'/0'/0/0",
"stakingPath": "m/1852'/1815'/0'/2/0"
},
"prefer_hex_display": true
},
"result": {
"signature": "9efaff0b74c0beb2cadd727d8bafe13b31107235c5fc46c6c33e596e024d391c9fbe37072e43965add6ee0a4788562382031486b74fd59d636aa1ca3b1ddfe06",
"address": "0180f9e2c88e6c817008f3a812ed889b4a4da8e0bd103f86e7335422aa122a946b9ad3d2ddf029d3a828f0468aece76895f15c9efbd69b4277",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Sign short ASCII payload",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"payload": "54657374",
"prefer_hex_display": false
},
"result": {
"signature": "2201b8e7fa9ea919935e06ecc3e845433855066acaaf61cb8e624a2eb7139b73a9d126e7ee04548fff06ac933bd5419fc78c5aebee9b536cbee1481b52ec3e03",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Sign short ASCII payload rendered as hex",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"payload": "54657374",
"prefer_hex_display": true
},
"result": {
"signature": "2201b8e7fa9ea919935e06ecc3e845433855066acaaf61cb8e624a2eb7139b73a9d126e7ee04548fff06ac933bd5419fc78c5aebee9b536cbee1481b52ec3e03",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Sign empty payload",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"payload": "",
"prefer_hex_display": true
},
"result": {
"signature": "b09177a06cb2deba7ada89fec96fc4380e746f67c6b16a9ef9ae6b7cbbe941fdad8a8a573b809cd88db296b91b476c436033a29d86a63959e270047e47cd5d0d",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Non-ASCII payload falls back to hex",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"network_id": 1,
"protocol_magic": 764824073,
"payload": "ff",
"prefer_hex_display": false
},
"result": {
"signature": "eb7e48bb2de912b24ea4e295cfbf338e95e2a2d9c5eb41d72ddd8ebf96ca6128696e91e65e20a755821781b8ea0b4aa7ffcfa6ab0c7da2c67ecaf33fcd596509",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Ambiguous ASCII payload falls back to hex",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"network_id": 1,
"protocol_magic": 764824073,
"payload": "20",
"prefer_hex_display": false
},
"result": {
"signature": "1cd79c511e58e0d00bc402c24631a982c0f596e13cad38447d4f31213d085b23b9990b45023450f5ab4d47987993af662702b07bfc8195feb80b2c9e1c1dc10f",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
},
{
"description": "Long payload",
"parameters": {
"signing_path": "m/1852'/1815'/4'/0/0",
"network_id": 1,
"protocol_magic": 764824073,
"payload": "aaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff00011100011aaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbddd1bbbdddaafffaaafff000111000111bbbdddaaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff00011100011aaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbdddaaafffaaafff000111000111bbbddd1bbbdddaafffaaafff000111000111bbbdddee",
"prefer_hex_display": true
},
"result": {
"signature": "6d1e9bf2f704413b1a99340bb88f27a4a74f00fe7ed891b814a9a0167b6482b0b92982a5eb0be513fe5e432c4a79550d615222cf9ffcf70f42f8e600bf302c0f",
"address": "d9553a4de9c7ad8532abdb1d0a7f425b8007d25c9f1edcf0b5f5c3ba",
"pub_key": "67e3d14e1e0db2a6ff68832994451f63d3e92a4ee85c3681d72634ccfe889f2c"
}
}
]
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add a long ascii message (so that we have a UI test for that).

Loading