Compare commits

...

1841 Commits

Author SHA1 Message Date
scgbckbone
542dcd32c7 revert SSSP bypass PIN login 2026-06-25 11:18:33 -04:00
scgbckbone
0ef6413cd8 apply note or pwd as b39 passphrase 2026-06-24 14:07:25 -04:00
Dmitry Monakhov
97d86c9571 Fix BBQr share of Unicode text: encode str to UTF-8 before sizing/splitting
For 'U'/'J' payloads data is a str; planning counted codepoints while
b32encode consumes UTF-8 bytes, so multi-byte text (e.g. paper-wallet QR
art) overflowed target_vers and tripped the assert in show_bbqr_codes.
2026-06-24 13:29:58 -04:00
scgbckbone
edae8c1ee6 Add groups for secure notes 2026-06-24 13:28:43 -04:00
scgbckbone
553405776f Keep scanner reinit state instance-local 2026-06-24 11:12:35 -04:00
scgbckbone
ad2088d231 Fix QR scanner setup and sleep handling 2026-06-24 11:12:35 -04:00
scgbckbone
67a5c6c270 fix bypass_tmp return to master secret with xprv type 2026-06-24 08:23:47 -04:00
scgbckbone
eb112eb3a1 fix tests 2026-06-24 08:22:54 -04:00
scgbckbone
0d04e5e1f8 bugfix: p2pk 2026-06-23 11:43:39 -04:00
scgbckbone
59eb529a20 Reject witness-only UTXO for legacy inputs; Suppress fee for unverified witness UTXOs;normalize legacy inputs to proper utxo 2026-06-23 11:25:53 -04:00
scgbckbone
d5aba396a6 improve USB validation 2026-06-23 10:55:08 -04:00
scgbckbone
6fd256dbdc bugfix: 1of1 multisig 2026-06-23 10:34:44 -04:00
scgbckbone
6716fcbacb keep NFC export tag live for repeated probes 2026-06-23 10:29:26 -04:00
scgbckbone
1dddd88525 WIF Store upgrade 2026-06-22 12:46:50 -04:00
scgbckbone
d656f371c7 BIP-322 changes after BIP got in to the complete state 2026-06-22 11:20:44 -04:00
scgbckbone
7e92e5162a Restore borrowed secret handling in SensitiveValues 2026-06-22 11:16:20 -04:00
scgbckbone
74d34cfcf7 stabilize tests 2026-06-22 10:39:46 -04:00
scgbckbone
64658621bb simulator:attribute catchup with real SCAN 2026-06-22 10:39:30 -04:00
scgbckbone
755353f029 docs: NFC antenna by HW 2026-06-22 09:28:53 -04:00
scgbckbone
2981d15933 build: automatic block height update 2026-06-22 09:28:30 -04:00
scgbckbone
9ff3f5c447 slight menu optimization for long menus 2026-06-19 12:51:07 -04:00
scgbckbone
f5a1ef32c9 test nits 2026-06-19 12:50:54 -04:00
scgbckbone
841e44335e testing: block_h bumped for SSSP too, when CCC overrides SSSP block 2026-06-19 12:50:26 -04:00
scgbckbone
38616234e7 testing: cope with bitcoin core v30 2026-06-19 12:50:10 -04:00
scgbckbone
8e3bbfdf84 docs: index all docs and fix drift vs firmware 2026-06-19 12:48:49 -04:00
Peter D. Gray
f9b65ce968
credit 2026-06-19 11:00:37 -04:00
Dmitry Monakhov
8d71040acf Don't restore cached backup password (bkpw) from backup file
Restore mirrored the write-side strip of bkpw: a crafted backup could inject
setting.bkpw and fixate the password used for future backups. Drop it on restore
2026-06-19 10:59:16 -04:00
dependabot[bot]
5feae87e03 Bump requests from 2.32.4 to 2.33.0 in /testing
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.4...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 10:58:24 -04:00
scgbckbone
0949c0ac86 README.md update build repro steps (were misordered before) 2026-06-19 10:57:08 -04:00
scgbckbone
c36eac23d2 bundle small fixes 2026-06-19 10:56:45 -04:00
scgbckbone
a24a894cfd fix typo in nfc-pushtx.md 2026-05-16 10:59:23 -04:00
scgbckbone
ca06dfd250 unreleased regression introduced in 300323f18d 2026-04-25 10:36:15 -04:00
scgbckbone
3a1ef6fe50 bugfix: NFC verify address wrong error message 2026-04-20 15:21:43 -04:00
scgbckbone
883be60fc5 bugfix: attribute error on exception object + more 7z header tests 2026-04-20 15:19:31 -04:00
scgbckbone
393ebf5b43 bugfix: default menu position in custom path address format menu 2026-04-20 15:18:30 -04:00
scgbckbone
2b5178bd63 bugfix: "Send Password" menu item visibility reversed, do not store password as None, UX fixes 2026-04-20 15:15:19 -04:00
scgbckbone
44e7be3681 fix: correct container type for settings.wifs; proper button text UX with parentheses 2026-04-20 12:40:40 -04:00
scgbckbone
300323f18d final solution can_cancel=True 2026-04-20 12:40:07 -04:00
scgbckbone
c998432fc4 bugfix: exiting nickname entry with nickname already saved deleted previous nickname; fixed settings_get with prelogin arg 2026-04-20 12:37:54 -04:00
scgbckbone
9c6cfcbbd7 bugfix: enable disabled 7z magic check in check_file_headers 2026-04-20 11:28:28 -04:00
scgbckbone
be614dab92 bugfix: Delta Mode Trick PIN restore from backup 2026-04-20 11:17:52 -04:00
scgbckbone
02bd428786 do not repeat HSM_DISABLE_CMDS in HOBBLED_CMDS 2026-04-20 11:17:17 -04:00
scgbckbone
6869ba87b0 typos 2026-04-20 11:17:17 -04:00
scgbckbone
d0f834570b testing: fix bitcoind param list 2026-04-20 11:15:02 -04:00
scgbckbone
00afe533ca better fitting UX message for MK versions 2026-04-20 11:14:36 -04:00
scgbckbone
621523c1a8 remove redundant double newline in "Show Version" 2026-04-08 10:14:42 -04:00
scgbckbone
fdf630ab31 Wait UX for chain changes 2026-04-08 10:14:05 -04:00
Peter D. Gray
d2ad7a5923
Merge branch 'master' of github.com:Coldcard/firmware 2026-03-25 10:51:52 -04:00
Peter D. Gray
29ef16be63
Signed for Edge release. 2026-03-25 10:51:35 -04:00
scgbckbone
3344975607 regtest inherits chains parameters from testnet (saves flash space) 2026-03-16 13:23:02 -04:00
Peter D. Gray
15191eaaa5
edits 2026-03-12 10:17:09 -04:00
Peter D. Gray
717a3f591a
Mk5 hardware details 2026-03-12 10:12:44 -04:00
Peter D. Gray
74790ab80d
Merge branch 'master' of github.com:Coldcard/firmware 2026-03-10 10:55:49 -04:00
Peter D. Gray
50b1704c60
mk5 now public 2026-03-10 10:55:04 -04:00
scgbckbone
1e9338c550 testing: add BIP-322 POR signed with WIF Store test 2026-03-10 08:00:06 -04:00
scgbckbone
17fc097cbd bip322 doc mainnet 2026-03-06 15:05:16 -05:00
Peter D. Gray
6f6563c2cb
update logs 2026-03-05 17:27:00 -05:00
Peter D. Gray
4904d38bb6
New release: 2026-03-05T2052-v5.5.0 2026-03-05 15:52:33 -05:00
Peter D. Gray
1ea83d9b70
Signed for mk release. 2026-03-05 15:52:31 -05:00
Peter D. Gray
2410897c86
New release: 2026-03-05T2051-v1.4.0Q 2026-03-05 15:51:22 -05:00
Peter D. Gray
6541812e20
Signed for q1 release. 2026-03-05 15:51:20 -05:00
Peter D. Gray
2604f4d092
m 2026-03-05 15:50:03 -05:00
scgbckbone
c6da2612ef
handle WIF import duplicates 2026-03-05 15:47:09 -05:00
Peter D. Gray
538b1a6df8
rc2+factory 2026-03-05 14:37:20 -05:00
Peter D. Gray
2edf3c72e4
nits 2026-03-05 14:22:56 -05:00
scgbckbone
5e3f7a9321
Visualize WIF with ability to import to WIF store 2026-03-05 14:17:42 -05:00
scgbckbone
00beed7b94
bump ccc_min_block 2026-03-05 14:17:32 -05:00
scgbckbone
12e0af3f5c
WIF store testing 2026-03-05 12:49:31 -05:00
Peter D. Gray
01629e1396
WIF tests, support paper wallet format 2026-03-05 11:51:21 -05:00
Peter D. Gray
d893575ecf
bump 2026-03-05 11:51:01 -05:00
scgbckbone
0cc6818728
fix WIF store ownership showing QR address 2026-03-05 09:56:05 -05:00
Peter D. Gray
b7bc614323
text 2026-03-05 09:24:04 -05:00
Peter D. Gray
02b5a75675
new bootloader 2026-03-05 09:14:33 -05:00
Peter D. Gray
e35f60ed5e
version bumps 2026-03-05 09:12:25 -05:00
scgbckbone
0b425b8609
fix: file picker in import BIP-322 msg needs vdisk and slot_b args 2026-03-05 08:29:51 -05:00
Peter D. Gray
43ef951d83
Edits 2026-03-04 17:32:38 -05:00
Peter D. Gray
38553d1ac5
Mk hardware 2026-03-04 17:32:21 -05:00
scgbckbone
9b131b2eff WIF Store 2026-03-04 17:16:38 -05:00
scgbckbone
c19be4f41e bugfix: do not offer to show QR code of TXID if txn is not finalized 2026-03-04 15:24:42 -05:00
Peter D. Gray
e92a8ccde1
edits 2026-03-04 12:58:21 -05:00
Peter D. Gray
7d937aca84
code formating 2026-03-04 10:50:05 -05:00
Peter D. Gray
382eef61d2
add ./debug/* 2026-03-04 10:48:06 -05:00
scgbckbone
cfc46b565e show descriptor & key expression in story; signed key expression export 2026-03-04 10:46:45 -05:00
scgbckbone
45542d1d4f prevent dupe inputs for specific kind of path_mappers 2026-03-04 10:32:52 -05:00
scgbckbone
470fe2843c bugfix: dramatic pause progress bar off by one 2026-03-04 10:32:32 -05:00
scgbckbone
6c247d4852 typo in Nuke Device UX message 2026-03-04 10:32:09 -05:00
Peter D. Gray
6f366d1603
slight rework 2026-02-25 11:05:24 -05:00
Peter D. Gray
d53c7b2e1b
optimizations, petty 2026-02-25 11:04:13 -05:00
Peter D. Gray
598ccda8c0
edits 2026-02-25 10:18:09 -05:00
scgbckbone
1bbaeef439 bugfix: duplicate inputs 2026-02-25 10:16:49 -05:00
dependabot[bot]
eb50a0e198 Bump pillow from 10.3.0 to 12.1.1 in /misc/q1font
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.3.0 to 12.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.3.0...12.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-25 09:57:56 -05:00
Peter D. Gray
08d0a70de2
edits 2026-02-25 09:57:00 -05:00
Peter D. Gray
a3d5d6152e
MSG->Message when we have space 2026-02-25 09:54:29 -05:00
Peter D. Gray
9f832476eb
add BIP-322 feature 2026-02-25 09:44:14 -05:00
Peter D. Gray
78195d8fb9
edits 2026-02-25 09:41:50 -05:00
scgbckbone
aecc870c6b use HW accelerated tagged_sha256 2026-02-25 09:31:34 -05:00
scgbckbone
0c43c802e1 bump libngu to version with HW accelerated tagged_sha256 2026-02-25 09:31:34 -05:00
scgbckbone
4ce43c74c6 move 2 2026-02-25 09:31:34 -05:00
scgbckbone
1176c83e34 move 2026-02-25 09:31:34 -05:00
scgbckbone
ef2f35b1fb BIP-322 msg verification 2026-02-25 09:31:34 -05:00
scgbckbone
5d7d5d881d BIP-322 Proof of Reserves 2026-02-25 09:31:34 -05:00
scgbckbone
5047512bae blue wallet export option 2026-02-24 14:10:37 -05:00
scgbckbone
9862f53bec review 2026-02-24 12:34:33 -05:00
Peter D. Gray
6a34760943
fix tests 2026-02-24 11:03:00 -05:00
Peter D. Gray
d0576a205f
Updates 2026-02-24 10:00:54 -05:00
Peter D. Gray
dfd52e5c03
buried settings menu 2026-02-24 10:00:48 -05:00
Peter D. Gray
6fd47d4c16
Updated 2026-02-24 10:00:22 -05:00
Peter D. Gray
06879c59e0
test we show BIP-39 passphrase 2026-02-24 09:57:08 -05:00
Peter D. Gray
21392bd3df
show BIP-39 passphrase on-screen 2026-02-24 09:56:48 -05:00
Peter D. Gray
e4d2326959
edits 2026-02-24 08:58:07 -05:00
scgbckbone
72e336628a Nuke Device 2026-02-17 11:36:32 -05:00
scgbckbone
7ca3baae43 allow cancel from tx explorer goto index 2026-02-17 11:22:57 -05:00
scgbckbone
89d6e226d7 txexplorer: goto index 2026-02-17 11:22:57 -05:00
scgbckbone
f966d47012 input explorer 2026-02-13 11:56:41 -05:00
scgbckbone
dbf9482fea add note to "Verify Backup" that proper verify is attainable via Restore Backup 2026-02-11 14:33:36 -05:00
scgbckbone
ecd796b3a5 bugfix: empty notes in hobbled mode 2026-02-10 09:01:09 -05:00
scgbckbone
b1fe2cca26 bugfix: fwd slash in multisig name caused export to yikes. Replace fwd slash with dash in export filenames 2026-02-10 09:00:16 -05:00
scgbckbone
5d9ab62595 nit: tx nVersion serialization is signed integer 2026-02-10 08:59:48 -05:00
scgbckbone
7dbbf29b8d add missing QR tests for tmp secret import 2026-02-06 11:46:22 -05:00
scgbckbone
722c45df0a improve import secret tests 2026-02-06 10:42:01 -05:00
scgbckbone
88e4a5e8ab improve UX responsivness for Key Expression 2026-02-06 10:41:11 -05:00
scgbckbone
910c096145 allow resetting block_h in CCC menu 2026-02-02 11:35:38 -05:00
scgbckbone
a3d5485fd2 unified multisig import 2026-02-02 11:34:52 -05:00
scgbckbone
366670b4d5 USB send keystrokes for all BIP-85 secret types 2026-01-21 11:43:32 -05:00
scgbckbone
0fffb07e9e fix: remove unnecessary total_out counting in output_iter 2026-01-21 11:23:13 -05:00
Peter D. Gray
4e91d2ca3f
nit 2026-01-02 15:14:01 -05:00
tadeubas
eb467988bb chore: revert .gitignore 2026-01-02 15:10:22 -05:00
tadeubas
9fbf208c3f refactor: drop --shallow-submodules since lwIP submodule does not support shallow clone 2026-01-02 15:10:22 -05:00
tadeubas
da1d6e28bd refactor(simulator): --log output path respects --segregate 2026-01-02 15:10:22 -05:00
tadeubas
c1e17d3a26 feat: add --log flag to enable simulator logging 2026-01-02 15:10:22 -05:00
tadeubas
a2f0eb323a chore: removed Docker 2026-01-02 15:10:22 -05:00
tadeubas
53c6d33c2f chore: Simulator Docker instructions 2026-01-02 15:10:22 -05:00
russeree
a6a66bc367 [Policy] Support raw transaction versions == 3
Co-authored-by: scgbckbone <scgbckbone@proton.me>
2025-12-30 12:04:20 -05:00
scgbckbone
386cbcbb1d note that phone cannot be in airplane mode for NFC PushTx to work 2025-11-27 14:14:15 -05:00
Peter D. Gray
d5713851ea
Signed for Edge release. 2025-11-25 12:29:30 -05:00
Peter D. Gray
91f96ff870
Merge branch 'master' of github.com:Coldcard/firmware 2025-11-20 11:34:39 -05:00
Peter D. Gray
c25af2bfb1
Signed for Edge release. 2025-11-20 11:34:32 -05:00
scgbckbone
b3cd82ed61 allow viewing QR codes for XOR split mnemonics 2025-11-18 14:53:39 -05:00
scgbckbone
02ee6a58e2 fix login tests 2025-11-17 09:12:26 -05:00
scgbckbone
192f2d2dda Key expression export 2025-11-13 10:23:24 -05:00
Peter D. Gray
f235a83cf3
update changelogs 2025-11-03 10:44:28 -05:00
Peter D. Gray
d34f59697c
New release: 2025-11-03T1527-v5.4.5 2025-11-03 10:27:16 -05:00
Peter D. Gray
f966d3b079
Signed for mk4 release. 2025-11-03 10:27:12 -05:00
Peter D. Gray
6b7294cea0
New release: 2025-11-03T1525-v1.3.5Q 2025-11-03 10:25:55 -05:00
Peter D. Gray
efa8e1d56a
Signed for q1 release. 2025-11-03 10:25:49 -05:00
Peter D. Gray
946b4e9ae4
For 2025-11-03T1525-v1.3.5Q 2025-11-03 10:25:48 -05:00
Peter D. Gray
0d1104dfe0
block bump 2025-11-03 09:37:23 -05:00
Peter D. Gray
1e371d9297
bump 2025-10-30 14:17:17 -04:00
Peter D. Gray
f88b8da729
version bump 2025-10-30 13:48:14 -04:00
scgbckbone
52a090e31b bugfix: allow setting block_h from tmp seed 2025-10-30 13:16:17 -04:00
scgbckbone
cbd1b841b9 testing: add ability to set nLockTime in fake_{ms,}_txn 2025-10-30 13:16:17 -04:00
scgbckbone
82fabe75d4 test fixes 2025-10-30 09:43:56 -04:00
scgbckbone
bc8b55a059 re-fix: bugfix: exiting custom backup password text form causes yikes 2025-10-29 16:35:48 -04:00
scgbckbone
c54b3801ce UX confirm loading backup 2025-10-29 16:35:48 -04:00
scgbckbone
076bb34285 show backup filename during backup password entry (Q only) 2025-10-29 16:06:42 -04:00
scgbckbone
48709f3329 show fw version in hobbled mode 2025-10-29 13:26:34 -04:00
scgbckbone
ef0ba6a556 address format matching from PSBT witness/redeem script instead of PSBT_XPUBs derivation paths 2025-10-29 12:56:50 -04:00
scgbckbone
a08550cfd8 bugfix: exiting custom backup password text form causes yikes 2025-10-29 12:48:20 -04:00
scgbckbone
3e818cbbf6 remove unused import from SSSP menu constructor 2025-10-05 14:24:24 -04:00
Peter D. Gray
fe0041f99c
bump date 2025-09-30 08:42:29 -04:00
Peter D. Gray
15e571b0d9
New release: 2025-09-30T1238-v5.4.4 2025-09-30 08:39:04 -04:00
Peter D. Gray
36521dfef9
Signed for mk4 release. 2025-09-30 08:39:00 -04:00
Peter D. Gray
25249eb68c
New release: 2025-09-30T1237-v1.3.4Q 2025-09-30 08:37:38 -04:00
Peter D. Gray
be1328c720
Signed for q1 release. 2025-09-30 08:37:34 -04:00
Peter D. Gray
8d6ce99cd3
undo-gold-rc 2025-09-30 08:35:56 -04:00
Peter D. Gray
fcd848d821
deltamode timing fix 2025-09-29 17:19:44 -04:00
Peter D. Gray
203394a709
spelling 2025-09-29 12:11:24 -04:00
scgbckbone
284616d597
test_sssp.py more sleeps 2025-09-29 09:42:45 -04:00
Peter D. Gray
55c9ee4626
New release: 2025-09-26T1814-v5.4.4 2025-09-26 14:14:51 -04:00
Peter D. Gray
47430cb211
Signed for mk4 release. 2025-09-26 14:14:46 -04:00
Peter D. Gray
dd1bea1949
New release: 2025-09-26T1813-v1.3.4Q 2025-09-26 14:13:29 -04:00
Peter D. Gray
2aea18ba53
Signed for q1 release. 2025-09-26 14:13:24 -04:00
Peter D. Gray
3c4922e3ca
another day, another RC 2025-09-26 14:11:49 -04:00
Peter D. Gray
c6ec10206c
undo-rc 2025-09-26 14:10:17 -04:00
Peter D. Gray
88a9f4719b
cleanups 2025-09-26 11:14:19 -04:00
scgbckbone
6a3eec50f1
bugfix: only list files with proper extension delimited by dot; fix UX showing suffixes in file_picker when no suitable files found 2025-09-26 11:03:49 -04:00
Peter D. Gray
722facf0d9
add heartbeats, cleanups 2025-09-26 10:59:37 -04:00
Peter D. Gray
0a9d99429b
tweak 2025-09-26 09:27:36 -04:00
Peter D. Gray
d8c13ddc73
dont show "allow notes" on mk4 2025-09-25 14:59:33 -04:00
Peter D. Gray
d73c1bd8d3
New release: 2025-09-25T1503-v5.4.4 2025-09-25 11:03:27 -04:00
Peter D. Gray
5764073837
Signed for mk4 release. 2025-09-25 11:03:22 -04:00
Peter D. Gray
259be18962
New release: 2025-09-25T1501-v1.3.4Q 2025-09-25 11:02:01 -04:00
Peter D. Gray
248e0b568d
Signed for q1 release. 2025-09-25 11:01:56 -04:00
Peter D. Gray
ca00ee0798
Edits 2025-09-25 11:00:16 -04:00
scgbckbone
f3aaf3d5cb reload Trick Pins before deleting unlock pins 2025-09-25 10:07:00 -04:00
scgbckbone
06fa4f338c disallow Type Passwords if not okeys in sssp 2025-09-25 10:07:00 -04:00
scgbckbone
2d81b7251d proper label for Web 2FA warning 2025-09-25 10:07:00 -04:00
scgbckbone
91f10c2f35 do not allow empty BIP-39 passphrase over USB 2025-09-25 10:07:00 -04:00
scgbckbone
52e7c75539 fix SSSP unable to find unlock policy PIN 2025-09-25 10:07:00 -04:00
scgbckbone
a1e7e4c8de fix SSSP test drive to actually enforce policy 2025-09-25 10:07:00 -04:00
scgbckbone
fce9503d0e bump ccc_min_block (block height) 2025-09-25 10:07:00 -04:00
scgbckbone
5fc25566ee ownership improve UI 2025-09-25 10:07:00 -04:00
scgbckbone
b88590f8e8
fix multisig test ms_sign_simple 2025-09-24 08:28:05 -04:00
Peter D. Gray
765cc2a5a4
Merge branch 'master' of github.com:Coldcard/firmware 2025-09-24 08:27:26 -04:00
Peter D. Gray
1a591a70eb
reword 2025-09-23 15:44:14 -04:00
scgbckbone
26680a00f0 test fixes 2025-09-23 13:09:06 -04:00
scgbckbone
429b8e645e ckcc bump 2025-09-23 11:20:16 -04:00
Peter D. Gray
74fd862c9c
edits 2025-09-23 11:06:28 -04:00
Peter D. Gray
0625aa462c
comments 2025-09-23 10:53:31 -04:00
scgbckbone
faa5ebf11e test hobbled Teleport 2025-09-23 10:47:16 -04:00
scgbckbone
d0c5998e55 multisig input/output address format 2025-09-23 10:47:16 -04:00
Peter D. Gray
50d20713a0
hide empty menu 2025-09-23 09:33:05 -04:00
scgbckbone
2445b4d435
mk4 fix word entry after restore via USB 2025-09-22 12:14:27 -04:00
Peter D. Gray
a8366f55e0
nits 2025-09-22 12:13:35 -04:00
Peter D. Gray
41b8167837
seedxor allowed when hobbled 2025-09-22 11:57:21 -04:00
Peter D. Gray
3461ce336d
nit 2025-09-22 10:53:55 -04:00
Peter D. Gray
4457576ad4
Q becomes calculator rather than e-waste 2025-09-22 10:47:01 -04:00
scgbckbone
038199a3e2
review 2025-09-22 09:51:11 -04:00
scgbckbone
1929067aa1
Q: brick into forever calculator 2025-09-22 09:51:04 -04:00
scgbckbone
2b115059e8
add "Restore from XOR" to Temporary Seed menu 2025-09-22 09:44:13 -04:00
scgbckbone
88110bc5c5
SSSP settings shared across temporary seeds 2025-09-22 09:31:13 -04:00
scgbckbone
0a2c0cba12 update ckcc to latest master 2025-09-19 13:10:19 -04:00
scgbckbone
1e9e3ffb9d fix tests 2025-09-19 13:10:04 -04:00
Peter D. Gray
863e0d85ad
nits 2025-09-19 08:50:05 -04:00
Peter D. Gray
2109ab4ab1
ownership 2025-09-18 10:58:28 -04:00
Peter D. Gray
e5dce7105b
bug 2025-09-18 10:45:05 -04:00
scgbckbone
0237fd29ba txout explorer do not yikes on big QRs 2025-09-18 10:43:32 -04:00
scgbckbone
3efeb4f1ef docs & nits 2025-09-18 10:34:22 -04:00
scgbckbone
8b3603b15f ownership: search particular named wallet via BIP-21 wallet query param 2025-09-18 10:34:22 -04:00
scgbckbone
e8ba25fd04 bugfix: ownership check needed re-run for values near max 2025-09-18 10:34:22 -04:00
Peter D. Gray
9e762d29a5
edit 2025-09-18 10:27:37 -04:00
scgbckbone
de043f2250 restore backup via USB 2025-09-18 10:09:35 -04:00
Peter D. Gray
20ce5f2bae
edits 2025-09-18 08:57:22 -04:00
scgbckbone
3353f3d4a4 rename files on SD card via List Files 2025-09-18 08:37:14 -04:00
scgbckbone
4d2349fef4 lower Mk4 default wrap-around from 16 to 10 (same as Q) 2025-09-18 08:35:39 -04:00
Peter D. Gray
54dcf2dce8
little bug 2025-09-17 10:03:50 -04:00
scgbckbone
3291faa31e decouple wiping NFC chip from ux_animation routine 2025-09-17 09:31:42 -04:00
scgbckbone
bbac20b453 bugfix: premature wipe while exporting secret material via NFC - only first export loop (0th) was actually sending data 2025-09-17 09:31:42 -04:00
scgbckbone
98420f8ac3 bugfix: selftest MicroSD test 2025-09-17 08:45:54 -04:00
Peter D. Gray
5b26b306b5
version bump 2025-09-16 12:16:45 -04:00
Peter D. Gray
a3cac15a53 nits 2025-09-16 10:35:07 -04:00
scgbckbone
c7a19ee50f add SSSP login tests 2025-09-16 10:35:07 -04:00
Peter D. Gray
e42c0631d0 done 2025-09-16 10:35:07 -04:00
Peter D. Gray
609af3a257 cleanups 2025-09-16 10:35:07 -04:00
Peter D. Gray
7daa67cc63 test deltamode works 2025-09-16 10:35:07 -04:00
Peter D. Gray
3f24307dcd nits 2025-09-16 10:35:07 -04:00
scgbckbone
372954e43a SSSP update menu tree & related adjustments 2025-09-16 10:35:07 -04:00
Peter D. Gray
391aea0462 nits 2025-09-16 10:35:07 -04:00
scgbckbone
ee464f4a40 fixes after --eff changes 2025-09-16 10:35:07 -04:00
Peter D. Gray
54d58d4b43 block some USB command in hobble mode 2025-09-16 10:35:07 -04:00
Peter D. Gray
4bd8d12d9d tune 2025-09-16 10:35:07 -04:00
scgbckbone
8ceb6a4602 more tests 2025-09-16 10:35:07 -04:00
Peter D. Gray
76cc136a9e testing 2025-09-16 10:35:07 -04:00
Peter D. Gray
8d84979ddf forgotten pin 2025-09-16 10:35:07 -04:00
Peter D. Gray
bb391515a0 add seedvault 2025-09-16 10:35:07 -04:00
Peter D. Gray
16c3caee28 cleanup 2025-09-16 10:35:07 -04:00
Peter D. Gray
ab1b656277 improve --eff handling 2025-09-16 10:35:07 -04:00
Peter D. Gray
1a1daf32e3 nits 2025-09-16 10:35:07 -04:00
Peter D. Gray
6b1c38fe2f bug note 2025-09-16 10:35:07 -04:00
Peter D. Gray
43544f4f96 word entry 2025-09-16 10:35:07 -04:00
scgbckbone
d15de0321d Mk4 SSSP Word Check 2025-09-16 10:35:07 -04:00
scgbckbone
0420d4b6eb nits 2025-09-16 10:35:07 -04:00
Peter D. Gray
00b2f67d55 tidy 2025-09-16 10:35:07 -04:00
scgbckbone
6ab63b9dcf (some) policy test for sssp 2025-09-16 10:35:07 -04:00
Peter D. Gray
d053398a9a test cases 2025-09-16 10:35:07 -04:00
Peter D. Gray
d9a601e87c improvements 2025-09-16 10:35:07 -04:00
scgbckbone
6abb24443e fix0 2025-09-16 10:35:07 -04:00
Peter D. Gray
9d54e261ec passes test_ccc_magnitude 2025-09-16 10:35:07 -04:00
Peter D. Gray
335df666ab reword last_fail_reason 2025-09-16 10:35:07 -04:00
Peter D. Gray
7c5503d81a more 2025-09-16 10:35:07 -04:00
Peter D. Gray
a4c7f95dc1 more 2025-09-16 10:35:07 -04:00
Peter D. Gray
dbb2a21798 mroe docs 2025-09-16 10:35:07 -04:00
Peter D. Gray
f12457cbb5 spending policy implemented 2025-09-16 10:35:07 -04:00
Peter D. Gray
28ba1adce3 cleanup 2025-09-16 10:35:07 -04:00
Peter D. Gray
a62d5fb31e few notes 2025-09-16 10:35:07 -04:00
Peter D. Gray
b8435fdd79 slightly better SE2 emulation 2025-09-16 10:35:07 -04:00
Peter D. Gray
d3caf63265 planning 2025-09-16 10:35:07 -04:00
Peter D. Gray
c3a454abd6 hobbled mode support for spending policy 2025-09-16 10:35:07 -04:00
Peter D. Gray
73bb6b850d few notes 2025-09-16 10:35:07 -04:00
Peter D. Gray
bc49347a69 notes 2025-09-16 10:35:07 -04:00
scgbckbone
9a4d3986b7 bugfix: enter vfs after creating it 2025-09-16 09:54:49 -04:00
scgbckbone
f89061ffbe slip32 --> slip132 2025-09-04 09:50:05 -04:00
kdmukai
3eb99272b3 Clarify allowed usage of Seed XOR standard and name 2025-08-29 10:18:26 -04:00
nvk
56e5b98438
narrower 2025-08-18 15:20:57 -04:00
scgbckbone
123caec8d1 fix HSM UX message text 2025-08-13 08:13:34 -04:00
Peter D. Gray
637624dea9
Key Teleport easier to access 2025-08-11 09:33:53 -04:00
Peter D. Gray
9d5b86e39b
cleanups 2025-07-31 10:24:28 -04:00
scgbckbone
7bd952973e bugfix: use full LCD display width (34) when displaying seed words; new OUT_CTRL_NOWRAP flag for stories 2025-07-31 10:11:57 -04:00
chad
aa4524339b restore note on 520 byte stack element limit 2025-07-31 09:59:02 -04:00
chad
5dd034c051 update documentation for multisig quorum constraints 2025-07-31 09:59:02 -04:00
scgbckbone
f90973af9b Bull Bitcoin export 2025-07-31 09:58:06 -04:00
nvk
d71f24959c reorder/rename exports and add Cove 2025-06-12 12:26:56 -04:00
scgbckbone
00b05e20b8 remove linux address patch 2025-06-11 09:18:13 -04:00
scgbckbone
11da344abf multiprocess simulator 2025-06-11 08:32:22 -04:00
dependabot[bot]
89dfe1f6d4 Bump requests from 2.32.3 to 2.32.4 in /testing
Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-10 09:11:02 -04:00
scgbckbone
81f2830425 fix word_wrap; adjust tests for new double wide policy 2025-06-06 09:54:53 -04:00
scgbckbone
efb445fbe3 CHANGE -> CHANGE BACK 2025-06-03 11:34:30 -04:00
scgbckbone
0a899727b5 move OP_RETURN ux rendition from chains to render_output 2025-06-03 11:34:30 -04:00
scgbckbone
6d17350293 QRs in txn output explorer 2025-06-03 11:34:30 -04:00
scgbckbone
86d5eb890b remove dup comment 2025-06-03 10:54:34 -04:00
scgbckbone
b3b384b7d6 sort manifest modules alphabetically 2025-06-03 10:54:34 -04:00
scgbckbone
6dbedfaeb5 move shared modules from version manifests to default manifest.py 2025-06-03 10:54:34 -04:00
scgbckbone
e29e0b65e3 is None, not equals None 2025-06-03 09:20:12 -04:00
scgbckbone
2b750c993b word_wrap: if last character is double wide on Q move to next line 2025-06-03 09:19:31 -04:00
scgbckbone
17a715bfc5 bugfix: PSBT corner cases 2025-06-03 09:18:42 -04:00
Peter D. Gray
15678037d5
New release: 2025-05-14T1344-v5.4.3 2025-05-14 09:44:42 -04:00
Peter D. Gray
213fdd3c57
Signed for mk4 release. 2025-05-14 09:44:38 -04:00
Peter D. Gray
406ab5adaa
New release: 2025-05-14T1343-v1.3.3Q 2025-05-14 09:43:24 -04:00
Peter D. Gray
416f2efffd
Signed for q1 release. 2025-05-14 09:43:20 -04:00
Peter D. Gray
8aba8fe655
Revert "Signed for q1 release."
This reverts commit 4a0cd36c9c.
2025-05-14 09:41:29 -04:00
Peter D. Gray
68d5a8fc35
Merge branch 'master' of github.com:Coldcard/firmware 2025-05-14 09:37:59 -04:00
Peter D. Gray
170b701e94
New release: 2025-05-14T1337-v1.3.3Q 2025-05-14 09:37:25 -04:00
Peter D. Gray
4a0cd36c9c
Signed for q1 release. 2025-05-14 09:37:21 -04:00
Peter D. Gray
6a5311e8f5
new release 2025-05-14 09:35:59 -04:00
Peter D. Gray
20a8d14ede
updates 2025-05-14 09:34:56 -04:00
scgbckbone
bab58af710 UX story fix; improve warning tests 2025-05-14 09:16:29 -04:00
scgbckbone
d4c4cc1b69 remove exception dumping to console 2025-05-13 12:07:32 -04:00
Peter D. Gray
75a9f9f3eb
placement 2025-05-13 11:49:12 -04:00
Peter D. Gray
e856343c66
More 2025-05-13 11:11:47 -04:00
scgbckbone
51bbee9eb1 bugfix: Mk4: fix extended keys not fully visible in stories 2025-05-13 11:00:43 -04:00
Peter D. Gray
f40d16b76b
tweaks 2025-05-13 10:54:03 -04:00
Peter D. Gray
227196da42
version bump 2025-05-13 09:51:08 -04:00
scgbckbone
ea9d183a48 bugfix: PUSHDATA2 in scripts cause yikes
bugfix: missing warning summary in the top of the story for unknown scripts
2025-05-12 13:03:46 -04:00
scgbckbone
32cfd53569 exceptions also stop after first loop if nothing else enabled 2025-05-12 11:15:03 -04:00
scgbckbone
49087f6f41 bugfix: master settings corrupted by using "Add current tmp" in Seed Vault 2025-05-09 10:13:52 -04:00
scgbckbone
6c0ee684dc bugfix: Mk4: export loop for devices with NFC=ViDsk=0 2025-04-28 11:33:58 -04:00
scgbckbone
bee2f95e0a bugfix: disable teleport PSBT from CC without secret; update menu tree 2025-04-23 08:28:47 -04:00
Peter D. Gray
594e64affc
markdown 2025-04-16 15:56:48 -04:00
Peter D. Gray
6f3cbf20c8
New release: 2025-04-16T1908-v5.4.2 2025-04-16 15:08:10 -04:00
Peter D. Gray
7ca83c5929
Signed for mk4 release. 2025-04-16 15:08:06 -04:00
Peter D. Gray
3bf9c13bbb
New release: 2025-04-16T1906-v1.3.2Q 2025-04-16 15:06:51 -04:00
Peter D. Gray
063ee4cf4d
Signed for q1 release. 2025-04-16 15:06:48 -04:00
Peter D. Gray
d7b9ed4813
time levels 2025-04-16 15:05:28 -04:00
Peter D. Gray
10b82e080f
edits 2025-04-16 15:01:32 -04:00
Peter D. Gray
a1b319347a
update test 2025-04-16 14:10:37 -04:00
scgbckbone
709207f28e
bugfix: only export BBQr for multisig core, coldcard, and pretty descriptor (contains newlines, cannot read from simple QR) 2025-04-16 13:05:25 -04:00
Peter D. Gray
c680b0461f
Revert "mk4: decrease CHAR_PER_W from 19 to 18 (one char missing in view)"
This reverts commit 33a2567452d944a724ec0571da1859ab6c028910.
2025-04-16 09:17:11 -04:00
scgbckbone
a4fa421a17
mk4: decrease CHAR_PER_W from 19 to 18 (one char missing in view) 2025-04-16 08:59:52 -04:00
scgbckbone
2f35c0d496
small nits 2025-04-16 08:58:20 -04:00
scgbckbone
315e650344 refuse to do ownership scan with regtest address on mainnet 2025-04-15 11:09:17 -04:00
scgbckbone
d9be8cb2f1
locktime ux fix (less spacing) 2025-04-15 10:42:50 -04:00
scgbckbone
176a7f80cb
change: Lock Down Seed needs confirm key (4) 2025-04-15 10:42:00 -04:00
Peter D. Gray
2441e6044e
edits 2025-04-15 10:38:53 -04:00
Peter D. Gray
f076695120
cover -factory.dfu as well 2025-04-15 10:34:40 -04:00
Peter D. Gray
6a3c8ae676
New bootrom version releases 2025-04-15 10:06:16 -04:00
Peter D. Gray
28926acd06
bugfix 2025-04-15 09:36:19 -04:00
Peter D. Gray
adcf2c8e22
compilier compat 2025-04-15 09:09:17 -04:00
Peter D. Gray
1ae8c51a3c
feel good msg 2025-04-14 10:41:24 -04:00
Peter D. Gray
36d4df8a49
nits 2025-04-14 10:17:46 -04:00
scgbckbone
1aed412080 teleport testing protocol 2025-04-14 10:12:44 -04:00
Peter D. Gray
bc0f3e2d12
Merge branch 'master' of github.com:Coldcard/firmware 2025-04-14 09:55:26 -04:00
Peter D. Gray
cae59ecddd
edits 2025-04-14 09:55:22 -04:00
scgbckbone
9b95d29152 fix rename in Seed Vault 2025-04-14 09:47:25 -04:00
scgbckbone
d376c4efbf bugfix: temporary seed from CC backup failed to load stored multisig wallets 2025-04-14 09:27:09 -04:00
scgbckbone
e021fc7317 finalize foreign single sig outputs from PSBT partial signatures 2025-04-14 09:17:29 -04:00
scgbckbone
ef72dc00ae fix Mk4 re-export infinite loop 2025-04-14 09:14:02 -04:00
scgbckbone
e2fc69661a NFC selftest - revert to simple share and stop 2025-04-11 07:17:16 -04:00
Peter D. Gray
b65f2948d4
better feels on version number 2025-04-10 10:01:15 -04:00
scgbckbone
fbbf0a3413 bugfix: fix "Wipe -> Wallet" trick pin option 2025-04-10 09:49:37 -04:00
scgbckbone
c4b7260686 fix it 2025-04-10 09:49:04 -04:00
Peter D. Gray
6a63c7bde9
Merge branch 'master' of github.com:Coldcard/firmware 2025-04-10 09:48:51 -04:00
Peter D. Gray
efd5a4ff45
edits 2025-04-10 09:48:44 -04:00
scgbckbone
b866e0912d improve responsiveness of Teleport UX 2025-04-09 15:06:16 -04:00
scgbckbone
9ba8aeaaad kt_send_psbt fix 2025-04-09 14:14:01 -04:00
scgbckbone
3239dc6cd5 improve re-export UX; unify USB to done_signing; bugfixes 2025-04-09 14:04:26 -04:00
Peter D. Gray
8a18e413e9
better URL 2025-04-08 09:35:02 -04:00
scgbckbone
78fcfa56a5 backup fixes 2025-04-08 09:34:24 -04:00
Peter D. Gray
634bb69873
edits 2025-04-07 16:35:55 -04:00
Peter D. Gray
00f8d7a5ca
ux feedback 2025-04-07 15:38:27 -04:00
Peter D. Gray
0a200d1f1c
ktrx is semi-ephemeral 2025-04-07 15:38:17 -04:00
Peter D. Gray
30bc6a1f57
cleanups/bugs 2025-04-07 13:48:18 -04:00
Peter D. Gray
f23d7f09bf
add full backup to key-teleport 2025-04-05 13:33:09 -04:00
Peter D. Gray
5c5f8902a1
better pw display 2025-04-05 11:17:00 -04:00
Peter D. Gray
6bba62224c
add T shortcut for other modes where Advanced/Tools is shown 2025-04-05 11:00:29 -04:00
Peter D. Gray
8837cdcdda
Merge branch 'master' of github.com:Coldcard/firmware 2025-04-04 11:51:48 -04:00
Peter D. Gray
c4b56d95d0
key teleport MS test 2025-04-04 11:51:44 -04:00
scgbckbone
2156844d18 UX showing words now offers NFC, Q1 hint icons; full wipe NFC chip after secret data shared 2025-04-04 11:07:37 -04:00
scgbckbone
b47412bbc1 fixes 2025-04-03 10:05:00 -04:00
scgbckbone
1ca170946f sign multisig export artifacts 2025-04-02 13:53:12 -04:00
scgbckbone
0dedaf353d CCC usability improvements;ability to remove all addrs from whitelist (with confirmation) 2025-04-02 13:16:17 -04:00
scgbckbone
6779345665 fix default NFC screen prompt for Q 2025-04-02 12:51:26 -04:00
scgbckbone
698f84ff97 empty list checks 2025-04-01 16:22:12 -04:00
scgbckbone
6a5f4843aa fix error message order, first check for our/other keys then validate multisigs 2025-04-01 15:27:55 -04:00
scgbckbone
e851e4382a stop scanning upon receiving unsupported data 2025-03-31 14:48:23 -04:00
Peter D. Gray
fc21241a49
fun real vs simu test 2025-03-31 11:52:56 -04:00
scgbckbone
5de2ba364d finalize multisig error messages 2025-03-31 11:50:36 -04:00
scgbckbone
cc62502ab1 test fixes 2025-03-31 09:45:10 -04:00
Peter D. Gray
0815fbcc81 little fixes 2025-03-28 15:08:57 -04:00
Peter D. Gray
a676ef8eb7 rework post-signing save process 2025-03-28 15:08:57 -04:00
Peter D. Gray
78e560376c refactor-out msgsign.py from auth.py 2025-03-28 15:08:57 -04:00
Peter D. Gray
7e65cc3e47 robustness fix 2025-03-28 15:08:57 -04:00
Peter D. Gray
a954821826 sign our leg from teleport co-signer menu 2025-03-28 15:08:57 -04:00
Peter D. Gray
828b09dba2 teleport 2-of-15 2025-03-28 15:08:57 -04:00
Peter D. Gray
2b88a14124 bugfix 2025-03-28 15:08:57 -04:00
Peter D. Gray
8acb15e4ce historical note 2025-03-28 15:08:57 -04:00
scgbckbone
97d8398e8a remove finms: always finalize multisig txns if possible 2025-03-28 15:08:57 -04:00
Peter D. Gray
5f87d21811 refactoring NFC 2025-03-28 15:08:57 -04:00
Peter D. Gray
5c8a73ddb0 catch bad numeric password 2025-03-28 15:08:57 -04:00
Peter D. Gray
979a4e65e9 nits 2025-03-28 15:08:57 -04:00
Peter D. Gray
6e5c68abe5 bugfix, cleanups 2025-03-28 15:08:57 -04:00
Peter D. Gray
d3634b3448 test bug fixes 2025-03-28 15:08:57 -04:00
scgbckbone
67fa34666d fixes 2025-03-28 15:08:57 -04:00
Peter D. Gray
39adb2ac41 Multisig PSBT support 2025-03-28 15:08:57 -04:00
Peter D. Gray
6fd2ef619e remove checksum on rx pubkey 2025-03-28 15:08:57 -04:00
Peter D. Gray
4f25f6dbf5 nits 2025-03-28 15:08:57 -04:00
Peter D. Gray
b4eeeda53a key teleport tests 2025-03-28 15:08:57 -04:00
Peter D. Gray
f8bc38b558 fixes 2025-03-28 15:08:57 -04:00
Peter D. Gray
414793053e teleport tests 2025-03-28 15:08:57 -04:00
Peter D. Gray
b885976601 added quick note 2025-03-28 15:08:57 -04:00
Peter D. Gray
ec64a9aa38 Seedvault refactor, more on KT 2025-03-28 15:08:57 -04:00
Peter D. Gray
0aa0fc4500 Rebased 2025-03-28 15:08:57 -04:00
scgbckbone
3ebde0ea34 change: "Destroy Seed" purges all Trick PINs from SE2 2025-03-27 15:04:50 -04:00
scgbckbone
b6098a94e5 bugfix: check candidate Main PIN with trick pins from SE2, not just settings 2025-03-27 15:04:50 -04:00
scgbckbone
e726637319 add test for getting C key from Seed Vault 2025-03-27 13:52:56 -04:00
scgbckbone
446bea9926 bugfix: auto-vdisk, do not consider already signed PSBTs; fix stucked at Reading... screen 2025-03-27 12:37:11 -04:00
scgbckbone
9a28d36097 signing artifacts re-export 2025-03-27 11:00:07 -04:00
scgbckbone
a4d7f884c0 remove finms: always finalize multisig txns if possible 2025-03-27 10:02:46 -04:00
scgbckbone
ce1ce080ab fix qrs force_msg 2025-03-24 09:13:25 -04:00
Peter D. Gray
e06449f59f
I should prefer testing before pushing 2025-03-14 12:02:13 -04:00
Peter D. Gray
ffda830f66
personal perference 2025-03-14 11:53:40 -04:00
scgbckbone
d23187f187 multisig tx finalization 2025-03-14 11:50:56 -04:00
scgbckbone
15766b418d CCC test fix 2025-03-14 09:07:12 -04:00
Peter D. Gray
7450940730
tweak 2025-03-11 13:31:29 -04:00
scgbckbone
d1fd24c9ef improve CCC enable UX 2025-03-11 13:29:57 -04:00
scgbckbone
19ce22e607 deltamode: wipe mcu key slot before getting actual secret 2025-03-11 13:28:18 -04:00
scgbckbone
4476089d0f bugfix: Selftest SD card test for Q 2025-03-11 11:29:48 -04:00
scgbckbone
341265c486 bugfix: hanging progress bar after Selftest on Q 2025-03-11 11:29:48 -04:00
scgbckbone
f3a2f59549 bugfix: enable to restore backup with custom bkpw 2025-03-11 10:32:08 -04:00
scgbckbone
4a245ce553 more robust export NFC export; export wallet in loop with selected account number 2025-03-11 10:15:21 -04:00
Peter D. Gray
de443d5b89
by request of factory; saves a click 2025-03-10 14:42:34 -04:00
Peter D. Gray
ff756f086e
Signed for removing edge factory release. 2025-03-10 11:54:31 -04:00
scgbckbone
cd1728b81d new parameter to "force_msg" during QR display 2025-03-10 09:55:04 -04:00
scgbckbone
633120b760 fix mk4 word menu; use new address display format for whitelist; fix mk4 compat in tests 2025-03-10 09:41:27 -04:00
scgbckbone
3fd8fb9dc1 remove dead code around CLEAR_PIN 2025-03-10 09:30:41 -04:00
scgbckbone
7a27adfcfd bugfix: implement missing if wrong pin options 2025-03-10 09:26:40 -04:00
scgbckbone
33faa04652 bugfix: UI multisig derivation for root keys in Address Explorer 2025-03-10 09:08:19 -04:00
Peter D. Gray
56f0d56a08
missed year bump 2025-02-27 11:52:54 -05:00
Peter D. Gray
481d64d2dd
handle larger firmware 2025-02-27 11:52:15 -05:00
Peter D. Gray
e3ae6bcbdf
Cleanup use of MAX_TXN_LEN_MK4 vs. MAX_TXN_LEN 2025-02-27 10:37:33 -05:00
Peter D. Gray
e150150d11
performance upgrade 2025-02-27 09:50:28 -05:00
Peter D. Gray
f117423210
better progress bars 2025-02-27 09:46:26 -05:00
scgbckbone
962bb4b0f2 enumerate default option before offering to choose non-zero acct num in PICK_ACCOUNT 2025-02-27 09:04:00 -05:00
scgbckbone
ae9806f702 clear dispaly after usb failure - do not hang on Receiving... 2025-02-27 09:03:40 -05:00
Peter D. Gray
66e4cf130f
Updated 2025-02-27 09:03:12 -05:00
Peter D. Gray
72fef6d5b8
comments 2025-02-27 09:02:30 -05:00
Peter D. Gray
bb3073af76
edits 2025-02-26 10:28:51 -05:00
Peter D. Gray
b09bb521a8
version big bump 2025-02-26 10:16:25 -05:00
Peter D. Gray
22ff7b1fe9
edits 2025-02-26 10:12:39 -05:00
Peter D. Gray
7eb5a7ea03
copy tweets 2025-02-26 09:53:12 -05:00
doc-hex
6b9e2ef9b9
Merge pull request #473 from scgbckbone/ccc
ColdCard Cosign = CCC
2025-02-26 09:48:18 -05:00
scgbckbone
7c9436d237 after rebase fixes 2025-02-26 12:05:48 +01:00
scgbckbone
8bf4731cf5 remove ccc confirm with (4) key; remove ccc tests 2025-02-26 12:05:48 +01:00
Peter D. Gray
e14fb64904 numbers for humans 2025-02-26 12:05:48 +01:00
scgbckbone
12f62f95bc unique ms names from ccc feature; multiple ms wallets test 2025-02-26 12:05:48 +01:00
scgbckbone
58eec8be8b load C key + seed vault access 2025-02-26 12:05:48 +01:00
scgbckbone
b5a6bf5d18 test signing with C key as tmp 2025-02-26 12:05:48 +01:00
scgbckbone
70acd6a602 test export C XPUBs 2025-02-26 12:05:48 +01:00
scgbckbone
1fe0c58b76 maxed tests 2025-02-26 12:05:48 +01:00
scgbckbone
18ea47f334 more velocity + warning ccc tests 2025-02-26 12:05:48 +01:00
Peter D. Gray
96b8d48136 text 2025-02-26 12:05:48 +01:00
scgbckbone
4a463da9db master rebase; fix test_decoders.py; NLOCK_IS_TIME moved to constants.py 2025-02-26 12:05:48 +01:00
Peter D. Gray
239d1ebd00 Copy changes, 25-addr limit 2025-02-26 12:05:48 +01:00
Peter D. Gray
77956158ae key rotated to final value 2025-02-26 12:05:48 +01:00
Peter D. Gray
3d4336bab7 edits 2025-02-26 12:05:48 +01:00
Peter D. Gray
b2f6e290d1 lowercase 2025-02-26 12:05:48 +01:00
scgbckbone
f920020ba0 simulator nLockTime 2025-02-26 12:05:48 +01:00
Peter D. Gray
4a234e8452 tweaks 2025-02-26 12:05:48 +01:00
scgbckbone
d980c42dad ccc velocity review 2025-02-26 12:05:48 +01:00
scgbckbone
37c7119ae4 ccc velocity 2025-02-26 12:05:48 +01:00
scgbckbone
ab55c00065 non-async func 2025-02-26 12:05:48 +01:00
scgbckbone
6f93847f8a fixes 02 2025-02-26 12:05:48 +01:00
scgbckbone
2eb615b358 reworked 2025-02-26 12:05:48 +01:00
Peter D. Gray
c899f6e7ce key C from vault, stash cleanups 2025-02-26 12:05:48 +01:00
scgbckbone
d0f7a451ef small fixes 2025-02-26 12:05:48 +01:00
Peter D. Gray
14be94e049 file import 2025-02-26 12:05:48 +01:00
Peter D. Gray
5fb1839620 more 2025-02-26 12:05:48 +01:00
scgbckbone
a2eed31416 CCC config first time entry without C key prompt 2025-02-26 12:05:48 +01:00
Peter D. Gray
9203c4f2aa more 2025-02-26 12:05:48 +01:00
Peter D. Gray
3d08b749b3 sign w/ other key 2025-02-26 12:05:48 +01:00
Peter D. Gray
58b5d1071f cleanup 2025-02-26 12:05:48 +01:00
Peter D. Gray
f795f9027f generalize number entry (mk4) 2025-02-26 12:05:48 +01:00
Peter D. Gray
2cf006beaa moved to web2fa 2025-02-26 12:05:48 +01:00
Peter D. Gray
0c28987190 more web2fa code 2025-02-26 12:05:48 +01:00
Peter D. Gray
012433aba4 19 seems to work and looks better 2025-02-26 12:05:48 +01:00
Peter D. Gray
57cdd69c81 Lots of UX and some TODOs 2025-02-26 12:05:48 +01:00
Peter D. Gray
9e082570aa test code for web backend 2025-02-26 12:05:48 +01:00
Peter D. Gray
117daaf17f todoos 2025-02-26 12:05:48 +01:00
Peter D. Gray
359d05dc7b note 2025-02-26 12:05:48 +01:00
Peter D. Gray
77059ffcf1 about ccc 2025-02-26 12:05:48 +01:00
Peter D. Gray
17306e2a38 about ccc 2025-02-26 12:05:48 +01:00
Peter D. Gray
1f1045b401 docs 2025-02-26 12:05:48 +01:00
Peter D. Gray
29b860e84e cleanups 2025-02-26 12:05:48 +01:00
Peter D. Gray
0849e538b5 2fa link encryption, tests 2025-02-26 12:05:48 +01:00
Peter D. Gray
44dae36141 faster q seed word entry 2025-02-26 12:05:48 +01:00
Peter D. Gray
8a8860d9a0 cleanups 2025-02-26 12:05:48 +01:00
Peter D. Gray
0a185669d0 more conservative 2025-02-26 12:05:48 +01:00
Peter D. Gray
6445fad042 lowercase 2025-02-26 12:05:48 +01:00
scgbckbone
0ccd701421 simulator nLockTime 2025-02-26 12:05:48 +01:00
Peter D. Gray
7ff8342e01 more 2025-02-26 12:05:48 +01:00
Peter D. Gray
0009028817 tweaks 2025-02-26 12:05:48 +01:00
scgbckbone
7e9ce496d8 ccc velocity review 2025-02-26 12:05:48 +01:00
scgbckbone
869e317db8 ccc velocity 2025-02-26 12:05:48 +01:00
Peter D. Gray
6df24f646d Bugs 2025-02-26 12:05:48 +01:00
Peter D. Gray
9d863edcdb misc 2025-02-26 12:05:48 +01:00
Peter D. Gray
4c308205a6 debug fails 2025-02-26 12:05:48 +01:00
scgbckbone
2641650090 non-async func 2025-02-26 12:05:48 +01:00
scgbckbone
84a476d586 addr -> addrs 2025-02-26 12:05:48 +01:00
scgbckbone
8b97535a40 whitelist init 2025-02-26 12:05:48 +01:00
scgbckbone
119fc35c43 fix 2025-02-26 12:05:48 +01:00
scgbckbone
2feade4f74 proper storage serialization + whitelist tests for Q 2025-02-26 12:05:48 +01:00
scgbckbone
9761c65614 fixes 02 2025-02-26 12:05:48 +01:00
Peter D. Gray
00d8c841f7 auth checks 2025-02-26 12:05:48 +01:00
scgbckbone
531ae613c7 reworked 2025-02-26 12:05:48 +01:00
scgbckbone
ac782fdd59 signing psbt POC 2025-02-26 12:05:48 +01:00
Peter D. Gray
d35ccc1ade key C from vault, stash cleanups 2025-02-26 12:05:48 +01:00
scgbckbone
2c52cca4bd test fix 2025-02-26 12:05:48 +01:00
scgbckbone
07e66811f3 yikes on Q 2025-02-26 12:05:48 +01:00
Peter D. Gray
077d502139 copy 2025-02-26 12:05:48 +01:00
scgbckbone
4030f6f59f small fixes 2025-02-26 12:05:48 +01:00
scgbckbone
15990fa0f6 use secp256k1 for 2FA tests 2025-02-26 12:05:48 +01:00
Peter D. Gray
ef01a57626 file import 2025-02-26 12:05:48 +01:00
Peter D. Gray
d21515e2cf whitelist import by qr 2025-02-26 12:05:48 +01:00
Peter D. Gray
fc5e99c226 more 2025-02-26 12:05:48 +01:00
scgbckbone
bc59709966 only push CCCConfig if first time 2025-02-26 12:05:48 +01:00
scgbckbone
d983549fae CCC config first time entry without C key prompt 2025-02-26 12:05:48 +01:00
scgbckbone
b6fc24e705 CCC setup test fixtures 2025-02-26 12:05:47 +01:00
Peter D. Gray
fcae022ba8 block exit 2025-02-26 12:05:47 +01:00
Peter D. Gray
65d202160e oops 2025-02-26 12:05:47 +01:00
Peter D. Gray
4fb37d7850 multisig 2025-02-26 12:05:47 +01:00
Peter D. Gray
5b69ec07fc more 2025-02-26 12:05:47 +01:00
Peter D. Gray
60d254314b sign w/ other key 2025-02-26 12:05:47 +01:00
Peter D. Gray
0f3fe830b9 Cleanup 2025-02-26 12:05:47 +01:00
Peter D. Gray
4087f8f25b cleanup 2025-02-26 12:05:47 +01:00
Peter D. Gray
6b770024ce rename url_encode to quote 2025-02-26 12:05:47 +01:00
Peter D. Gray
bbd8f9b282 generalize number entry (mk4) 2025-02-26 12:05:47 +01:00
Peter D. Gray
d81d6ea80c moved to web2fa 2025-02-26 12:05:47 +01:00
Peter D. Gray
8edef87ae5 refactor for reuse 2025-02-26 12:05:47 +01:00
Peter D. Gray
9cc6ce368d more web2fa code 2025-02-26 12:05:47 +01:00
Peter D. Gray
e037037924 19 seems to work and looks better 2025-02-26 12:05:47 +01:00
Peter D. Gray
5b38dd87a6 Lots of UX and some TODOs 2025-02-26 12:05:47 +01:00
Peter D. Gray
b55db05aab test code for web backend 2025-02-26 12:05:47 +01:00
doc-hex
6d4b3d6990
Merge pull request #471 from scgbckbone/unreadable_qrs
always choose the biggest possible display size for QR on LCD
2025-02-24 08:39:05 -05:00
doc-hex
c7d216fff3
Merge pull request #470 from scgbckbone/bitcoin_safe_export
add Bitcoin Safe to Export menu
2025-02-24 08:37:52 -05:00
scgbckbone
a3f815a74d always choose the biggest possible display size for QR on LCD 2025-02-24 13:53:50 +01:00
scgbckbone
e61493668b add Bitcoin Safe to Export menu 2025-02-24 13:39:41 +01:00
Peter D. Gray
eb325e5fec
Signed for Edge release. 2025-02-19 15:41:02 -05:00
Peter D. Gray
242641d396
version bump 2025-02-13 09:35:13 -05:00
Peter D. Gray
a507677dc1
New release: 2025-02-13T1415-v5.4.1 2025-02-13 09:15:16 -05:00
Peter D. Gray
262c4ea717
Signed for mk4 release. 2025-02-13 09:15:13 -05:00
Peter D. Gray
a16516b8e1
New release: 2025-02-13T1413-v1.3.1Q 2025-02-13 09:14:01 -05:00
Peter D. Gray
695c3b4b29
Signed for q1 release. 2025-02-13 09:13:57 -05:00
Peter D. Gray
08bb9783d2
update for new release 2025-02-13 09:09:43 -05:00
Peter D. Gray
4515e688ed
fixing tests 2025-02-13 09:04:21 -05:00
Peter D. Gray
5694ada611
Ownership success UX story title compat Mk4/Q 2025-02-13 09:02:04 -05:00
Peter D. Gray
d2636c7621
edits 2025-02-12 13:23:28 -05:00
scgbckbone
67febe2758 BBQr switch in QR File Share 2025-02-12 13:10:10 -05:00
scgbckbone
7e6be45e2d fix: multisg address display 2025-02-12 12:19:53 -05:00
scgbckbone
660b4617bd fix: busy bar after failed calc_qr 2025-02-12 12:08:56 -05:00
scgbckbone
afe85a3772 fix: id hint while displaying qr segwit address overlap QR 2025-02-12 12:08:30 -05:00
scgbckbone
6c91bd7328 allow multisig descriptor with root keys 2025-02-12 11:12:28 -05:00
Peter D. Gray
9c7f4c5451
Merge branch 'master' of github.com:Coldcard/firmware 2025-02-11 10:03:07 -05:00
Peter D. Gray
4ea455aa20
add sort-notes feature 2025-02-11 10:02:55 -05:00
scgbckbone
9e38974f7a revert: mpy submodule commit 2025-02-11 09:07:13 -05:00
scgbckbone
75751b8d2b testing: fix multisg tests after UI text improvements 2025-02-11 08:42:18 -05:00
Peter D. Gray
dd66cd8811
verify addr in QR better, fix some related issues 2025-02-10 11:48:59 -05:00
Peter D. Gray
a640dd5d78
bugfix 2025-02-10 10:44:00 -05:00
Peter D. Gray
14e85304df
asperation 2025-02-10 10:33:15 -05:00
Peter D. Gray
1eec58ece7
merge and reword 2025-02-10 10:28:15 -05:00
Peter D. Gray
41cde6be6c
text tweaks 2025-02-10 09:55:50 -05:00
Peter D. Gray
15536e4c9e
fix double space 2025-02-10 09:43:39 -05:00
scgbckbone
2feb991d96 msg sign: address format from standard derivation paths if address format not specified 2025-02-07 11:50:20 -05:00
scgbckbone
a2bdfc9a58 msg sign: Sparrow QR compat 2025-02-07 11:50:20 -05:00
Peter D. Gray
d3c50521e8
linebreak 2025-02-07 11:41:13 -05:00
Peter D. Gray
2558ed7ac0
text tweaks 2025-02-07 11:30:39 -05:00
Peter D. Gray
4f8f1fe593
edits 2025-02-07 11:26:51 -05:00
scgbckbone
3878897369 testing: fix test_msas_enable_disable 2025-02-06 08:06:09 -05:00
scgbckbone
1a18258b5a new address format for UX display 2025-02-05 11:28:09 -05:00
scgbckbone
38c92ef0c1 show ms address qr is msas=1 2025-02-04 12:48:38 -05:00
scgbckbone
cc7097b4f7 stabilize temporary seed tests 2025-02-02 11:46:06 -05:00
scgbckbone
9b597592bc option to show/export full multisig addresses; do not return to home menu after setting unsort_ms 2025-01-31 12:20:48 -05:00
scgbckbone
70d303af78 add ability to use master bkpw for tmp seeds; add bkpw override 2025-01-28 12:08:01 -05:00
Peter D. Gray
cd6d74d9f3
note 2025-01-23 09:14:00 -05:00
Dmitry Monakhov
a71f350c78 deltamode & xor_seed
Die rather than give up our secrets

- Do not allow split master via SeedXOR
- Do not allow to use master and seedvault in SeedXOR restore.
2025-01-23 09:11:56 -05:00
scgbckbone
ce1026cb4b fix test_iss6743 after removal of SIGHASH_ALL from psbt input 2025-01-23 08:08:05 -05:00
scgbckbone
e039fb8603 update mpy submodule 2025-01-22 08:41:35 -05:00
scgbckbone
a0949ecb87 upgrade msg signing 2025-01-21 13:05:21 -05:00
scgbckbone
a8202972b3 default non-root derivation paths for sd/nfc msg signing 2025-01-21 13:05:21 -05:00
Peter D. Gray
85ff2dcf45
robustness 2025-01-17 12:04:37 -05:00
Peter D. Gray
262df4a257
bump 2025-01-17 12:04:29 -05:00
Peter D. Gray
e9d17e5efb
Merge branch 'master' of github.com:Coldcard/firmware 2025-01-17 09:05:12 -05:00
Peter D. Gray
513a3b8258
NFC hardware detect bug 2025-01-17 09:04:35 -05:00
scgbckbone
ac761c23d5 add message about successful master seed recovery when trying to use master as tmp 2025-01-17 08:30:14 -05:00
scgbckbone
de0a679eef add ability to switch between slip132 and bip32 representations of extended public keys in Export XPUB 2025-01-15 13:05:11 -05:00
scgbckbone
92a776cfc3 testnet4 2025-01-15 13:04:17 -05:00
Peter D. Gray
f2a3667593
fix for blank/3dots screen crash 2025-01-15 09:47:56 -05:00
scgbckbone
6b73eb2fa6 save bytes by removing some duplicate from glob import settings 2025-01-15 08:38:42 -05:00
scgbckbone
66b01c1fd5 special menu keys 1..9 change from cursor scroll-only to skip-to-item 2025-01-14 09:56:07 -05:00
scgbckbone
14ce2ca6e0 remove unnecessary validate_func arg from ux_input_numbers (Mk4) 2025-01-14 09:35:20 -05:00
scgbckbone
86fe33137f psbt: sighash not included in input data if SIGHASH_ALL 2025-01-14 08:18:54 -05:00
scgbckbone
c65280cd42 cope with buggy core 28.0 behavior wrt labels in importdescriptors 2025-01-07 08:52:07 -05:00
scgbckbone
2fb66da58d wider mk4 QR check 2025-01-07 08:49:08 -05:00
Tyler Nieman
87b5142145 add missing word to seed xor docs 2025-01-01 10:29:17 -05:00
scgbckbone
6aedb0a73a testing: speed up backup tests by removing artifacts after test 2024-12-19 08:43:45 -05:00
Peter D. Gray
072eb24ed9
Signed for q1 release. 2024-12-18 11:05:37 -05:00
spicyzboss
b443f38d60 docs: add space between words 2024-12-12 08:39:37 -05:00
scgbckbone
8957ad3c10 prevent ownership yikes 2024-11-25 09:43:52 -05:00
scgbckbone
d270cf66c6 provide generalized nfc reader function (saving bytes) 2024-11-25 09:43:32 -05:00
scgbckbone
c425fc6bcc improve Wipe LFS UX message 2024-11-25 09:42:17 -05:00
scgbckbone
c9882d7a8a save bytes drv_entro.py 2024-10-25 09:28:39 -04:00
scgbckbone
85b478346b Mk4: export descriptor as simple QR 2024-10-18 08:41:01 -04:00
scgbckbone
95b13083dc do not allow to delete current active tmp seed from seed vault and purge its settings 2024-10-17 12:44:45 -04:00
scgbckbone
5568082f35 deltamode & Seed Vault 2024-10-16 13:47:23 -04:00
scgbckbone
8f86ed1c0e deltamode & secure notes and passwords 2024-10-16 13:30:37 -04:00
scgbckbone
1b54536eff bugfix: bless firmware causes hanging progress bar 2024-10-16 13:29:58 -04:00
Henrique Albuquerque
d1d104cb7e Fix grammar error 2024-09-30 09:10:20 -04:00
scgbckbone
9e1ce7a956 do NOT allow to enable/disable Seed Vault while in temporary seed mode 2024-09-27 11:56:04 -04:00
scgbckbone
f30686f252 update menu-tree.txt 2024-09-24 08:54:56 -04:00
Peter D. Gray
3dbc9caa73
Bugfix: blank screen on boot 2024-09-23 14:39:00 -04:00
scgbckbone
114d1dd675 bugfix: seedless mode restore master status bar re-draw 2024-09-16 08:54:54 -04:00
Peter D. Gray
e64a623a4e
New release: 2024-09-12T1734-v5.4.0 2024-09-12 13:34:35 -04:00
Peter D. Gray
6514275a05
Signed for mk4 release. 2024-09-12 13:34:32 -04:00
Peter D. Gray
7a438fe834
For 2024-09-12T1734-v5.4.0 2024-09-12 13:34:31 -04:00
Peter D. Gray
81ebecddb6
New release: 2024-09-12T1733-v1.3.0Q 2024-09-12 13:33:24 -04:00
Peter D. Gray
b5f31fb9de
Signed for q1 release. 2024-09-12 13:33:20 -04:00
Peter D. Gray
0cac3b7c41
For 2024-09-12T1733-v1.3.0Q 2024-09-12 13:33:19 -04:00
Peter D. Gray
603109d36e
number 2024-09-12 13:31:36 -04:00
Peter D. Gray
2772af753c
better 2024-09-12 10:38:33 -04:00
Peter D. Gray
de186d5f27
bugfix w/ sd cards 2024-09-12 10:29:57 -04:00
Peter D. Gray
741189da06
Add changelog entry for 3.2.0 2024-09-12 09:25:57 -04:00
Peter D. Gray
e1b810c8f6
time-saving 2024-09-11 09:51:02 -04:00
scgbckbone
5e42fbf2fc derivation path used is always the one provided in multisig xpub json 2024-09-11 09:02:41 -04:00
scgbckbone
3ec3095e20 test fixes 2024-09-11 08:35:26 -04:00
scgbckbone
2d004bccd5 fix multiselect for menus with len > PER_M 2024-09-10 14:02:19 -04:00
scgbckbone
4e52900d10 UX multisig: more Wait... screens 2024-09-10 14:02:19 -04:00
Peter D. Gray
b1704a73b1
rc2 work 2024-09-10 09:47:27 -04:00
Peter D. Gray
24b1dc2251
ignore rc2 2024-09-10 09:40:45 -04:00
Peter D. Gray
2b0fb901b4
rc2 2024-09-10 09:38:52 -04:00
Peter D. Gray
22e3ec40e7
Version bump, release notes updated 2024-09-10 09:17:41 -04:00
scgbckbone
b6381fdbb5 bugfix: quiz after XOR split can be canceled; UI improvements 2024-09-10 09:06:01 -04:00
Peter D. Gray
8de49876b4
Merge branch 'master' of github.com:Coldcard/firmware 2024-09-09 15:36:50 -04:00
Peter D. Gray
837c649168
default brightness (on battery) from 80../releases/ChangeLog.md to 95../releases/ChangeLog.md 2024-09-09 15:36:43 -04:00
scgbckbone
dee80eef3a remove same account constraint 2024-09-09 13:58:36 -04:00
scgbckbone
ee2b721c27 prevent yikes upon N < 2, logix fix wrt own key 2024-09-09 13:58:36 -04:00
Peter D. Gray
915f103c8f
copy change matching 2024-09-09 11:42:37 -04:00
Peter D. Gray
dccf27b40e
py3.10.7 compat 2024-09-09 11:28:15 -04:00
Peter D. Gray
21b93f1f0b
copy & comment edits 2024-09-09 11:24:05 -04:00
Peter D. Gray
8a7f0d046c
noise 2024-09-09 10:43:24 -04:00
scgbckbone
602cc622bb BBQRs and Create Airgapped 2024-09-09 10:32:40 -04:00
Peter D. Gray
4579b1eff3
text edits 2024-09-04 11:16:26 -04:00
scgbckbone
fac58c6969 XOR from Seed Vault & multichoice menu 2024-09-04 10:43:31 -04:00
scgbckbone
7fc656ac53 docs: ATECC608 2024-09-03 13:52:47 -04:00
scgbckbone
383aafe6f7 bugfix: do not allow lateral scroll in Address Explorer when showing single address from custom path 2024-08-30 11:37:53 -04:00
scgbckbone
5fa2f385ef fix tests after re-word removal 2024-08-25 11:34:18 -04:00
scgbckbone
58f7c59a6e bugfix: do not re-word UX stories 2024-08-23 12:55:22 -04:00
scgbckbone
cdeeb7ee63 rename Legacy Multisig to Unsorted Multisig 2024-08-19 09:14:43 -04:00
scgbckbone
133c18e7c1 multisig: Named JSON wrapped descriptor imports 2024-08-19 09:14:43 -04:00
scgbckbone
48c7227c08 multisig: descriptor checksum is no longer required on import 2024-08-19 09:14:43 -04:00
scgbckbone
3edbb4e560 opt-in allow multi(non-BIP-67 multisig) 2024-08-19 09:14:43 -04:00
Peter D. Gray
592c2e324c
seems more correct 2024-08-16 12:42:19 -04:00
scgbckbone
5fa1b2ade9 remove Lamp Test 2024-08-14 08:47:55 -04:00
Peter D. Gray
93b7bcbf2b
text edits 2024-08-12 10:13:12 -04:00
scgbckbone
5059f5bdee Backup Password QR 2024-08-12 10:09:44 -04:00
scgbckbone
ea619e0596 SeedQR & XOR Seed 2024-08-12 10:09:44 -04:00
scgbckbone
457d3bd8a3 bugfix: Seed XOR UI, display correct letter B if own seed already added to the mix 2024-08-12 10:09:44 -04:00
scgbckbone
a3ef684e91 bugfix: only allow apllying xor restore if len(parts) > 1 2024-08-12 10:09:44 -04:00
scgbckbone
2715d87e37 bugfix: OP_RETURN null data 2024-08-09 09:44:52 -04:00
scgbckbone
08602b5d9a bugfix: writing to empty slot B 2024-08-05 11:28:50 -04:00
scgbckbone
7bbe300e7a libsecp256k1 context randomization before each signing session 2024-08-05 10:43:20 -04:00
Peter D. Gray
6ffdee7a84
comments 2024-07-26 11:45:42 -04:00
scgbckbone
ec27f410ea optimize: drop DER encoding from signature grinding 2024-07-26 11:42:55 -04:00
scgbckbone
4a1628f9d5 test low R grinding 2024-07-26 11:42:55 -04:00
scgbckbone
74bbcfacfd signatures always max 71 bytes 2024-07-26 11:42:55 -04:00
scgbckbone
2d85b3299c libsecp256k1 0.5.0 with newest libngu 2024-07-26 10:13:59 -04:00
scgbckbone
8ade0946c6 bugfix: Do not read whole PSBT into memory when writing finalized tx 2024-07-26 09:15:32 -04:00
scgbckbone
97c9ad5f9c bugfix: do not allow to import duplicate ms wallet with just shuffled keys 2024-07-26 08:57:18 -04:00
scgbckbone
1bc488214a Seed Vault UI alignment and double digits 2024-07-26 08:37:11 -04:00
scgbckbone
1536011f44 sighash tests runnable on real thing 2024-07-26 08:36:45 -04:00
andreasgriffin
89c59e4e4c Corrected install instructions 2024-07-25 11:39:12 -04:00
Fonta1n3
f5dc1a1d44 feat: add Fully Noded, compatible with FN v1.2.0.
FN v1.2.0 offers full multisig and single sig support for Coldcard Q1 bbqr wallet and psbt's flow.
2024-07-18 11:31:20 -04:00
scgbckbone
9471daab91 bugfix: dis.real_clear after BBQR is shown 2024-07-15 09:48:32 -04:00
scgbckbone
a1ce940436 QR file share, allow to share JSON via NFC file share, allow .sig 2024-07-15 08:53:39 -04:00
Peter D. Gray
840c87cf64
tense 2024-07-05 11:18:27 -04:00
Peter D. Gray
5eacd63cf5
edits 2024-07-05 11:15:22 -04:00
Peter D. Gray
dda27300dd
New release: 2024-07-05T1349-v5.3.3 2024-07-05 09:49:10 -04:00
Peter D. Gray
817ea30fa1
Signed for mk4 release. 2024-07-05 09:49:07 -04:00
Peter D. Gray
e4f925c7bf
For 2024-07-05T1348-v5.3.3 2024-07-05 09:49:06 -04:00
Peter D. Gray
aaddedd4c6
New release: 2024-07-05T1342-v1.2.3Q 2024-07-05 09:42:56 -04:00
Peter D. Gray
80d1b5317f
Signed for q1 release. 2024-07-05 09:42:52 -04:00
Peter D. Gray
f7a0902c1a
For 2024-07-05T1342-v1.2.3Q 2024-07-05 09:42:51 -04:00
Peter D. Gray
dfbc3c9031
next version 2024-07-05 09:40:38 -04:00
Peter D. Gray
577ea92e1e
better submodule checking 2024-07-05 09:37:16 -04:00
Peter D. Gray
e73765b9fb
update to latest 2024-07-05 08:39:15 -04:00
Peter D. Gray
1a72c70290
Signed for Edge release. 2024-07-04 11:18:55 -04:00
scgbckbone
d4c559a302 ui: newline in visualize bip21 2024-07-04 09:52:49 -04:00
Peter D. Gray
6d31ed05ef
mistake 2024-07-04 09:51:02 -04:00
Peter D. Gray
139009970b
switch to space in word menu 2024-07-04 09:49:39 -04:00
Peter D. Gray
5296a8aa7a
restored 2024-07-04 09:47:45 -04:00
Peter D. Gray
9eab533dd9
edits 2024-07-04 09:42:03 -04:00
scgbckbone
f0457bf4a7 bugfix: Fix yikes displaying BIP-85 WIF when both NFC and VDisk are OFF
Fix inability to export change addresses when both NFC and Vdisk id OFF
2024-07-03 09:42:01 -04:00
scgbckbone
deb6e542cd bugfix: dis.real_clear after simple QR is shown 2024-07-02 09:34:39 -04:00
scgbckbone
5cfc29878e bugfix: push tx custom URL yikes 2024-06-28 09:30:47 -04:00
nvk
a1c11c6e28
Merge pull request #384 from Coldcard/revert-383-master
Revert "Added labelbase.space PushTX instance,  but .."
2024-06-27 09:12:28 -04:00
doc-hex
f95f988078
Revert "Added labelbase.space PushTX instance, but .." 2024-06-27 09:08:14 -04:00
nvk
536bc43308
Merge pull request #383 from Labelbase/master
Added labelbase.space PushTX instance,  but ..
2024-06-27 08:39:48 -04:00
Xavier Fiechter
22befce4e6
Added labelbase.space PushTX instance, but ..
I'm not sure if you accept community instances at this point.
2024-06-27 14:34:32 +02:00
Peter D. Gray
fced4a9bd5
New release: 2024-06-26T1741-v5.3.2 2024-06-26 13:41:23 -04:00
Peter D. Gray
625b7b8ccc
Signed for mk4 release. 2024-06-26 13:41:18 -04:00
Peter D. Gray
fe703aba4e
New release: 2024-06-26T1739-v1.2.2Q 2024-06-26 13:39:45 -04:00
Peter D. Gray
44a0f874b5
Signed for q1 release. 2024-06-26 13:39:39 -04:00
Peter D. Gray
cf4f826c35
Prepare for new release 2024-06-26 09:49:33 -04:00
scgbckbone
ec246e292f only provide "Home Menu XFP" setting if master seed settings loaded 2024-06-26 09:26:15 -04:00
scgbckbone
5e37125bd8 test fixes 2024-06-26 09:26:02 -04:00
Peter D. Gray
34ae8b2bb0
move NFC PushTx into settings from Adv/Tools 2024-06-25 14:19:54 -04:00
Peter D. Gray
eaa03f56ed
improve tests 2024-06-25 13:23:03 -04:00
Peter D. Gray
f746755110
edits 2024-06-25 13:09:05 -04:00
scgbckbone
3e4f68e52c show XFP of B85 derived wallet in story (without user needing to activate it as tmp) 2024-06-25 13:04:26 -04:00
Peter D. Gray
03427e7bb5
bugfix: exporting didnt note non-zero account numbers 2024-06-25 13:03:54 -04:00
Peter D. Gray
e2901f8e28
update comments, whitespace 2024-06-25 10:33:02 -04:00
Peter D. Gray
e03d3d4339
style change, BIP-67 note added 2024-06-25 10:32:08 -04:00
scgbckbone
07bdad7211 add outgoing value and number of ins/outs to signing UX, limit change outs num in UX (scrollable with explorer) 2024-06-25 09:48:55 -04:00
Peter D. Gray
36a3558fb3
update comments 2024-06-25 09:38:55 -04:00
Peter D. Gray
cc7f24c75c
Merge branch 'master' of github.com:Coldcard/firmware 2024-06-25 09:37:46 -04:00
Peter D. Gray
69ed3bc9fc
updates 2024-06-25 09:37:37 -04:00
scgbckbone
40d7adea3c ubuntu 24.04 compiler warnings patch + python 3.12 compat 2024-06-24 10:10:15 -04:00
Peter D. Gray
13a8e16371
microcopy changes 2024-06-24 08:46:37 -04:00
scgbckbone
599ca53030 Home Menu XFP 2024-06-24 08:32:59 -04:00
scgbckbone
7f5aeb6143 testing: remove obsolete function SFFile.erase from tests 2024-06-24 08:31:45 -04:00
Peter D. Gray
76883a5d72
support newer QR modules 2024-06-24 08:27:55 -04:00
scgbckbone
ecbed88127 update limitatioons wrt p2sh-p2wpkh ownership 2024-06-21 08:58:44 -04:00
scgbckbone
e908083694 bugfix: ownership also search singlesig wrapped segwit if P2SH address provided 2024-06-21 08:58:44 -04:00
scgbckbone
13365dc258 remove obsolete function erase from SFFile 2024-06-20 15:14:15 -04:00
scgbckbone
7e1b6dd7b5 rename close to flush_out and only use explicitly use if needed inside contextmanager scope 2024-06-20 15:14:15 -04:00
scgbckbone
7cffec944d remove from ApproveTransaction class 2024-06-20 15:14:15 -04:00
scgbckbone
e1a17ac43f share push tx tests 2024-06-20 15:14:15 -04:00
scgbckbone
1abb04f928 bugfix: handle case when "n" is not defined 2024-06-20 15:14:15 -04:00
scgbckbone
9f1df84d26 allow share push tx from all import paths (SD/Vdisk, NFC, QR, USB) 2024-06-20 15:14:15 -04:00
scgbckbone
180fa944f3 bugfix: sharing push tx plain text 2024-06-20 15:14:15 -04:00
Peter D. Gray
604edbd21c
Merge branch 'master' of github.com:Coldcard/firmware 2024-06-20 13:39:56 -04:00
Peter D. Gray
3a433ce82b
nit 2024-06-20 13:39:49 -04:00
scgbckbone
41931df6df add Theya wallet to Export options 2024-06-20 09:25:46 -04:00
Peter D. Gray
d373a863ef
edits 2024-06-20 08:58:52 -04:00
scgbckbone
95d1476a68 bugfix: yikes exporting B85 via NFC when NFC is None 2024-06-20 08:56:50 -04:00
scgbckbone
2dc83743ed fix progress bar in address explorer; add progress bar to txn output explorer 2024-06-17 11:44:05 -04:00
scgbckbone
c7f06670c6 add shortcut to PSBT signing in NFC tools 2024-06-17 10:07:53 -04:00
Peter D. Gray
d712fe9d81
edits 2024-06-17 09:34:11 -04:00
Peter D. Gray
d1ad9f31f7
Merge branch 'master' into pushtx, edit notes 2024-06-17 09:27:06 -04:00
Peter D. Gray
df73778b1e
cleanup 2024-06-14 11:39:55 -04:00
Peter D. Gray
81f7af1857
test for nfc share to pushtx 2024-06-14 11:31:34 -04:00
Peter D. Gray
947ec35d68
handle too-big txn in nfc pushtx 2024-06-14 11:00:42 -04:00
Peter D. Gray
d68903b3bd
nfc push tx cases 2024-06-14 11:00:17 -04:00
Peter D. Gray
8335ccc009
comment 2024-06-14 09:39:58 -04:00
Peter D. Gray
de41770853
Add NFC pushtx from any existing file 2024-06-12 14:55:01 -04:00
Peter D. Gray
85c1a8cc63
add block diagram 2024-06-12 10:52:30 -04:00
Peter D. Gray
a6d87758f0
typo 2024-06-12 10:06:39 -04:00
Peter D. Gray
121f500d05
add our backend 2024-06-12 10:04:31 -04:00
Peter D. Gray
2b738fc2fd
example/links 2024-06-05 10:55:04 -04:00
Peter D. Gray
8c0e94715d
Updated URL for mempool 2024-06-04 08:52:30 -04:00
Peter D. Gray
24bfca106a
first pass NFC pushtx 2024-06-03 14:07:40 -04:00
scgbckbone
03ff4f842e tx output explorer; fix fake_ms_txn and add psbtV2; add ability to add multiple op_returns to fake_txn 2024-06-03 11:13:34 -04:00
Peter D. Gray
9fe6ab13ef
UX for pushtx enable/disable 2024-06-03 11:03:13 -04:00
Peter D. Gray
bc601ae1ec
add b2a_base64url 2024-06-03 11:03:01 -04:00
Peter D. Gray
34328a0d30
version bump 2024-06-03 09:08:03 -04:00
Peter D. Gray
90466a502a
edits 2024-06-03 09:06:39 -04:00
Peter D. Gray
4789bd85d5
cleanup 2024-06-03 08:58:44 -04:00
Peter D. Gray
ccfac53917
petty optimization 2024-06-03 08:56:07 -04:00
scgbckbone
8fb572bd21 only check strings with newline for legacy ms format in scan_any_qr 2024-06-03 08:55:01 -04:00
scgbckbone
c8cabd8948 compile regex for multi use 2024-06-03 08:55:01 -04:00
scgbckbone
53fe2d4e26 do not use ure for large data - can cause max recursion depth 2024-06-03 08:55:01 -04:00
scgbckbone
80c07f6c1e typo ready2sign 2024-06-03 08:36:56 -04:00
scgbckbone
ea4d489253 bugfix: showing 10 biggest outputs by value 2024-05-28 10:56:54 -04:00
scgbckbone
9dea698f1a Scan Any QR Code now detects CC multisig fromat; format and policy required in CC multisig format; fix legacy witness utxo test 2024-05-28 10:10:57 -04:00
scgbckbone
a0bf320e54 gc.collect removal 2024-05-28 09:57:59 -04:00
scgbckbone
b13f68a7be Lockdown seed menu tmp predicate + ux message to delete duress wallets 2024-05-28 09:47:23 -04:00
scgbckbone
2b99b94222 only allow nested segwit script in P2SH singlesig 2024-05-28 09:33:10 -04:00
scgbckbone
4e4847da1b bugfix: clear any pending keystrokes before PSBT approval screen 2024-05-28 08:40:14 -04:00
scgbckbone
f686236a16 farewell pycoin 2024-05-27 13:14:31 -04:00
scgbckbone
ca819b7dfd bugfix: yikes when showing change in address explorer if both NFC and VDisk OFF 2024-05-27 10:36:39 -04:00
scgbckbone
af3a2712cc bugfix: Tapsigner decryption 2024-05-21 11:17:56 -04:00
scgbckbone
9169bedc87 bugfix: psbt v2 PSBT_GLOBAL_TX_MODIFIABLE parsing 2024-05-17 11:10:35 -04:00
Peter D. Gray
a4133e1b1d
New release: 2024-05-09T1529-v1.2.1Q 2024-05-09 11:29:26 -04:00
Peter D. Gray
28d1b2f44a
Signed for q1 release. 2024-05-09 11:29:20 -04:00
Peter D. Gray
c45a6c33bc
New release: 2024-05-09T1527-v5.3.1 2024-05-09 11:28:04 -04:00
Peter D. Gray
090993b642
Signed for mk4 release. 2024-05-09 11:27:58 -04:00
Peter D. Gray
c89ad02972
For 2024-05-09T1527-v5.3.1 2024-05-09 11:27:57 -04:00
Peter D. Gray
cf289d4cb7
edits 2024-05-09 11:26:10 -04:00
scgbckbone
21174226db bugfix: reload trick pins after start-up sequence done with proper settings loaded 2024-05-09 11:13:18 -04:00
Peter D. Gray
7c0f225ff6
edits 2024-05-09 10:35:28 -04:00
scgbckbone
6b65efca11 multisig derivation paths migration 2024-05-09 10:32:32 -04:00
Peter D. Gray
b540d28124
symlink to share shared code between Mk4/Q 2024-05-08 10:51:20 -04:00
Peter D. Gray
950b604a93
version bump 2024-05-08 10:50:41 -04:00
Peter D. Gray
72c9390093
typo 2024-05-08 10:49:33 -04:00
Peter D. Gray
afd19c54cc
New release: 2024-05-06T1812-v1.2.0Q 2024-05-06 14:12:49 -04:00
Peter D. Gray
3f11894929
Signed for q1 release. 2024-05-06 14:12:43 -04:00
Peter D. Gray
71b5ef7f73
date 2024-05-06 14:12:31 -04:00
Peter D. Gray
7db94542bf
New release: 2024-05-06T1811-v5.3.0 2024-05-06 14:11:28 -04:00
Peter D. Gray
12b2febd7a
Signed for mk4 release. 2024-05-06 14:11:22 -04:00
Peter D. Gray
3fbde4a7a3
undo 2024-05-06 14:02:45 -04:00
scgbckbone
c5eb37d464 bugfix: provide all required positional args 2024-05-06 13:50:01 -04:00
Peter D. Gray
aa1e837ebe
New release: 2024-05-02T1407-v1.2.0Q 2024-05-02 10:08:00 -04:00
Peter D. Gray
f05da2460a
Signed for q1 release. 2024-05-02 10:07:55 -04:00
Peter D. Gray
6a58c27ae5
New release: 2024-05-02T1403-v5.3.0 2024-05-02 10:03:52 -04:00
Peter D. Gray
88b152076e
Signed for mk4 release. 2024-05-02 10:03:47 -04:00
Peter D. Gray
8ddd600b34
Signed for mk4 release. 2024-05-02 10:02:11 -04:00
scgbckbone
14c6365314 add HW model to "Signed for release" commit message 2024-05-02 09:58:37 -04:00
scgbckbone
492b3ef2f3 use "After N" instead of "After X" as 'X' is expanded to CANCEL in Q stories 2024-05-02 09:58:06 -04:00
Peter D. Gray
11297b8e8f
New release: 2024-05-02T1306-v1.2.0Q 2024-05-02 09:06:21 -04:00
Peter D. Gray
93d27beffc
Signed for release. 2024-05-02 09:06:15 -04:00
Peter D. Gray
34456a44b6
New release: 2024-05-02T1302-v5.3.0 2024-05-02 09:03:05 -04:00
Peter D. Gray
f572537d67
Signed for release. 2024-05-02 09:02:59 -04:00
Peter D. Gray
17a76482a6
comment 2024-05-02 08:55:20 -04:00
Peter D. Gray
071ae11d63
edits 2024-05-02 08:53:59 -04:00
scgbckbone
9a7d4a6312 custom fname for Zeus 2024-05-01 15:48:33 -04:00
scgbckbone
5aca245283 fix chosen checkmark of NonDefaultMenuItem for multisig and trick pins 2024-05-01 15:18:30 -04:00
scgbckbone
6e851b1271 bugfix: properly verify armored msg with regtest address 2024-05-01 14:52:56 -04:00
scgbckbone
77f576c50c bugfix: Q seed entry restrict allowed keys after final word inserted 2024-05-01 09:50:59 -04:00
scgbckbone
c028c5ba7b bugfix: idx hint extended to full range (0 to (2**31)-1) 2024-04-30 13:18:21 -04:00
scgbckbone
327cfa5505 force interface state during ftux 2024-04-30 11:39:07 -04:00
scgbckbone
f42518148a fix Mk4 QR codes v1 and v2; idx hint visibility fixed 2024-04-30 09:39:22 -04:00
scgbckbone
3886fa0019 NonDefaultMenuItem: mk4 lable size limit for checkmark 2024-04-29 11:26:56 -04:00
doc-hex
f11a345e87
Merge pull request #341 from scgbckbone/tweaks
update Mk4 ChangeLog
2024-04-29 10:48:56 -04:00
scgbckbone
7cf39eac2e
update Mk4 ChangeLog; remove mantion of SD card from generic export screen; test tweaks 2024-04-29 16:41:29 +02:00
Peter D. Gray
89b80e584f
bugfix 2024-04-29 09:41:27 -04:00
Peter D. Gray
cf03da130c
Fix for Pillow 10 2024-04-29 09:25:53 -04:00
doc-hex
df6f827f89
Merge pull request #340 from scgbckbone/forgotten_print
remove print
2024-04-27 10:47:47 -04:00
scgbckbone
5c0ae6f1e5
remove print 2024-04-27 16:24:09 +02:00
Peter D. Gray
341552f001
bugfix: code moved into subdir 2024-04-26 11:14:43 -04:00
doc-hex
359978aac8
Merge pull request #339 from Coldcard/dependabot/pip/misc/q1font/pillow-10.3.0
Bump pillow from 9.4.0 to 10.3.0 in /misc/q1font
2024-04-26 10:46:39 -04:00
Peter D. Gray
a040fe0097
Updates 2024-04-26 10:46:12 -04:00
dependabot[bot]
87ff4ea9c3
Bump pillow from 9.4.0 to 10.3.0 in /misc/q1font
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.4.0 to 10.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.4.0...10.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-26 14:28:50 +00:00
doc-hex
99dbca9d3d
Merge pull request #332 from Coldcard/q1staging
Q Firmware and Mk4 Updates
2024-04-26 10:21:49 -04:00
Peter D. Gray
7d82b43332
Merge branch 'master' into q1staging 2024-04-26 09:53:54 -04:00
Peter D. Gray
ecca4c7e6e
edit 2024-04-26 09:29:52 -04:00
Peter D. Gray
767651e6b6
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-04-26 09:28:31 -04:00
Peter D. Gray
90b8b02724
edit 2024-04-26 09:27:08 -04:00
Peter D. Gray
46e908ac0a
bump 2024-04-26 09:26:53 -04:00
scgbckbone
45d6f7c055 export signed artifacts to B slot when signing PSBT 2024-04-26 09:25:12 -04:00
scgbckbone
bb8ba5135c fullscreen for v23 and v24 QRs 2024-04-25 11:49:27 -04:00
Peter D. Gray
fb08b21d83
SYM+SHIFT => CAPS nicely 2024-04-25 11:12:18 -04:00
Peter D. Gray
f007f169b7
sharpen status-bar text 2024-04-25 10:19:54 -04:00
scgbckbone
8a32583f57 only SD_DETECT inverted 2024-04-25 09:36:42 -04:00
scgbckbone
dd7e820013 mk4 sim test fixes 2024-04-25 09:36:42 -04:00
scgbckbone
79625e8df4 mk4 simulator sd_detect inverse 2024-04-25 09:36:42 -04:00
scgbckbone
2eb0646e66 qr sizes testing 2024-04-24 12:04:13 -04:00
Peter D. Gray
1431c2a58d
Bugfix 2024-04-24 10:25:38 -04:00
Peter D. Gray
762819a87e
OMG I wanna die 2024-04-24 10:10:00 -04:00
Peter D. Gray
7af0589105
addition 2024-04-24 10:08:10 -04:00
Peter D. Gray
b134d89ed0
Changelog reorg 2024-04-24 10:06:29 -04:00
Peter D. Gray
b519ea172c
Signed for release. 2024-04-24 10:02:44 -04:00
scgbckbone
e7505a28bc testing: fix import in pwsave 2024-04-24 09:03:39 -04:00
scgbckbone
87eda8619d testing: reorg; unify access to Passphrase 2024-04-23 15:19:27 -04:00
scgbckbone
524e40512c Zeus Export 2024-04-23 12:03:31 -04:00
scgbckbone
ab894d174d bugfix: allow send password keystrokes for capital letters 2024-04-23 08:58:25 -04:00
scgbckbone
11f31d0466 notes&pwds export file name; mention signature file in export story 2024-04-22 15:43:00 -04:00
scgbckbone
562609af67 View Identity: temporary seed note on the top of the story 2024-04-22 15:16:43 -04:00
scgbckbone
df881409e3 fix b85 tests 2024-04-22 15:13:57 -04:00
Peter D. Gray
1d8b81d494
Release 3.2.0 of Mk4 bootrom 2024-04-22 11:53:45 -04:00
Peter D. Gray
51b719a7d5
jarring, and saves 16 bytes 2024-04-22 11:04:15 -04:00
Peter D. Gray
aa452f5578
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-04-22 09:52:52 -04:00
Peter D. Gray
16d506fd9f
Moved to new repo: Coldcard/recovery-images 2024-04-22 09:50:27 -04:00
scgbckbone
698a087c94 update macOS mpy patch (tested on Sonoma 14.4.1) 2024-04-22 08:42:56 -04:00
Peter D. Gray
014953e2fa
edits 2024-04-18 11:01:19 -04:00
Peter D. Gray
0423cbafc9
typo 2024-04-18 10:58:46 -04:00
Peter D. Gray
0a076e04f2
Lang changes 2024-04-18 10:57:47 -04:00
scgbckbone
24935b7784 new Danger Zone setting to allow (BIP-32) max int in BIP-85 derivations 2024-04-18 10:48:57 -04:00
scgbckbone
5ab96643b4 import multisig from QR/BBQr 2024-04-18 10:28:30 -04:00
scgbckbone
f07665c8f3 BBQr export for multisig xpubs 2024-04-18 10:28:30 -04:00
Peter D. Gray
f4590d8596
Edits 2024-04-18 10:27:34 -04:00
scgbckbone
59c7272a82 allow only checksum-valid last word to be chosen when entering seed phrase 2024-04-18 10:19:18 -04:00
Peter D. Gray
609b824ac9
SE2 always present 2024-04-18 10:00:51 -04:00
Peter D. Gray
5f0636c4e7
comment 2024-04-18 10:00:29 -04:00
scgbckbone
6598be34d4 predicate does not need to be callable; fix menu dump 2024-04-18 09:58:12 -04:00
Peter D. Gray
9b3673b470
Better fix for \#721 2024-04-18 09:29:05 -04:00
Peter D. Gray
5e77e0a02b
Tidy AE start idx 2024-04-18 09:22:59 -04:00
Peter D. Gray
7bdd05e51d
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-04-17 11:16:09 -04:00
Peter D. Gray
be7501f3da
Bugfix for Mk4 pin entry 2024-04-17 11:14:47 -04:00
scgbckbone
a80f7076d7 fix Nunchuk export test 2024-04-17 10:53:15 -04:00
scgbckbone
a839f02e80 add Nunchuk export option 2024-04-17 10:24:20 -04:00
Peter D. Gray
e15d6697da
add notice 2024-04-17 09:35:53 -04:00
Peter D. Gray
1c455b99ee
use inject method, cleaner 2024-04-17 09:35:32 -04:00
Peter D. Gray
ef97f9e131
Add notice 2024-04-17 09:35:08 -04:00
scgbckbone
3f62b4e05e Lock Down Seed also wipes LFS 2024-04-16 15:13:40 -04:00
scgbckbone
efc4ae2fca Address Explorer start idx 2024-04-16 15:04:07 -04:00
Peter D. Gray
0f5653de62
add file banner 2024-04-16 10:30:17 -04:00
Peter D. Gray
d623514422
Fix occasion 'three-dots' crash 2024-04-15 11:06:15 -04:00
Peter D. Gray
751cd7707e
fix keyboard during login ux 2024-04-15 11:01:01 -04:00
Peter D. Gray
7640410d71
double space 2024-04-11 11:32:12 -04:00
scgbckbone
a51468118d rename PC13 from SD_SW to SD_DETECT 2024-04-11 11:14:58 -04:00
scgbckbone
3eee677648 remove ability to use Passphrase if passphrase already in use; remove ability to choose to which seed apply passphrase - always apply to tmp seed if active and possible 2024-04-10 15:53:22 -04:00
scgbckbone
2411c7566d testing: fix and enable PSBT proxy parsing unit test 2024-04-10 15:49:32 -04:00
scgbckbone
3c016d2669 HW Accelerated AES CTR for passphrase saver, MiscroSD 2FA, and Tapsigner backup decryption 2024-04-10 10:45:58 -04:00
scgbckbone
a3f1f7f5de mk4=Q rest fixed (sim tests) 2024-04-10 10:27:34 -04:00
scgbckbone
964c8b77ab mk4=Q export wallet 2024-04-08 10:39:14 -04:00
Peter D. Gray
c7bc3e8348
Publish Q hardware design 2024-04-08 09:32:00 -04:00
scgbckbone
10b066f193 update MicroSD 2FA docs wrt slot A if both cards inserted 2024-04-08 09:03:15 -04:00
scgbckbone
6c12a124f2 bugfix: battery idle timeout also considers last progress bar update 2024-04-03 14:37:00 -04:00
scgbckbone
3dbeedceda bugfix: handle ZeroSecretException for bip39 passphrase calculation 2024-04-03 11:11:38 -04:00
scgbckbone
f7a94ad18a bugfix: proper UX button for final txn QR when USB signing 2024-04-02 15:26:15 -04:00
Peter D. Gray
735f161966
Add Q1 releases to master 2024-04-02 12:13:54 -04:00
Peter D. Gray
4faa4303fe
New release: 2024-04-02T1416-v1.1.0Q 2024-04-02 10:16:18 -04:00
Peter D. Gray
51eabbcd81
Signed for release. 2024-04-02 10:16:12 -04:00
Peter D. Gray
e4de80d028
For 2024-04-02T1416-v1.1.0Q 2024-04-02 10:16:11 -04:00
Peter D. Gray
17a0b39da8
rename to v1.1.0 2024-04-02 10:14:05 -04:00
Peter D. Gray
654952842a
New release: 2024-04-02T1400-v1.0.2Q 2024-04-02 10:00:19 -04:00
Peter D. Gray
b201cfa664
Signed for release. 2024-04-02 10:00:13 -04:00
Peter D. Gray
d22df75b7c
move to rev-chrono 2024-04-02 09:32:00 -04:00
Peter D. Gray
bc6fab8c9f
edits 2024-04-02 09:28:06 -04:00
scgbckbone
e55006f74b mk4=Q address explorer 2024-04-02 09:24:13 -04:00
scgbckbone
18864ad67f re-enable multisig addr censorship for NFC exports; test fixes 2024-04-01 10:22:28 -04:00
scgbckbone
019d09c770 mk4 NFC fix 2024-04-01 09:58:44 -04:00
scgbckbone
0a5ec22ddd fix test_decoders.py 2024-03-29 12:14:22 -04:00
Peter D. Gray
8bb8e100d3
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-03-29 10:04:39 -04:00
Peter D. Gray
ffa513906a
test huge backups 2024-03-29 10:04:27 -04:00
Peter D. Gray
de12eb6c4a
support larger backup files 2024-03-29 09:35:26 -04:00
scgbckbone
98d8b45dc4 add bbqr to multisig descriptor exports; simplify menu wrapping test; other fixes 2024-03-28 15:15:17 -04:00
scgbckbone
e9a770315d prohibit built-in input in calc mode; save dfu bytes by removing unused imports 2024-03-28 15:13:57 -04:00
scgbckbone
c966f9a2f3 remove MAX_V40_SIZE 2024-03-28 11:52:50 -04:00
Peter D. Gray
ad8626b1eb
style check 2024-03-28 11:26:46 -04:00
scgbckbone
f19cbfa718 bugfix: b39pw on tmp when SE secret not set 2024-03-28 10:57:13 -04:00
scgbckbone
7819f0b4d8 Force default HW settings (USB,NFC,VDisk OFF) after clone/backup restore 2024-03-28 10:42:43 -04:00
Peter D. Gray
64a2e5bc91
fixes; passes both Q and mk4 2024-03-28 10:13:45 -04:00
scgbckbone
fd54ad7314 bugfix: fix emulated keystrokes 2024-03-27 21:43:26 -04:00
Peter D. Gray
cae9340a5d
Fix menu nesting in export menus 2024-03-27 11:26:34 -04:00
Peter D. Gray
c9641bcd55
larger QR during wallet exports 2024-03-27 11:11:40 -04:00
Peter D. Gray
d963dab12a
syntax 2024-03-27 09:51:24 -04:00
Peter D. Gray
1e9fcd95c9
Per request from @nvk 2024-03-27 09:49:11 -04:00
Peter D. Gray
3e2aec1a03
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-03-27 09:26:12 -04:00
Peter D. Gray
b66fd79d21
update 2024-03-27 09:26:05 -04:00
scgbckbone
57b813f39d remove escape from Samourai descriptor export 2024-03-26 15:36:36 -04:00
scgbckbone
b62073ce77 bugfix: do not offer to choose account for samourai premix/postmix - account is already chosen 2024-03-26 15:15:54 -04:00
Peter D. Gray
3f37d9c9c1
document 2024-03-26 15:09:15 -04:00
Peter D. Gray
bde879104e
reorder 2024-03-26 15:06:20 -04:00
Peter D. Gray
e7b481d93e
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-03-26 15:05:25 -04:00
scgbckbone
51af760783 add "Migrate COLDCARD" to EmptyWallet 2024-03-26 15:05:21 -04:00
Peter D. Gray
104a485302
10min def idle batt logout 2024-03-26 14:41:36 -04:00
scgbckbone
6db13355e7 bugfix: properly calculate duress wallet tmp seed nvstore key from padded secret 2024-03-26 11:21:17 -04:00
scgbckbone
eafae52ba5 bugfix: base64 PSBT via QR 2024-03-26 11:12:59 -04:00
doc-hex
0c71e02e56
Merge pull request #57 from Coldcard/ownership
Address Ownership
2024-03-26 11:01:01 -04:00
Peter D. Gray
7e60cdb198
Merge branch 'Q' of github.com:Coldcard/q1firmware into ownership 2024-03-26 10:55:03 -04:00
Peter D. Gray
79f77125e1
add ux test 2024-03-26 10:38:09 -04:00
Peter D. Gray
61513f910b
easies use w/ dual q1/mk4 test 2024-03-26 10:37:47 -04:00
Peter D. Gray
5228119251
support verify address 2024-03-26 10:35:56 -04:00
Peter D. Gray
2fa29b90cc
perfections 2024-03-26 10:35:37 -04:00
Peter D. Gray
c9ecc2ddf7
cleanups 2024-03-26 10:35:22 -04:00
Peter D. Gray
1468cf0051
api cleanup 2024-03-26 10:35:07 -04:00
Peter D. Gray
e71c28ef99
api cleanup 2024-03-26 10:34:53 -04:00
Peter D. Gray
c0442a131c
add wipe of LFS during seed clear 2024-03-26 09:56:46 -04:00
Peter D. Gray
086c0ec5c7
comment 2024-03-26 09:56:10 -04:00
Peter D. Gray
6e40db4975
anticipate t2pr 2024-03-26 09:56:04 -04:00
Peter D. Gray
1713f2f9aa
improve mk4 vs Q compat 2024-03-26 09:55:45 -04:00
Peter D. Gray
38531c77ab
cleanups 2024-03-25 15:30:32 -04:00
Peter D. Gray
3cf8aff57f
bugfix 2024-03-25 15:30:16 -04:00
Peter D. Gray
3d87b9ccab
search also the change addresses 2024-03-25 14:22:01 -04:00
Peter D. Gray
2aecce6161
search also the change addresses 2024-03-25 14:21:56 -04:00
scgbckbone
adf1b0408c bugfix: remove undefined variable 'bad_fs_ok' 2024-03-25 12:46:08 -04:00
Peter D. Gray
7380a8b163
friday fun 2024-03-25 10:01:15 -04:00
scgbckbone
1ed6dd76c6 bugfix: AFC_BECH32M must not set AFC_WRAPPED and AFC_BECH32 2024-03-25 08:03:27 -04:00
Peter D. Gray
3258313300
address ownership 2024-03-22 16:20:37 -04:00
scgbckbone
16f3f7e9fd bugfix: backward compatible fix of AFC_BECH32M 2024-03-22 15:57:31 -04:00
Peter D. Gray
6174b97b99
addr ownership 2024-03-21 16:33:54 -04:00
Peter D. Gray
df8901ca3a
planned 2024-03-21 16:33:14 -04:00
Peter D. Gray
697ebc6599
better 2 lines 2024-03-21 16:30:29 -04:00
Peter D. Gray
2728aa6db0
addr ownership, pass first 2024-03-21 14:36:23 -04:00
Peter D. Gray
3e7a3a879b
start 2024-03-20 13:29:01 -04:00
Peter D. Gray
98f2341a4b
speellling 2024-03-20 10:07:40 -04:00
scgbckbone
8fdfdc0f50 HW Accelerated AES CTR for BSMS and passphrase saver 2024-03-18 12:49:42 -04:00
scgbckbone
cfd26f7d18 remove excessive newlines from locktime msg 2024-03-18 10:56:53 -04:00
scgbckbone
a0b281a035 testing: allow deprecated create_bdb (ported from edge) 2024-03-18 10:56:11 -04:00
Peter D. Gray
e96fe12663
New release: 2024-03-14T1419-v1.0.1Q 2024-03-14 10:19:28 -04:00
Peter D. Gray
2a865e78f8
Signed for release. 2024-03-14 10:19:23 -04:00
Peter D. Gray
c640480e6d
file_time.c needs to be treated like other build products 2024-03-14 10:17:23 -04:00
Peter D. Gray
93941f5e1b
edit 2024-03-14 09:52:54 -04:00
Peter D. Gray
a5bfd9b9b8
remove version.mk, etc 2024-03-13 15:23:33 -04:00
Peter D. Gray
0eb1b6ac8b
edits 2024-03-13 09:49:25 -04:00
Peter D. Gray
87b89e54ba
Signed for release. 2024-03-13 09:48:58 -04:00
scgbckbone
64c0549844 remove invalid artifacts from signatures.txt 2024-03-13 09:41:27 -04:00
scgbckbone
7665c73acc fix Q repro 2024-03-13 09:41:27 -04:00
scgbckbone
b68ef803ce Seed from Dice moved to Advanced submenu when generating new master seed 2024-03-12 08:21:42 -04:00
Peter D. Gray
4f2f50e32e
New release: 2024-03-10T1539-v1.0.0Q 2024-03-10 11:39:54 -04:00
Peter D. Gray
d717fe28e4
Signed for release. 2024-03-10 11:39:49 -04:00
Peter D. Gray
f728f01857
For 2024-03-10T1539-v1.0.0Q 2024-03-10 11:39:48 -04:00
Peter D. Gray
ba3cc9061f
New release: 2024-03-10T1537-v1.0.0Q 2024-03-10 11:37:56 -04:00
Peter D. Gray
fb12383641
Signed for release. 2024-03-10 11:37:50 -04:00
Peter D. Gray
fce952b71c
Bump bootrom to 1.0.4 2024-03-10 11:35:48 -04:00
Peter D. Gray
2d8e148e95
Towards v1.0.0Q! 2024-03-10 11:33:09 -04:00
Peter D. Gray
ce560b2bb2
v1.0.4 of bootrom 2024-03-10 11:25:00 -04:00
Peter D. Gray
5e62325a18
bump version 2024-03-10 11:23:17 -04:00
scgbckbone
65b652a6f4 merge headless.py into simulator.py 2024-03-10 11:05:42 -04:00
scgbckbone
35509356f0 after review 2024-03-10 11:05:42 -04:00
scgbckbone
9799dd2455 headless.py adjustments 2024-03-10 11:05:42 -04:00
Peter D. Gray
33f2bb0d79
bootup bugfix 2024-03-08 11:52:38 -05:00
Peter D. Gray
86db5cd629
comments 2024-03-08 11:52:07 -05:00
Peter D. Gray
347862ac5a
bump 2024-03-07 15:37:25 -05:00
Peter D. Gray
dfcdf4419d
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-03-07 15:36:58 -05:00
Peter D. Gray
287d2929c9
Bugfix: seed import by QR 2024-03-07 15:36:51 -05:00
scgbckbone
f2c64f1925 memory cautious file reading when verifying arbitrary signed data 2024-03-05 08:35:59 -05:00
scgbckbone
a690092acf 2FA convey to user that if both cards present during login, only slot A is read 2024-03-04 14:36:25 -05:00
Peter D. Gray
cda6eb261e
updated 2024-03-02 12:56:10 -05:00
Peter D. Gray
e5aa66fe72
New release: 2024-03-02T1752-v0.0.8Q 2024-03-02 12:52:43 -05:00
Peter D. Gray
7f629160d4
Signed for release. 2024-03-02 12:52:37 -05:00
Peter D. Gray
0de432be00
New release: 2024-03-02T1750-v0.0.8Q 2024-03-02 12:50:28 -05:00
Peter D. Gray
c0b0ec216a
Signed for release. 2024-03-02 12:50:22 -05:00
Peter D. Gray
0b4efea5b8
smarter values, and more of them 2024-03-02 12:48:01 -05:00
Peter D. Gray
11c68af70c
cleanups and more edges 2024-03-02 12:09:48 -05:00
Peter D. Gray
3cf02c33ef
bugfixes 2024-03-02 11:12:10 -05:00
Peter D. Gray
189781312b
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-03-01 16:38:37 -05:00
Peter D. Gray
fd21495b10
BBQr improvements 2024-03-01 16:37:26 -05:00
scgbckbone
05738a14ab clone tests 2024-02-29 16:20:27 -05:00
Peter D. Gray
65cbefdc80
cleanups 2024-02-29 10:35:24 -05:00
scgbckbone
80ea6ad839 sim bugfix: simulated secure element differentiate between CHANGE_SECRET and CHANGE_WALLET_PIN 2024-02-29 08:57:57 -05:00
Peter D. Gray
c1c6f549cd
minor cleanup 2024-02-28 13:35:55 -05:00
Peter D. Gray
320b46783a
corrected value 2024-02-28 11:27:31 -05:00
Peter D. Gray
7af08a4b48
correction 2024-02-28 11:17:36 -05:00
Peter D. Gray
3053fb6b38
bugfix: update main menu once enabled 2024-02-28 10:08:03 -05:00
Peter D. Gray
92be45cdad
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-28 09:17:11 -05:00
Peter D. Gray
31c9d17a78
Wait -> Loading 2024-02-28 09:16:07 -05:00
Peter D. Gray
bf05d4779b
cleanup 2024-02-28 09:15:33 -05:00
scgbckbone
5d3eccdb0f test (BB)QR Export Wallet 2024-02-28 08:55:59 -05:00
scgbckbone
b6e543bc2b test wrong pin (login_settings_tests) 2024-02-28 08:42:47 -05:00
Peter D. Gray
9a8dab92d1
so checkmark goes when we pick Normal 2024-02-27 12:55:49 -05:00
scgbckbone
729e05af40 incorporate new login tests into test runner 2024-02-27 12:31:45 -05:00
Peter D. Gray
ce662e5c3a
beefier tab keycap symbol 2024-02-27 12:05:28 -05:00
Peter D. Gray
b8f69d39ce
date 2024-02-27 11:35:25 -05:00
Peter D. Gray
1c8381be73
wordwrap 2024-02-27 11:03:30 -05:00
scgbckbone
0e7e81e8c0 Login Settings Tests 2024-02-27 11:00:36 -05:00
Peter D. Gray
f687b17645
upgradddes 2024-02-27 10:54:19 -05:00
Peter D. Gray
4f147b7bbc
Revert "remove obsolete code"
This reverts commit 5173a4e533.
2024-02-27 10:45:27 -05:00
Peter D. Gray
316e4aff8a
Revert "remove obsolete code"
This reverts commit 527d24a5fd.
2024-02-27 10:43:22 -05:00
Peter D. Gray
61ad847513
remove obsolete code 2024-02-27 10:28:04 -05:00
Peter D. Gray
5173a4e533
remove obsolete code 2024-02-27 09:15:30 -05:00
Peter D. Gray
527d24a5fd
remove obsolete code 2024-02-27 09:02:54 -05:00
Peter D. Gray
71c9417d75
Add 608C support 2024-02-26 14:58:39 -05:00
Peter D. Gray
746b85abc3
608C support 2024-02-26 14:53:05 -05:00
Peter D. Gray
259b9b063e
v14 QR at x3 was seen as barcode, fixed 2024-02-26 11:13:12 -05:00
Peter D. Gray
d41f254bea
bump 2024-02-26 10:43:42 -05:00
scgbckbone
8e43f6f4fc bugfix: reads in final 3 byte of file could return incorrect data 2024-02-26 09:47:53 -05:00
Peter D. Gray
c40c78dfdd
New release: 2024-02-26T1444-v0.0.7Q 2024-02-26 09:45:05 -05:00
Peter D. Gray
7d45999ace
Signed for release. 2024-02-26 09:44:58 -05:00
Peter D. Gray
7ded800457
For 2024-02-26T1444-v0.0.7Q 2024-02-26 09:44:58 -05:00
Peter D. Gray
6560f9a2e9
New release: 2024-02-26T1442-v0.0.7Q 2024-02-26 09:42:50 -05:00
Peter D. Gray
5c9c1b8e3c
Signed for release. 2024-02-26 09:42:43 -05:00
Peter D. Gray
68964f4b75
additions re: BBQr 2024-02-26 09:36:52 -05:00
Peter D. Gray
a6f549e867
Use v23 QR when multiple QR in BBQRs 2024-02-23 14:08:39 -05:00
Peter D. Gray
e9e6ec9d22
debug helper 2024-02-23 13:29:58 -05:00
Peter D. Gray
40e39f12be
updates 2024-02-23 11:38:45 -05:00
Peter D. Gray
1e1fc5ad54
add segwit cases 2024-02-23 11:38:29 -05:00
Peter D. Gray
833979c77a
need this clear 2024-02-23 11:38:00 -05:00
Peter D. Gray
10830dacbc
bugfix: reads in final 3 byte of file could return incorrect data 2024-02-23 11:33:03 -05:00
Peter D. Gray
85bce938fc
cleanup 2024-02-23 11:23:21 -05:00
Peter D. Gray
ddf02b5ea1
move psbt_tmp256 to stack when needed 2024-02-23 11:21:29 -05:00
Peter D. Gray
8e8e103b0a
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-23 09:38:51 -05:00
scgbckbone
444262d856 UI: button like numbered options - terms 2024-02-23 09:02:18 -05:00
Peter D. Gray
b466aec998
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-23 08:43:30 -05:00
scgbckbone
c1afdbfbd7 batch sign exit if not choices 2024-02-23 08:42:50 -05:00
scgbckbone
cf393afbcb make test_notes pass without failures 2024-02-23 08:42:32 -05:00
Peter D. Gray
8dd42aba14
updates for Q 2024-02-22 15:50:18 -05:00
Peter D. Gray
42828ba0a9
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-22 15:47:05 -05:00
Peter D. Gray
688ef4da7d
updates for Q 2024-02-22 15:46:57 -05:00
scgbckbone
8c15ff6ae6 improve test_usb.py::test_xpub_good 2024-02-22 09:57:46 -05:00
Peter D. Gray
0a38118f51
New release: 2024-02-22T1425-v0.0.6Q 2024-02-22 09:25:32 -05:00
Peter D. Gray
7579ce796d
Signed for release. 2024-02-22 09:25:26 -05:00
Peter D. Gray
1decdebab9
For 2024-02-22T1425-v0.0.6Q 2024-02-22 09:25:26 -05:00
Peter D. Gray
c691adc894
New release: 2024-02-22T1423-v0.0.6Q 2024-02-22 09:23:34 -05:00
Peter D. Gray
c5e984eb72
Signed for release. 2024-02-22 09:23:28 -05:00
scgbckbone
236363eb99 use h to represent hardened derivation component 2024-02-22 09:13:40 -05:00
Peter D. Gray
77963577b1
fix 2024-02-22 09:10:04 -05:00
Peter D. Gray
e32d1ff144
planned 2024-02-21 15:25:40 -05:00
scgbckbone
085f703ec9 bugfix: end busy bar when setting nick 2024-02-21 12:07:32 -05:00
Peter D. Gray
7a76942833
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-21 11:55:59 -05:00
Peter D. Gray
6c793047f3
raise on this class of error now 2024-02-21 11:55:54 -05:00
Peter D. Gray
b197cee5fa
factor-out tapsigner, wordwrap Q bug, 44prime to 44h 2024-02-21 11:55:33 -05:00
scgbckbone
1e49d9cc81 scrmabled PIN entry provides one mapping for both 1st and 2nd PIN part 2024-02-21 10:59:33 -05:00
Peter D. Gray
afea316ea0
petty optimizations 2024-02-21 09:14:46 -05:00
scgbckbone
074ad08911 kill file_picker annoying file count UI 2024-02-21 09:05:32 -05:00
scgbckbone
aebf66b9aa improve complex b39pw test 2024-02-20 13:07:34 -05:00
Peter D. Gray
9643d9d72c
Direct route to BIP-39 passwords on Q 2024-02-20 11:00:17 -05:00
Peter D. Gray
5c0fe5b634
update comment 2024-02-20 10:39:31 -05:00
Peter D. Gray
f8a084c5e9
move start_b39_pw into seed.py 2024-02-20 10:38:56 -05:00
Peter D. Gray
726180dc36
more docs of bad design 2024-02-20 10:38:12 -05:00
Peter D. Gray
95a1b63b80
minor hoisting 2024-02-19 12:03:28 -05:00
Peter D. Gray
d1f4c5f1c3
cleanup 2024-02-19 11:44:30 -05:00
Peter D. Gray
952f88936c
key repeat issues, optimizations 2024-02-19 11:24:42 -05:00
Peter D. Gray
4ad0326ec3
bugfix, cleanup 2024-02-19 10:56:23 -05:00
Peter D. Gray
d4885cc30a
remove mitigation w.r.t slot 10 of se2, for Q 2024-02-19 10:21:35 -05:00
Peter D. Gray
8cb010ca04
microcopy change 2024-02-19 09:52:15 -05:00
Peter D. Gray
989d084075
support slot B in wipe_microsd_card 2024-02-19 09:43:42 -05:00
scgbckbone
6b044b18cf UI: clone CC progress bar & update menu item names 2024-02-19 09:09:18 -05:00
scgbckbone
2ceb53d630 UI: show Wait screen before multisig View Descriptor 2024-02-19 09:09:18 -05:00
scgbckbone
94dccba69c bugfix: qrs with busy bar stucked 2024-02-19 09:07:28 -05:00
scgbckbone
ad9f213399 redraw ux_dice_rolling after oher story is shown 2024-02-19 09:07:10 -05:00
scgbckbone
011e9c4437 fix 0.0.5 tests 2024-02-19 09:05:43 -05:00
Peter D. Gray
c965aaf380
.6 time 2024-02-16 15:30:47 -05:00
Peter D. Gray
a312d1e96e
bugfix: randomized keys 2024-02-16 15:29:30 -05:00
Peter D. Gray
e85cd6aa3a
New release: 2024-02-16T1637-v0.0.5Q 2024-02-16 11:37:40 -05:00
Peter D. Gray
de7e98b3fd
Signed for release. 2024-02-16 11:37:34 -05:00
Peter D. Gray
55cbc8610c
For 2024-02-16T1637-v0.0.5Q 2024-02-16 11:37:33 -05:00
Peter D. Gray
3dbda0ab5f
New release: 2024-02-16T1635-v0.0.5Q 2024-02-16 11:35:42 -05:00
Peter D. Gray
c82d6050b0
Signed for release. 2024-02-16 11:35:36 -05:00
Peter D. Gray
dc22d2e7ee
more 2024-02-16 11:31:07 -05:00
scgbckbone
8c70a8b961 WIF scan 2024-02-16 11:29:06 -05:00
Peter D. Gray
c225e168bf
fix for SD card reading bug 2024-02-16 11:12:43 -05:00
Peter D. Gray
a251f16ae7
setup 0.0.5 2024-02-16 08:54:57 -05:00
scgbckbone
0bb1504c38 decoders test for basic multisig 2024-02-16 08:48:30 -05:00
scgbckbone
e2a1bcbc3e Import multisig QR (scan anything) 2024-02-16 08:48:30 -05:00
scgbckbone
3dd2ace221 missing tmp title in ready 2 sign 2024-02-16 08:47:51 -05:00
scgbckbone
d7846eb049 remove excessive newlines from locktime msg 2024-02-16 08:47:33 -05:00
scgbckbone
d924f7b4ed always use SettingsObject class for master data
(cherry picked from commit 4880292eae)
2024-02-16 08:47:33 -05:00
scgbckbone
84d0a7e002 testing: test_se2.py::test_ux_wrong_pin delete TP at the end to preserve memory for next tests
(cherry picked from commit b0957d770f)
2024-02-16 08:47:33 -05:00
scgbckbone
ec17c24c9f docs: update limitations.md with multisig name limitations
(cherry picked from commit 89d7cca418)
2024-02-16 08:47:33 -05:00
scgbckbone
fa93e4cf95 submodule: ckcc-protocol move to f924f6d35ca0a6804b9e25d476cb53ae2f8ae8d6
(cherry picked from commit 0ea48acfd2)
2024-02-16 08:47:33 -05:00
scgbckbone
4e6881c088 bugfix: multisig ascii input validation
(cherry picked from commit 2d2f8f3d9d)
2024-02-16 08:47:33 -05:00
scgbckbone
9890b0a8b9 bugfix: brick me option for If Wrong PIN lacks num arguemnt which caused yikes
(cherry picked from commit 0c4977af91)
2024-02-16 08:47:33 -05:00
scgbckbone
131c717f0f bugfix: final flag was missing in framing error response; properly handle framing errors
(cherry picked from commit ebc5830977)
2024-02-16 08:47:33 -05:00
scgbckbone
412bd411dc pwsave improve exception handling
(cherry picked from commit 209cdba897)
2024-02-16 08:47:33 -05:00
scgbckbone
e257e225f7 bugfix: fix pwsave froze
(cherry picked from commit f755947f7e)
2024-02-16 08:47:33 -05:00
Peter D. Gray
3a77095e09 nits
(cherry picked from commit 55d5490852)
2024-02-16 08:47:33 -05:00
scgbckbone
1ee50b95c6 bugfix: lockdown temporary seed was no-op
(cherry picked from commit d289bfc7c2)
2024-02-16 08:47:33 -05:00
Peter D. Gray
6dae87a349
New release: 2024-02-15T1843-v0.0.4Q 2024-02-15 13:43:16 -05:00
Peter D. Gray
376ecb60b6
Signed for release. 2024-02-15 13:43:10 -05:00
Peter D. Gray
36823f55f4
more 2024-02-15 13:41:06 -05:00
scgbckbone
c526616e84 ready2sign more options 2024-02-15 13:33:29 -05:00
Peter D. Gray
6aff15bb45
fix bbqr animation display 2024-02-15 11:52:41 -05:00
Peter D. Gray
909e32c084
cleanup 2024-02-15 10:01:41 -05:00
Peter D. Gray
da106e70ae
edits 2024-02-15 09:56:06 -05:00
Peter D. Gray
0fd5a43618
Remove upper limit for backup file size 2024-02-15 09:50:11 -05:00
Peter D. Gray
b121b0de51
cleanup 2024-02-15 09:25:02 -05:00
scgbckbone
cfb8ebe66b bugfix: qr_psbt_sign NFC yikes 2024-02-15 09:12:51 -05:00
scgbckbone
91e536efb4 fixture-based approach to test_notes.py; prove tmp seed notes separation 2024-02-14 16:56:34 -05:00
Peter D. Gray
6be0394931
bugfix 2024-02-14 14:53:47 -05:00
Peter D. Gray
6a185aba71
bump 2024-02-14 11:07:03 -05:00
Peter D. Gray
c5f52f352a
bugfix, reliability 2024-02-14 10:47:24 -05:00
Peter D. Gray
0cb05ed5d6
battery check 2024-02-14 09:44:44 -05:00
Peter D. Gray
51b293d883
Bugfix 2024-02-14 09:37:03 -05:00
Peter D. Gray
27447d3c46
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-13 09:06:46 -05:00
scgbckbone
482926ce8a review nits 2024-02-13 09:06:29 -05:00
scgbckbone
bc8fa0b83c better --eject implementation via fixture 2024-02-13 09:06:29 -05:00
scgbckbone
4190b3316b missing fixtures in build_duress_wallets 2024-02-13 09:06:29 -05:00
scgbckbone
d208be330b simulator: monkey-patch CardSlot.is_inserted if --eject is provided 2024-02-13 09:06:29 -05:00
scgbckbone
41bb8a8267 fix test_vdisk.py; deduplicate test_trick_backups; clear_seed should not blank new default settings; handle simulator --eject properly 2024-02-13 09:06:29 -05:00
Peter D. Gray
c8f9981c28
add DEV flag to BL version display 2024-02-12 10:27:13 -05:00
Peter D. Gray
f357bc3d8b
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-09 13:59:56 -05:00
Peter D. Gray
e8a4795ff6
bugfix, B slot simualted light 2024-02-09 13:59:51 -05:00
scgbckbone
9e1f61bd67 missing QR button; fix test_ux.py & test_usb.py 2024-02-09 13:32:06 -05:00
Peter D. Gray
e26b849d20
A vs B slot for batch signing 2024-02-09 10:47:27 -05:00
Peter D. Gray
a5a6ba2384
future proof 2024-02-09 10:30:05 -05:00
scgbckbone
fa0ea70500 fix test_sign.py; exception middleware for batch sign 2024-02-09 10:25:36 -05:00
Peter D. Gray
415c9f9dcb
another keycap icon 2024-02-09 08:55:52 -05:00
Peter D. Gray
d0a22014dd
occurs in middle of a sentence 2024-02-09 08:55:41 -05:00
scgbckbone
6538dc9cb6 fix test_upgrades.py 2024-02-09 08:46:34 -05:00
scgbckbone
3542a79b5a Add CANCEL to xor; fix test_seed_xor.py 2024-02-09 08:46:34 -05:00
scgbckbone
dad8b50b8c fix test_se2.py 2024-02-09 08:46:34 -05:00
scgbckbone
3f12554d36 fix test_pwsave.py 2024-02-09 08:46:34 -05:00
scgbckbone
ad5d25460e fix test_paper.py 2024-02-09 08:46:34 -05:00
scgbckbone
b3c3d2d21a fix test_multisig.py; proper handling of buttons 2024-02-09 08:46:34 -05:00
Peter D. Gray
0d6504caac
Merge branch 'master' of github.com:Coldcard/firmware 2024-02-08 16:02:54 -05:00
Peter D. Gray
79d4307520
added Q beta v0.0.3Q 2024-02-08 16:02:48 -05:00
Peter D. Gray
a51734237a
New release: 2024-02-08T2005-v0.0.3Q 2024-02-08 15:05:52 -05:00
Peter D. Gray
a5a88b8d16
Signed for release. 2024-02-08 15:05:47 -05:00
Peter D. Gray
cce74865d0
bump 2024-02-08 14:57:46 -05:00
Peter D. Gray
53088fb169
New release: 2024-02-08T1955-v0.0.2Q 2024-02-08 14:55:10 -05:00
Peter D. Gray
2859d8902b
Signed for release. 2024-02-08 14:55:05 -05:00
Peter D. Gray
3ce1b5dd61
For 2024-02-08T1954-v0.0.2Q 2024-02-08 14:55:04 -05:00
Peter D. Gray
eb9f154ee5
New release: 2024-02-08T1953-v0.0.2Q 2024-02-08 14:53:12 -05:00
Peter D. Gray
d27ec0b417
Signed for release. 2024-02-08 14:53:07 -05:00
Peter D. Gray
726fda5dd3
beta version 0.0.2 2024-02-08 14:49:30 -05:00
Peter D. Gray
f89aa8204d
add BETA 2024-02-08 14:48:26 -05:00
Peter D. Gray
4daf0bbc08
add BETA flag 2024-02-08 14:48:15 -05:00
Peter D. Gray
bd5e795dba
New release: 2024-02-08T1840-v6.0.1Q 2024-02-08 13:41:01 -05:00
Peter D. Gray
18a931ee11
Signed for release. 2024-02-08 13:40:56 -05:00
Peter D. Gray
5dd3568167
For 2024-02-08T1840-v6.0.1Q 2024-02-08 13:40:55 -05:00
Peter D. Gray
aff1a7bc44
New release: 2024-02-08T1838-v6.0.1Q 2024-02-08 13:39:00 -05:00
Peter D. Gray
0c368bab99
Signed for release. 2024-02-08 13:38:55 -05:00
Peter D. Gray
053adbc5cd
keypress/selftest fixes 2024-02-08 13:36:45 -05:00
Peter D. Gray
406079954f
prepare 6.0.1 version 2024-02-08 11:48:44 -05:00
Peter D. Gray
36acb54012
note to self 2024-02-08 11:48:24 -05:00
Peter D. Gray
a757483db0
prefered 2024-02-08 10:44:22 -05:00
Peter D. Gray
d54f57457e
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-02-08 10:43:06 -05:00
scgbckbone
5b4c81c21b use NFC symbol 2024-02-08 10:43:02 -05:00
scgbckbone
f5f7162c4d (nfc) vs. (3) button; fix test_nfc.py 2024-02-08 10:43:02 -05:00
scgbckbone
bd05d2f4c0 fix test_msg.py 2024-02-08 10:43:02 -05:00
scgbckbone
3a04b50051 fix test_export.py 2024-02-08 10:43:02 -05:00
scgbckbone
eae64dc18b fix test_ephemeral.py 2024-02-08 10:43:02 -05:00
Peter D. Gray
388842988d
kbd improvements 2024-02-08 10:41:02 -05:00
Peter D. Gray
ae87b63524
mk3 cleanups 2024-02-08 10:29:39 -05:00
Peter D. Gray
6715c73834
Q card inserted detect 2024-02-08 10:19:55 -05:00
scgbckbone
cb2268aa1a use NFC share text for single custom address 2024-02-08 08:50:17 -05:00
scgbckbone
c283381b44 fix test_custom_path in address explorer 2024-02-08 08:50:17 -05:00
scgbckbone
b810fbd98f mk4 HSM allowed; skip HSM test for Q 2024-02-08 08:48:46 -05:00
Peter D. Gray
b259c01dcf
New release: 2024-02-07T1630-v6.0.0Q 2024-02-07 11:30:36 -05:00
Peter D. Gray
b7f4ae5b01
Signed for release. 2024-02-07 11:30:30 -05:00
Peter D. Gray
f970aa1a9a
New release: 2024-02-07T1628-v6.0.0Q 2024-02-07 11:28:33 -05:00
Peter D. Gray
a788c4769d
Signed for release. 2024-02-07 11:28:28 -05:00
Peter D. Gray
927225f4fa
Signed for release. 2024-02-07 11:26:02 -05:00
Peter D. Gray
9d32f971d4
grrrrr 2024-02-07 11:24:15 -05:00
Peter D. Gray
e75e4be9ff
New release: 2024-02-07T1616-v6.0.0Q 2024-02-07 11:16:48 -05:00
Peter D. Gray
b59046a3bd
Signed for release. 2024-02-07 11:16:42 -05:00
Peter D. Gray
c394053016
For 2024-02-07T1616-v6.0.0Q 2024-02-07 11:16:42 -05:00
Peter D. Gray
a4d99f8a28
New release: 2024-02-07T1614-v6.0.0Q 2024-02-07 11:14:51 -05:00
Peter D. Gray
e9af823446
Signed for release. 2024-02-07 11:14:45 -05:00
Peter D. Gray
26656fec7d
more 2024-02-07 11:12:22 -05:00
Peter D. Gray
5e5682b51b
going to 6+ instead of 1+ 2024-02-07 11:11:59 -05:00
Peter D. Gray
7cbd85f350
New release: 2024-02-07T1555-v1.0.0Q 2024-02-07 10:55:26 -05:00
Peter D. Gray
2867560199
Signed for release. 2024-02-07 10:55:21 -05:00
Peter D. Gray
c944aa11b9
For 2024-02-07T1555-v1.0.0Q 2024-02-07 10:55:20 -05:00
Peter D. Gray
49b5a434f0
New release: 2024-02-07T1553-v1.0.0Q 2024-02-07 10:53:23 -05:00
Peter D. Gray
b19570043c
Signed for release. 2024-02-07 10:53:18 -05:00
Peter D. Gray
dd42e3f8ca
v1.0.3 bootloader 2024-02-07 10:51:04 -05:00
Peter D. Gray
bd91f5f83e
handle long prompts+values 2024-02-07 10:49:22 -05:00
Peter D. Gray
bf4aa1ba4b
bugfix: no keyrepeat during pin 2024-02-07 10:40:43 -05:00
Peter D. Gray
15e86494a3
support 1.0.0 of Q 2024-02-07 10:38:57 -05:00
Peter D. Gray
bc686ef1ad
Version 1 for Q 2024-02-07 09:51:01 -05:00
scgbckbone
30480f084a fix test_change_pins.py; remove mk3 code 2024-02-07 08:40:38 -05:00
scgbckbone
2ac2e4ed63 fix test_bip39pw.py 2024-02-06 13:53:07 -05:00
scgbckbone
4880292eae always use SettingsObject class for master data 2024-02-06 09:31:44 -05:00
scgbckbone
b0957d770f testing: test_se2.py::test_ux_wrong_pin delete TP at the end to preserve memory for next tests 2024-02-06 08:43:08 -05:00
scgbckbone
89d7cca418 docs: update limitations.md with multisig name limitations 2024-02-05 11:19:08 -05:00
scgbckbone
0ea48acfd2 submodule: ckcc-protocol move to f924f6d35ca0a6804b9e25d476cb53ae2f8ae8d6 2024-02-05 11:19:08 -05:00
scgbckbone
2d2f8f3d9d bugfix: multisig ascii input validation 2024-02-05 11:19:08 -05:00
scgbckbone
0c4977af91 bugfix: brick me option for If Wrong PIN lacks num arguemnt which caused yikes 2024-02-05 10:35:02 -05:00
scgbckbone
ebc5830977 bugfix: final flag was missing in framing error response; properly handle framing errors 2024-02-05 10:13:15 -05:00
Peter D. Gray
81d5c1c87b
v1.0.2 bootrom 2024-02-05 09:06:30 -05:00
Peter D. Gray
ee3ac849ea
bugfix 2024-02-05 09:05:40 -05:00
Peter D. Gray
d7ced1e954
New release: 2024-02-02T1744-v5.2.1Q 2024-02-02 12:44:46 -05:00
Peter D. Gray
5525d6ed29
Signed for release. 2024-02-02 12:44:40 -05:00
Peter D. Gray
3e282a0569
For 2024-02-02T1744-v5.2.1Q 2024-02-02 12:44:39 -05:00
Peter D. Gray
58d7630ef3
New release: 2024-02-02T1742-v5.2.1Q 2024-02-02 12:42:48 -05:00
Peter D. Gray
9007bf94ef
Signed for release. 2024-02-02 12:42:42 -05:00
Peter D. Gray
418be24d01
support edge and Q versions 2024-02-02 12:40:12 -05:00
Peter D. Gray
76c99abbf4
revert2 2024-02-02 12:30:06 -05:00
Peter D. Gray
c704a2e01d
check submods 2024-02-02 12:28:31 -05:00
Peter D. Gray
25173d83c6
Q marker 2024-02-02 12:28:15 -05:00
Peter D. Gray
6853c82026
Hack installed 2024-02-02 12:27:07 -05:00
Peter D. Gray
3f7d144e99
New release: 2024-02-02T1646-v5.2.1 2024-02-02 11:46:31 -05:00
Peter D. Gray
d4d4abfd8e
Signed for release. 2024-02-02 11:46:28 -05:00
Peter D. Gray
65245e28f6
New release: 2024-02-02T1644-v5.2.1 2024-02-02 11:44:39 -05:00
Peter D. Gray
b95f29bbaf
Signed for release. 2024-02-02 11:44:35 -05:00
Peter D. Gray
cfaabdbba9
bugfix 2024-02-02 11:42:38 -05:00
Peter D. Gray
4c39d61b3b
revert 2024-02-02 11:38:21 -05:00
Peter D. Gray
257be0e609
Redo 5.1.1 change to make factory version 2024-02-02 11:32:27 -05:00
Peter D. Gray
f46c349e43
New release: 2024-02-02T1541-v5.2.1 2024-02-02 10:41:27 -05:00
Peter D. Gray
54c1a6e06b
Signed for release. 2024-02-02 10:41:24 -05:00
Peter D. Gray
9bbf8943ec
New release: 2024-02-02T1539-v5.2.1 2024-02-02 10:39:32 -05:00
Peter D. Gray
2c08f6dc68
Signed for release. 2024-02-02 10:39:28 -05:00
Peter D. Gray
14387d1d71
Q repro build 2024-02-02 10:37:40 -05:00
Peter D. Gray
104dd842a3
catchup to real deal 2024-02-02 10:28:19 -05:00
Peter D. Gray
62937ee9e2
more 2024-02-02 10:27:55 -05:00
Peter D. Gray
387f562991
more 2024-02-02 10:27:39 -05:00
Peter D. Gray
b88f63edf0
better 2024-02-02 10:27:31 -05:00
Peter D. Gray
35c2a064e2
more 2024-02-02 10:27:20 -05:00
Peter D. Gray
9efda25855
refactor dfu upload options 2024-02-02 10:27:02 -05:00
Peter D. Gray
370cf9de26
cleanup 2024-02-02 10:23:47 -05:00
Peter D. Gray
82b9ad0705
cleanup 2024-02-02 10:23:30 -05:00
Peter D. Gray
565ae1dec8
skip number if just one 2024-02-02 10:23:16 -05:00
Peter D. Gray
d87387e77e
cleanup 2024-02-01 09:53:13 -05:00
Peter D. Gray
b1858490f1
fixed sleep mode 2024-02-01 09:47:08 -05:00
Peter D. Gray
bf74da8aef
sim scanner catchup 2024-02-01 08:24:23 -05:00
Peter D. Gray
33c578e90a
preferences 2024-02-01 08:18:56 -05:00
Peter D. Gray
8cb32c6458
rev D change 2024-02-01 08:18:49 -05:00
Peter D. Gray
20ab243d31
Enter the danger zone 2024-02-01 08:18:27 -05:00
Peter D. Gray
fad62952d7
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-01-31 09:44:58 -05:00
Peter D. Gray
998827c456
detect URL domain name 2024-01-31 09:37:39 -05:00
scgbckbone
1c178d3ebc backup: Q1 seed entry 2024-01-31 09:37:21 -05:00
Peter D. Gray
85a90e3516
bugfix 2024-01-31 09:16:57 -05:00
Peter D. Gray
49d302ded9
Discharging order 2024-01-31 09:09:03 -05:00
Peter D. Gray
b29187fa93
Better login, better boxes 2024-01-31 09:06:33 -05:00
Peter D. Gray
d726a1e13c
click on USB plug area, becomes voltage change event 2024-01-31 09:02:53 -05:00
Peter D. Gray
607a78ffe4
bugfix for ^M in sim on Q 2024-01-31 08:29:16 -05:00
Peter D. Gray
21e24fb75b
assume RDP=2 always 2024-01-30 13:57:31 -05:00
Peter D. Gray
7de0729543
block RDP changes on test bootroms 2024-01-30 13:56:27 -05:00
Peter D. Gray
23a7119fad
revert recent change 2024-01-30 13:32:21 -05:00
Peter D. Gray
846a00137f
tighter boxes vertically 2024-01-30 11:27:07 -05:00
Peter D. Gray
bf4fddca02
removed unused param 2024-01-30 10:27:23 -05:00
scgbckbone
23f4b0a2bb fix 1 2024-01-30 08:58:58 -05:00
scgbckbone
04d29c70dd fix 2024-01-30 08:58:58 -05:00
scgbckbone
bc9bf3ee61 fix backup tests 2024-01-30 08:58:58 -05:00
Peter D. Gray
a7c3539bb1
newline 2024-01-29 15:09:30 -05:00
Peter D. Gray
ef8e1a63d2
1.0.1 could be final 2024-01-29 15:08:32 -05:00
Peter D. Gray
6ee936db79
honesty 2024-01-29 15:08:11 -05:00
Peter D. Gray
6f77347dc3
more robust 2024-01-29 15:08:00 -05:00
Peter D. Gray
a785422049
Remove more mk3 files 2024-01-29 15:07:44 -05:00
Peter D. Gray
b161e9a0e1
update 2024-01-29 13:37:22 -05:00
Peter D. Gray
6d978f2a94
bump because Im sure its better 2024-01-29 13:35:30 -05:00
Peter D. Gray
387502018f
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-01-29 12:05:16 -05:00
Peter D. Gray
be73522f53
more tests, better tests 2024-01-29 12:05:02 -05:00
Peter D. Gray
325cff977f
fixes, more accurate 2024-01-29 12:04:52 -05:00
Peter D. Gray
23e263347e
Q support 2024-01-29 11:45:44 -05:00
scgbckbone
932dd8d06d fix address explorer tests 2024-01-27 12:26:09 -05:00
scgbckbone
bb6318c62c fix unit tests 2024-01-26 10:52:41 -05:00
Peter D. Gray
f066f60543
api update 2024-01-26 10:51:54 -05:00
Peter D. Gray
93c3afacbf
revert unwanted change 2024-01-26 10:51:40 -05:00
Peter D. Gray
96544fd819
notes and passwords 2024-01-26 10:51:18 -05:00
Peter D. Gray
5f41a73938
GPU take/give/animating 2024-01-26 10:51:04 -05:00
Peter D. Gray
cd8733e5c8
track new api 2024-01-26 10:50:52 -05:00
Peter D. Gray
248f5f769b
bugfixes 2024-01-26 10:50:25 -05:00
Peter D. Gray
5559950997
minor improvements 2024-01-26 10:49:56 -05:00
Peter D. Gray
633a2d193e
performance optimized 2024-01-26 10:48:53 -05:00
Peter D. Gray
0755676585
newer version from source 2024-01-26 10:48:13 -05:00
Peter D. Gray
86ce1fde06
factory/debug 2024-01-26 10:48:03 -05:00
Peter D. Gray
a28cbfab3f
add kbd test 2024-01-26 10:47:46 -05:00
Peter D. Gray
fff2fc522b
cleanup 2024-01-26 10:47:35 -05:00
Peter D. Gray
2ab4dfb9e8
phase=0 must show cursor 2024-01-26 10:45:03 -05:00
Peter D. Gray
0cf0bc0bd7
Remove SYM+BS=CLEAR, too dangerous 2024-01-26 09:53:28 -05:00
Peter D. Gray
9036ae9475
better 2024-01-26 09:51:46 -05:00
Peter D. Gray
4077e3ed51
clean msgs 2024-01-26 09:15:39 -05:00
Peter D. Gray
23f145d8bc
marginally better 2024-01-26 09:03:06 -05:00
Peter D. Gray
45855062c2
cleanup transparent pixels 2024-01-24 13:29:01 -05:00
Peter D. Gray
c67c9ad4d5
bugfix: enter on import screen 2024-01-24 13:27:15 -05:00
Peter D. Gray
9826e6a174
notes testing done 2024-01-24 12:06:58 -05:00
Peter D. Gray
b2afc88b4c
fixes from testing 2024-01-24 10:24:52 -05:00
Peter D. Gray
4678fc3b3e
first pass 2024-01-24 09:46:39 -05:00
Peter D. Gray
db19cb6862
no BBQr bar if one part 2024-01-24 09:03:00 -05:00
Peter D. Gray
c72a7aab5e
just getting started... 2024-01-23 14:14:47 -05:00
Peter D. Gray
bf4a7d69e4
Q support, and move export CTA to bottom 2024-01-23 14:14:14 -05:00
Peter D. Gray
5c37b9d20c
more general 2024-01-23 14:14:00 -05:00
Peter D. Gray
8b4ac42ec7
bugfix, probably 2024-01-23 14:11:37 -05:00
Peter D. Gray
1bd9a4cdec
more q1 porting 2024-01-23 12:18:45 -05:00
Peter D. Gray
f0872f2dac
generalize export from derived extro 2024-01-23 12:16:55 -05:00
Peter D. Gray
cae4c25810
import notes 2024-01-23 12:16:14 -05:00
Peter D. Gray
712923547f
can expect bbqr 2024-01-23 12:15:48 -05:00
Peter D. Gray
0f62518dde
QR/NFC in address show via USB command 2024-01-23 08:44:19 -05:00
Peter D. Gray
f15913d044
bbqr cleanups 2024-01-22 17:11:04 -05:00
Peter D. Gray
4efb76821d
comment 2024-01-22 17:09:45 -05:00
Peter D. Gray
57bf27e78f
check predicate on shortcuts 2024-01-22 17:09:39 -05:00
Peter D. Gray
4e1b0f0f69
improved QR reading, BBQr tests 2024-01-22 17:07:49 -05:00
Peter D. Gray
10e9a4f929
Revert "capture QRs"
This reverts commit a63d3bdf40.
2024-01-22 09:21:25 -05:00
Peter D. Gray
a63d3bdf40
capture QRs 2024-01-22 09:20:56 -05:00
Peter D. Gray
68c0499e21
improved bbqr display 2024-01-22 09:20:30 -05:00
Peter D. Gray
c1a474dc83
reliability 2024-01-22 09:20:15 -05:00
Peter D. Gray
319c267e34
closer 2024-01-22 09:19:58 -05:00
scgbckbone
209cdba897 pwsave improve exception handling 2024-01-21 15:04:56 -05:00
Peter D. Gray
78101a7f66
Merge branch 'master' of github.com:Coldcard/firmware 2024-01-19 10:56:50 -05:00
Peter D. Gray
b20a1c2419
edge added 2024-01-19 10:56:42 -05:00
Peter D. Gray
d41d13683f
wiht .version 2024-01-19 10:22:37 -05:00
Peter D. Gray
ad947e4d49
working 2024-01-19 09:01:55 -05:00
Peter D. Gray
28c3ab5af3
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2024-01-18 10:33:44 -05:00
Peter D. Gray
60a8df882d
porting to Q 2024-01-18 10:31:07 -05:00
Peter D. Gray
65caaef1e6
porting to Q 2024-01-18 10:22:22 -05:00
Peter D. Gray
7404df4269
q1 support, and whitespace 2024-01-18 09:49:24 -05:00
Peter D. Gray
e996470196
q1 support, and whitespace 2024-01-18 09:49:20 -05:00
Peter D. Gray
32ba53f06f
more but needs work 2024-01-16 09:54:33 -05:00
Peter D. Gray
e734087706
bugfix 2024-01-15 10:41:26 -05:00
scgbckbone
f755947f7e bugfix: fix pwsave froze 2024-01-12 10:54:44 -05:00
Peter D. Gray
17d0e7d345
secure notes and passwords 2024-01-11 16:07:42 -05:00
Peter D. Gray
7ac6915202
add function keycaps 2024-01-11 10:29:07 -05:00
Peter D. Gray
1fc6cd4dc6
bugfix/convenience 2024-01-10 13:19:25 -05:00
Peter D. Gray
010156f690
sdcard recovery 2024-01-10 13:19:11 -05:00
Peter D. Gray
34e9006702
nits 2024-01-10 13:18:59 -05:00
Peter D. Gray
369e21f430
add dev option 2024-01-10 13:18:25 -05:00
Peter D. Gray
e444b823c2
quasi-bug fix 2024-01-10 11:50:44 -05:00
Peter D. Gray
024655be6b
remove random.bytes, use ngu.random.bytes directly instead 2024-01-10 11:35:27 -05:00
Peter D. Gray
d31fee5d22
unused function 2024-01-10 11:33:38 -05:00
Peter D. Gray
90aebe81cc
extra blank 2024-01-10 11:12:54 -05:00
Peter D. Gray
fb7cdd7d98
tested scan-n-bag feature 2024-01-10 11:09:26 -05:00
Peter D. Gray
fc0ad052dd
no bag support in Q from USB port 2024-01-10 11:03:08 -05:00
Peter D. Gray
a951c80bf6
scan-n-bag feature 2024-01-10 10:59:32 -05:00
Peter D. Gray
b7d2cdf6b5
scan-n-bag feature 2024-01-10 10:59:22 -05:00
Peter D. Gray
b46ad42885
speelling 2024-01-10 10:59:04 -05:00
Peter D. Gray
f738f277c8
Generalize for Q 2024-01-09 10:50:08 -05:00
Peter D. Gray
6f23c781ae
cleanups 2024-01-09 10:22:39 -05:00
Peter D. Gray
a36506d7a0
selftest improvements 2024-01-09 10:15:08 -05:00
Peter D. Gray
dd0ce1a2ba
bugfix 2024-01-09 09:31:02 -05:00
Peter D. Gray
1278024384
change for rev D 2024-01-08 14:27:57 -05:00
Peter D. Gray
4e12ba97f7
Q additions 2024-01-08 14:27:57 -05:00
Peter D. Gray
28404489d1
updates 2024-01-08 14:27:57 -05:00
Peter D. Gray
d52c0089bd
more q selftest 2024-01-08 14:27:57 -05:00
Peter D. Gray
5a7ea48438
nit 2024-01-08 14:27:57 -05:00
Peter D. Gray
f8a0574b93
nits 2024-01-08 14:27:57 -05:00
Peter D. Gray
6fb20e0d62
center plug 2024-01-08 14:27:57 -05:00
Peter D. Gray
f991f4125e
New release: 2023-12-21T1526-v5.2.2 2023-12-21 10:26:33 -05:00
Peter D. Gray
55d5490852
nits 2023-12-21 10:02:46 -05:00
scgbckbone
d289bfc7c2 bugfix: lockdown temporary seed was no-op 2023-12-21 09:49:56 -05:00
Peter D. Gray
93bf6d9509 spelling
(cherry picked from commit f6aec0ec2a)
2023-12-21 08:36:42 -05:00
Peter D. Gray
fe9c2b2490 Remove junk
(cherry picked from commit 7cea7ef549)
2023-12-21 08:36:42 -05:00
Peter D. Gray
af380d0358 New release: 2023-12-19T1444-v5.2.1
(cherry picked from commit 84a6a44bbe)
2023-12-21 08:36:42 -05:00
scgbckbone
d3d176cafe xprv master seed with tmp seeds and bip39 passphrase
(cherry picked from commit 5bfdc4f45a)
2023-12-21 08:36:42 -05:00
Peter D. Gray
21cb0ec248 more british & precise
(cherry picked from commit 46dc0b5b6d)
2023-12-21 08:36:42 -05:00
Peter D. Gray
4cbc932967 New release: 2023-12-18T1636-v5.2.1
(cherry picked from commit 5cb63b299d)
2023-12-21 08:36:42 -05:00
Peter D. Gray
e14e024a4e Bump
(cherry picked from commit 979c27387e)
2023-12-21 08:36:42 -05:00
Peter D. Gray
d7e8333aed cleanup of ftux
(cherry picked from commit f6f977503e)
2023-12-21 08:36:42 -05:00
Peter D. Gray
bb98e94183 Remove FTUX, add simple welcome screen
(cherry picked from commit d1c5b907c0)
2023-12-21 08:36:42 -05:00
Peter D. Gray
c8d1dc92ac logout at end of menu
(cherry picked from commit 58f0adc560)
2023-12-21 08:36:42 -05:00
scgbckbone
7716846541 fix tests
(cherry picked from commit 697b6e211d)
2023-12-21 08:36:42 -05:00
scgbckbone
96c9fd3806 HSM multisig 400 test
(cherry picked from commit 3977ae2ce0)
2023-12-21 08:36:42 -05:00
Peter D. Gray
94f696ca01 edits, set target date
(cherry picked from commit 09b9065e10)
2023-12-21 08:36:42 -05:00
scgbckbone
ebf0b7bec6 Improve BIP39 Passphrase UX if temporary seed active and passphrase applicable
(cherry picked from commit 4359a9735b)
2023-12-21 08:36:42 -05:00
scgbckbone
17d60844e6 fix change_pin test
(cherry picked from commit 9824e59ef9)
2023-12-21 08:36:42 -05:00
scgbckbone
96173d7500 bugfix: prevent yikes in clone coldcard - creating backup with bypass_tmp=True on master secret
(cherry picked from commit 9594efcf03)
2023-12-21 08:36:42 -05:00
scgbckbone
dc216ff081 pwsave menu UX rework; do not allow empty bip39 passphrase
(cherry picked from commit 3e5fd573a6)
2023-12-21 08:36:42 -05:00
scgbckbone
e0afee6b13 Remove legacy Mk1-3 code from pin changing
(cherry picked from commit 79c143b7eb)
2023-12-21 08:36:42 -05:00
scgbckbone
313fb74dc7 provide info about Tx level locktimes (nLocktime, nSequence) when signing
(cherry picked from commit af753c38be)
2023-12-21 08:36:42 -05:00
scgbckbone
f3db5d7822 allow passphrase via USB if passphrase already set (work on master seed in that case); show password over USB UX change
(cherry picked from commit 4a39fc82f1)
2023-12-21 08:36:42 -05:00
scgbckbone
d7b63d072a one instant retry on AE_FAIL
(cherry picked from commit 84215b1721)
2023-12-21 08:36:42 -05:00
scgbckbone
f81bb5cd22 IOError is deprecated, use OSError
(cherry picked from commit 8ec2c7f88c)
2023-12-21 08:36:42 -05:00
scgbckbone
155c71de86 bugfix: do not allow to import master seed as temporary
(cherry picked from commit 9188c7faf2)
2023-12-21 08:36:42 -05:00
scgbckbone
a0eda9c6aa Upgrade Firmware menu item is hidden if temporary seed is active
(cherry picked from commit f8ac8eda89)
2023-12-21 08:36:42 -05:00
scgbckbone
00a56eaa8a bugfix: add missing ftux for extended key import (as master)
(cherry picked from commit 285c90999e)
2023-12-21 08:36:42 -05:00
scgbckbone
f5df3f93ac Export SeedQR
(cherry picked from commit a1f6743de2)
2023-12-21 08:36:42 -05:00
Peter D. Gray
8423f6d2d7
introduce battery.py 2023-12-20 16:15:01 -05:00
Peter D. Gray
b3109e2241
useful 2023-12-20 16:14:50 -05:00
Peter D. Gray
2b633b99a3
tweak 2023-12-20 16:14:25 -05:00
Peter D. Gray
cf521d26c7
handle unicode inside BBQr better 2023-12-20 16:13:30 -05:00
Peter D. Gray
158a6f26e2
NFC animation 2023-12-20 08:03:58 -05:00
Peter D. Gray
c4ffe25603
NFC animation 2023-12-20 08:03:35 -05:00
Peter D. Gray
e8d593e467
tmp 2023-12-19 15:47:44 -05:00
Peter D. Gray
f6aec0ec2a
spelling 2023-12-19 10:47:52 -05:00
Peter D. Gray
7cea7ef549
Remove junk 2023-12-19 09:51:23 -05:00
Peter D. Gray
84a6a44bbe
New release: 2023-12-19T1444-v5.2.1 2023-12-19 09:44:43 -05:00
scgbckbone
5bfdc4f45a xprv master seed with tmp seeds and bip39 passphrase 2023-12-19 09:11:34 -05:00
Peter D. Gray
5102e55b7e
bugix 2023-12-18 14:16:58 -05:00
Peter D. Gray
46dc0b5b6d
more british & precise 2023-12-18 13:37:24 -05:00
Peter D. Gray
5cb63b299d
New release: 2023-12-18T1636-v5.2.1 2023-12-18 11:36:44 -05:00
Peter D. Gray
979c27387e
Bump 2023-12-18 11:34:30 -05:00
Peter D. Gray
f6f977503e
cleanup of ftux 2023-12-18 10:42:48 -05:00
Peter D. Gray
2b5a99ed59
Merge branch 'master' of github.com:Coldcard/firmware 2023-12-18 10:35:08 -05:00
Peter D. Gray
d1c5b907c0
Remove FTUX, add simple welcome screen 2023-12-18 10:34:59 -05:00
Peter D. Gray
58f0adc560
logout at end of menu 2023-12-18 10:08:32 -05:00
scgbckbone
697b6e211d fix tests 2023-12-18 09:59:35 -05:00
scgbckbone
3977ae2ce0 HSM multisig 400 test 2023-12-18 09:59:35 -05:00
Peter D. Gray
09b9065e10
edits, set target date 2023-12-18 09:58:51 -05:00
Peter D. Gray
3197ad19e5
capture hardware platform into backups 2023-12-18 09:35:06 -05:00
scgbckbone
4359a9735b Improve BIP39 Passphrase UX if temporary seed active and passphrase applicable 2023-12-15 17:33:46 -05:00
Peter D. Gray
77f63ecd28
code cleanup, killbtn works on Nickname screen 2023-12-15 12:56:59 -05:00
Peter D. Gray
2f369e1d38
example for dfu-utils 2023-12-15 11:07:22 -05:00
Peter D. Gray
9367098259
login screen redo 2023-12-15 11:06:50 -05:00
Peter D. Gray
de9072a1b5
handle display when upgrade fails 2023-12-15 11:06:36 -05:00
Peter D. Gray
1ef283ad22
handle display when upgrade fails 2023-12-15 11:06:26 -05:00
Peter D. Gray
858faf2c88
cleanup dev code 2023-12-15 10:51:24 -05:00
scgbckbone
9824e59ef9 fix change_pin test 2023-12-15 10:49:56 -05:00
scgbckbone
9594efcf03 bugfix: prevent yikes in clone coldcard - creating backup with bypass_tmp=True on master secret 2023-12-15 10:49:33 -05:00
scgbckbone
3e5fd573a6 pwsave menu UX rework; do not allow empty bip39 passphrase 2023-12-14 13:19:14 -05:00
scgbckbone
79c143b7eb Remove legacy Mk1-3 code from pin changing 2023-12-14 12:54:55 -05:00
scgbckbone
af753c38be provide info about Tx level locktimes (nLocktime, nSequence) when signing 2023-12-14 12:53:40 -05:00
Peter D. Gray
5b826cc9e9
gpu test pattern 2023-12-14 11:39:35 -05:00
Peter D. Gray
b50afff4a1
tidy 2023-12-14 11:16:08 -05:00
Peter D. Gray
7d5641bae7
versioning 2023-12-14 10:29:55 -05:00
Peter D. Gray
03500503ab
notes 2023-12-14 10:29:06 -05:00
Peter D. Gray
0237c94a5f
tagging 2023-12-14 10:28:01 -05:00
Peter D. Gray
a27a985551
fine tuning 2023-12-14 10:20:23 -05:00
scgbckbone
4a39fc82f1 allow passphrase via USB if passphrase already set (work on master seed in that case); show password over USB UX change 2023-12-13 16:31:31 -05:00
Peter D. Gray
4428efbc3b
correct screen contents during visit to bootrom 2023-12-13 11:31:48 -05:00
Peter D. Gray
88bd695007
Better compression, and preserve top status bar 2023-12-13 10:48:21 -05:00
scgbckbone
84215b1721 one instant retry on AE_FAIL 2023-12-13 10:33:17 -05:00
scgbckbone
8ec2c7f88c IOError is deprecated, use OSError 2023-12-12 12:36:06 -05:00
scgbckbone
9188c7faf2 bugfix: do not allow to import master seed as temporary 2023-12-12 12:35:20 -05:00
scgbckbone
f8ac8eda89 Upgrade Firmware menu item is hidden if temporary seed is active 2023-12-12 08:47:31 -05:00
scgbckbone
8e689db6d7 Use LEFT/RIGHT buttons to iterate address ranges in address explorer instead of Mk4 7/9 2023-12-11 15:18:31 -05:00
Peter D. Gray
c602789ac4
fatter bars 2023-12-11 15:17:52 -05:00
Peter D. Gray
b91156db9b
bus interlock ctrl 2023-12-11 12:26:01 -05:00
Peter D. Gray
b3fb8a7a15
pin rename 2023-12-11 12:25:45 -05:00
Peter D. Gray
89236042c2
CPU vs GPU interlock 2023-12-11 12:25:25 -05:00
Peter D. Gray
27ee8c90d5
cleanups 2023-12-11 12:02:24 -05:00
Peter D. Gray
d330c09e60
handle corrupt DFU files (bad magic) 2023-12-08 14:34:10 -05:00
Peter D. Gray
33cc1f0b2d
two box login 2023-12-08 12:25:18 -05:00
Peter D. Gray
ea5717da6e
unhack 2023-12-08 12:24:40 -05:00
Peter D. Gray
2a906b02fb
Remove Mk1-3 code from pin changing 2023-12-08 10:13:03 -05:00
Peter D. Gray
913b7304d6
show checkmark for non-default values in settings menus 2023-12-08 09:44:22 -05:00
Peter D. Gray
1ad42867bc
text 2023-12-08 09:43:51 -05:00
Peter D. Gray
412979f721
Q selftest 2023-12-08 09:31:18 -05:00
Peter D. Gray
68c7f0f000
support dual slots on Q 2023-12-08 09:30:27 -05:00
Peter D. Gray
2029fe08f1
load GPU w/ right code 2023-12-08 09:30:12 -05:00
Peter D. Gray
71b46ea44e
install on first boot 2023-12-08 09:29:55 -05:00
Peter D. Gray
5ff976793e
add 90% bright, make def 80% 2023-12-08 09:28:40 -05:00
Peter D. Gray
522d838ec5
cache prelogin values 2023-12-08 09:28:05 -05:00
Peter D. Gray
c1441a8dab
reads better on q 2023-12-07 11:52:32 -05:00
Peter D. Gray
a7a1e6e8b0
cleanup 2023-12-07 11:52:17 -05:00
Peter D. Gray
b3bddd33ea
scroll bar first pass 2023-12-07 11:32:53 -05:00
Peter D. Gray
28ea702901
caps NFC/QR 2023-12-07 11:14:13 -05:00
Peter D. Gray
ec62c80ccc
keycaps 2023-12-07 11:06:05 -05:00
Peter D. Gray
e9ae9a9922
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2023-12-07 10:24:02 -05:00
Peter D. Gray
dd5cb223a9
lcd brightness 2023-12-07 10:23:39 -05:00
scgbckbone
d4f13317fc bugfix: do not allow to import master seed as temporary 2023-12-07 15:42:52 +01:00
scgbckbone
2ca125ab07 SELECT -> ENTER 2023-12-07 15:42:52 +01:00
scgbckbone
30546d0b5e better 2023-12-07 15:42:52 +01:00
Peter D. Gray
60074be670
fixes 2023-12-07 09:20:59 -05:00
Peter D. Gray
2e2f7bd7c4
fixes for Q 2023-12-07 09:20:44 -05:00
Peter D. Gray
8ae490c7b2
note 2023-12-07 09:20:36 -05:00
Peter D. Gray
f85112afa9
show ftux appropriately 2023-12-07 09:20:24 -05:00
Peter D. Gray
589d0b9dde
more NFC shortcuts 2023-12-07 09:19:21 -05:00
scgbckbone
285c90999e bugfix: add missing ftux for extended key import (as master) 2023-12-07 09:12:47 -05:00
Peter D. Gray
cd00c626c7
Use any QR as BIP-39 passphrase 2023-12-07 08:46:53 -05:00
Peter D. Gray
138cbad573
import into master seed if none yet set 2023-12-06 14:17:19 -05:00
Peter D. Gray
801fbb89b5
Rename SELECT->ENTER 2023-12-06 11:42:52 -05:00
Peter D. Gray
15a4277302
useful shortcut 2023-12-06 11:35:51 -05:00
Peter D. Gray
b21a684180
QR stuff 2023-12-06 11:29:49 -05:00
Peter D. Gray
f8d66cf76e
bugfix 2023-12-06 11:21:13 -05:00
Peter D. Gray
205da83357
better 2023-12-06 11:21:03 -05:00
Peter D. Gray
da21039a38
cleanup 2023-12-06 11:20:52 -05:00
Peter D. Gray
559c014bc4
robustness 2023-12-06 11:20:33 -05:00
Peter D. Gray
6fce68aa76
support L/R and U/down 2023-12-06 11:20:16 -05:00
Peter D. Gray
5131631de5
show Bech32 in lowercase 2023-12-06 11:19:47 -05:00
Peter D. Gray
01ba495e10
merge bugfix 2023-12-06 11:19:37 -05:00
Peter D. Gray
4e395eafbb
bugfix 2023-12-06 09:58:36 -05:00
Peter D. Gray
3162e8db93
obsolete 2023-12-06 09:48:51 -05:00
Peter D. Gray
ecd57daa56
Merge branch 'Q' of github.com:Coldcard/q1firmware into Q 2023-12-06 09:47:30 -05:00
Peter D. Gray
6dccaa5841
more scanning 2023-12-06 09:47:25 -05:00
scgbckbone
c8bded4468 fixes + seedQR test 2023-12-06 09:22:04 -05:00
scgbckbone
a1f6743de2 Export SeedQR 2023-12-06 09:21:05 -05:00
Peter D. Gray
32a39e530a
remove Q brand from status line 2023-12-06 08:35:37 -05:00
Peter D. Gray
69882216e9
Add export SeedQR 2023-12-05 13:47:48 -05:00
Peter D. Gray
83341c30a0
bugfix 2023-12-05 13:47:36 -05:00
Peter D. Gray
bac6a98a72
miss 2023-12-05 13:25:50 -05:00
Peter D. Gray
7a72106197
note 2023-12-05 13:05:57 -05:00
scgbckbone
9c569ed87e newest ckcc 2023-12-05 16:22:22 +01:00
scgbckbone
5dcbc9a5d3 BIP39 passphrase is both passphrase nad tmp on status bar; few todos + fixes after rebase 2023-12-05 15:07:48 +01:00
Peter D. Gray
0d625d516f working in psram now 2023-12-05 13:21:16 +01:00
Peter D. Gray
652e9a3d3d better render 2023-12-05 13:21:16 +01:00
Peter D. Gray
67d61ac11e add detection 2023-12-05 13:21:16 +01:00
Peter D. Gray
8541dbd8c6 bugfix 2023-12-05 13:21:16 +01:00
Peter D. Gray
99b8481f4d autodetect qr contents 2023-12-05 13:21:16 +01:00
Peter D. Gray
074065b190 qr scanner progress 2023-12-05 13:21:16 +01:00
Peter D. Gray
f63db63e76 scanning psbt 2023-12-05 13:21:16 +01:00
Peter D. Gray
359c343854 SMYB->SYM 2023-12-05 13:16:26 +01:00
Peter D. Gray
a18c05e41a support slot B on Q 2023-12-05 13:16:26 +01:00
Peter D. Gray
87c5da1ba0 support slot B on Q 2023-12-05 13:16:26 +01:00
Peter D. Gray
b8fc6e5227 cleanup 2023-12-05 13:10:23 +01:00
Peter D. Gray
100132d20a support slot B on Q 2023-12-05 13:10:23 +01:00
Peter D. Gray
60cee89061 cleanups 2023-12-05 13:09:24 +01:00
Peter D. Gray
377f16d6e6 oops 2023-12-05 13:09:24 +01:00
Peter D. Gray
b0213fe517 bugfixes, move LEDs 2023-12-05 13:09:24 +01:00
Peter D. Gray
f791019ad1 = moved to F 2023-12-05 13:09:24 +01:00
Peter D. Gray
cb2be2f382 Ephemeral->tmp.seed, symb->sym 2023-12-05 13:09:24 +01:00
Peter D. Gray
89f5cbfb78 newer api 2023-12-05 13:09:24 +01:00
Peter D. Gray
b16b685bb7 more 2023-12-05 13:09:24 +01:00
Peter D. Gray
73af932419 works 2023-12-05 13:04:41 +01:00
Peter D. Gray
d3833180e8 b4 SL changes 2023-12-05 13:04:41 +01:00
Peter D. Gray
fc226dc578 new simulator background 2023-12-05 13:04:41 +01:00
Peter D. Gray
d7c3e23b00 add se3 reset line, in rev B 2023-12-05 13:04:40 +01:00
Peter D. Gray
da11ed70a4 bugfix 2023-12-05 13:04:40 +01:00
Peter D. Gray
6f2a30e18f compress binary 2023-12-05 13:04:40 +01:00
Peter D. Gray
3ac0b2462f mock lcd backlight 2023-12-05 13:04:40 +01:00
Peter D. Gray
2c21320679 LCD backlight control 2023-12-05 13:04:40 +01:00
Peter D. Gray
1d05a87a8c save mem on mk4 2023-12-05 13:04:40 +01:00
Peter D. Gray
74a6d00c42 save mem on mk4 2023-12-05 13:04:40 +01:00
Peter D. Gray
543adf32cf fixes 2023-12-05 13:04:40 +01:00
Peter D. Gray
5399481a0d compressed GPU bianry 2023-12-05 13:04:40 +01:00
Peter D. Gray
67fe10b128 bugfix: backlight control 2023-12-05 13:04:40 +01:00
Peter D. Gray
d6e8404560 take2 2023-12-05 13:04:40 +01:00
Peter D. Gray
dae2133d58 missed symlink 2023-12-05 13:04:40 +01:00
Peter D. Gray
f1fc2d1ba6 better dark 2023-12-05 13:04:40 +01:00
Peter D. Gray
283ff13016 new cursor types 2023-12-05 13:04:40 +01:00
Peter D. Gray
007a2aafb0 new cursor styles 2023-12-05 13:04:40 +01:00
Peter D. Gray
035d2d50f3 cleanup, cleanup which is obsolete 2023-12-05 13:04:40 +01:00
Peter D. Gray
011e25e298 dark mode, and keycap symbols 2023-12-05 13:04:40 +01:00
Peter D. Gray
ae9fabb001 align xor 24-seed words display w/ page breaks 2023-12-05 13:04:40 +01:00
Peter D. Gray
02b004b3cd seed entry, dice rolling 2023-12-05 13:04:40 +01:00
Peter D. Gray
4b7d331bef commit b4 delete 2023-12-05 12:57:31 +01:00
Peter D. Gray
3652388aa5 api cleanup 2023-12-05 12:47:47 +01:00
Peter D. Gray
f69157dcd9 fancy text entry 2023-12-05 12:47:47 +01:00
Peter D. Gray
f3527e1960 NFC key in prompt 2023-12-05 12:44:32 +01:00
Peter D. Gray
a2268c6560 add box drawing chars 2023-12-05 12:42:42 +01:00
Peter D. Gray
3cc888d053 sexier 2023-12-05 12:42:42 +01:00
Peter D. Gray
0acaee5871 brand colour 2023-12-05 12:42:42 +01:00
Peter D. Gray
f4c6c470db gpu needs 2023-12-05 12:42:42 +01:00
Peter D. Gray
3aa4bd1eb6 for q1 2023-12-05 12:42:42 +01:00
Peter D. Gray
f2c5a6fe91 more 2023-12-05 12:42:42 +01:00
Peter D. Gray
9c8827cdab gpu 2023-12-05 12:42:26 +01:00
Peter D. Gray
4b6247105a v1.1.1 2023-12-05 12:42:26 +01:00
Peter D. Gray
cafb573a39 works 2023-12-05 12:42:26 +01:00
Peter D. Gray
c37197f91a v1.1.1 2023-12-05 12:42:26 +01:00
Peter D. Gray
a9dcc52b10 cleanups, optimizations 2023-12-05 12:42:26 +01:00
Peter D. Gray
940096746f GPU simulation 2023-12-05 12:42:26 +01:00
Peter D. Gray
ec0254739f cursor 2023-12-05 12:42:26 +01:00
Peter D. Gray
f3a3191730 working in-circuit upgrade 2023-12-05 12:42:26 +01:00
Peter D. Gray
5ea4029e0a cleanups 2023-12-05 12:42:26 +01:00
Peter D. Gray
2c5305d2f6 working progress bar 2023-12-05 12:42:26 +01:00
Peter D. Gray
c32df6489f some lcd pixels 2023-12-05 12:42:26 +01:00
Peter D. Gray
3e3a833332 working well 2023-12-05 12:42:26 +01:00
Peter D. Gray
bccabdc5ba working rad 2023-12-05 12:42:26 +01:00
Peter D. Gray
dd2be687e1 makes binary 2023-12-05 12:42:26 +01:00
Peter D. Gray
3c71a30cbb swap SELECT/CANCEL positions 2023-12-05 12:42:26 +01:00
Peter D. Gray
fd8c22bb26 show XFP in status bar 2023-12-05 12:42:26 +01:00
Peter D. Gray
d1088b70dd add xfp 2023-12-05 12:33:29 +01:00
Peter D. Gray
9054726d53 updated 2023-12-05 12:33:29 +01:00
Peter D. Gray
cc6dfc8068 notes 2023-12-05 12:33:29 +01:00
Peter D. Gray
c192c26447 comments 2023-12-05 12:33:29 +01:00
Peter D. Gray
ddf2e6a0f3 note 2023-12-05 12:33:29 +01:00
Peter D. Gray
a7041eda93 orange, faster 2023-12-05 12:33:29 +01:00
Peter D. Gray
657097029c cleanup, honest palette 2023-12-05 12:33:29 +01:00
Peter D. Gray
70c189b56a startup movie, cleanups 2023-12-05 12:33:29 +01:00
Peter D. Gray
b5988ffa0f startup movie, cleanups 2023-12-05 12:33:29 +01:00
Peter D. Gray
2764c0beef more q1 2023-12-05 12:33:29 +01:00
Peter D. Gray
11887fd53a wrote 2023-12-05 12:33:29 +01:00
Peter D. Gray
e47a6ba988 cleanup 2023-12-05 12:33:29 +01:00
Peter D. Gray
14efa6248e fix 2023-12-05 12:33:29 +01:00
Peter D. Gray
81f5afc76f login placeholder char 2023-12-05 12:33:29 +01:00
Peter D. Gray
9cd25bd5ff Q1 can do version 40 2023-12-05 12:33:29 +01:00
Peter D. Gray
3ecd474137 more colour, QR codes 2023-12-05 12:33:29 +01:00
Peter D. Gray
04152d09f5 no need for keyboard help on Q1 2023-12-05 12:33:29 +01:00
Peter D. Gray
8c706e2a4c QR display 2023-12-05 12:33:29 +01:00
Peter D. Gray
094a3b5c52 more chars 2023-12-05 12:33:29 +01:00
Peter D. Gray
f2724daa5b welcome msg updated and fine-tuned for q1 and mk4 2023-12-05 12:33:29 +01:00
Peter D. Gray
3781f7a08d Q1 display and ux 2023-12-05 12:33:29 +01:00
Peter D. Gray
394d1c0590 lost diff? need this 2023-12-05 12:33:05 +01:00
Peter D. Gray
63291a1906 search mk4 for obj files at link time 2023-12-05 12:33:05 +01:00
Peter D. Gray
3e77d1efae bugfixes 2023-12-05 12:33:05 +01:00
Peter D. Gray
c8adf9cefa remove version.has_fatram, add version.supports_hsm 2023-12-05 12:30:39 +01:00
Peter D. Gray
05b86b6375 changes and additional chars 2023-12-05 12:10:01 +01:00
Peter D. Gray
eb77c7cbde login UX for Q1 2023-12-05 12:10:01 +01:00
Peter D. Gray
0493aee1ae add KEY_CLEAR 2023-12-05 12:10:01 +01:00
Peter D. Gray
f11e1b7e1a flag for type of display 2023-12-05 12:10:01 +01:00
Peter D. Gray
7d3c213b7e quick placeholder for Q1 animation 2023-12-05 12:10:01 +01:00
Peter D. Gray
c3e0c1449a QR shortcuts, paging 2023-12-05 12:10:01 +01:00
Peter D. Gray
989984b05e Q1 start 2023-12-05 12:10:01 +01:00
Peter D. Gray
ddceab0c5e cleanup 2023-12-05 12:08:01 +01:00
Peter D. Gray
c6e0fd7fa7 remove unused early_draw funct 2023-12-05 12:08:01 +01:00
Peter D. Gray
ce0d82dfbc QR for Q1 2023-12-05 12:08:01 +01:00
Peter D. Gray
5eba49e20a hide bless firmware in adv menu 2023-12-05 12:04:47 +01:00
Peter D. Gray
343918bd8a semicolons on the brain 2023-12-05 12:02:51 +01:00
Peter D. Gray
a4d33afe60 bugfix 2023-12-05 12:02:51 +01:00
Peter D. Gray
86ef471467 rendering QR codes 2023-12-05 12:02:51 +01:00
Peter D. Gray
ce8c5dacd5 qr display cleanup 2023-12-05 12:02:51 +01:00
Peter D. Gray
1fd6f1a1c3 QR support 2023-12-05 12:02:51 +01:00
Peter D. Gray
7e622c391d QR test cases against Q1 2023-12-05 12:02:51 +01:00
Peter D. Gray
cc1bb2306b cleanup, cleanup 2023-12-05 11:59:13 +01:00
Peter D. Gray
4d1ab35ddf Q1 /X/CANCEL/g and /OK/SELECT/g 2023-12-05 11:59:13 +01:00
Peter D. Gray
2c18f0dbc1 cleanups, and improve LED emulation 2023-12-05 11:59:13 +01:00
Peter D. Gray
11db6004e4 bugfix: on simulator SD active LED not always turned off 2023-12-05 11:59:13 +01:00
Peter D. Gray
0e2be61276 quick text entry code 2023-12-05 11:57:06 +01:00
Peter D. Gray
8324a1fefa add version.is_edge placeholder 2023-12-05 11:52:50 +01:00
Peter D. Gray
a5d9010494 add version indicator icon 2023-12-05 11:51:31 +01:00
Peter D. Gray
0a5e06c569 number entry 2023-12-05 11:51:31 +01:00
Peter D. Gray
13af836ca1 factor-out ux for q1 vs mk4 2023-12-05 11:51:31 +01:00
Peter D. Gray
675b815ce0 weird lost code? 2023-12-05 11:48:30 +01:00
Peter D. Gray
c3f5af6d60 rebuild/maintain sigheader.{h,py} in one place 2023-12-05 11:48:30 +01:00
Peter D. Gray
d4a9789efc missed/lost file during rebase 2023-12-05 11:35:04 +01:00
Peter D. Gray
a9fb99fbbc for reference 2023-12-05 11:35:04 +01:00
Peter D. Gray
55e81b75dc revA GPIO support 2023-12-05 11:35:04 +01:00
Peter D. Gray
8620d8fb68 nearly right 2023-12-05 11:34:41 +01:00
Peter D. Gray
7225e445ce generalizing for q1 vs mk4 2023-12-05 11:34:41 +01:00
Peter D. Gray
afd1c8cda1 generalized for q1 vs mk4 2023-12-05 11:34:41 +01:00
Peter D. Gray
88496cd851 progress toward shipping 2023-12-05 11:34:41 +01:00
Peter D. Gray
1f4c2298aa rev A change 2023-12-05 11:34:41 +01:00
Peter D. Gray
b4ff436b5f move yikes and menu drawing here 2023-12-05 11:34:40 +01:00
Peter D. Gray
e912ef64fe missed symbols 2023-12-05 11:34:40 +01:00
Peter D. Gray
4d0241e61d alias up 2023-12-05 11:34:40 +01:00
Peter D. Gray
62cb894484 better splash 2023-12-05 11:34:40 +01:00
Peter D. Gray
b4d0aadaeb add kwargs support 2023-12-05 11:34:40 +01:00
Peter D. Gray
6072544004 status icon 2023-12-05 11:34:40 +01:00
Peter D. Gray
f61b8c9337 status icon 2023-12-05 11:28:03 +01:00
Peter D. Gray
9a048f250d color and new font 2023-12-05 11:23:23 +01:00
Peter D. Gray
bef465e2c7 q1 support: more leds, keyboard diff, etc 2023-12-05 11:23:23 +01:00
Peter D. Gray
3eb98562ef more q1 images 2023-12-05 11:22:17 +01:00
Peter D. Gray
1407e0cf26 b4 key rewrite 2023-12-05 11:22:16 +01:00
Peter D. Gray
69d2b8641b we have a power btn now 2023-12-05 11:22:16 +01:00
Peter D. Gray
b286be7d22 progress with better font 2023-12-05 11:19:04 +01:00
Peter D. Gray
7f6a1e0140 cleanup / optimize data-only files 2023-12-05 11:19:04 +01:00
Peter D. Gray
535e70637f q1 colour 2023-12-05 11:18:51 +01:00
Peter D. Gray
0fa2b5ce6d font for Q1 2023-12-05 11:18:51 +01:00
Peter D. Gray
eabc237a59 update for rev A 2023-12-05 11:18:50 +01:00
Peter D. Gray
f4791be5c3 cleanup 2023-12-05 11:18:50 +01:00
Peter D. Gray
9b6dec06bc bugifx 2023-12-05 11:18:50 +01:00
Peter D. Gray
819a513030 power mgmt 2023-12-05 11:18:50 +01:00
Peter D. Gray
a33c1fb733 battery level reading 2023-12-05 11:18:50 +01:00
Peter D. Gray
f8a4166c6c QR scanner support 2023-12-05 11:18:50 +01:00
Peter D. Gray
a2452767cb tweak width 2023-12-05 11:08:07 +01:00
Peter D. Gray
efe1180e1c width q1 2023-12-05 11:08:07 +01:00
Peter D. Gray
b830201675 cleanup 2023-12-05 11:08:07 +01:00
Peter D. Gray
bda639a23b document a bug 2023-12-05 11:08:07 +01:00
Peter D. Gray
c6502101d4 q1 first pass ux 2023-12-05 11:08:07 +01:00
Peter D. Gray
95e6d0371d q1 fix 2023-12-05 11:06:09 +01:00
Peter D. Gray
7f6cde45d1 keycodes 2023-12-05 11:06:09 +01:00
Peter D. Gray
04a7d08c1a remove secondary wallet concept, add basic q1 login 2023-12-05 11:06:09 +01:00
Peter D. Gray
28b909e4fb remove line2 arg to fullscreen, was unused 2023-12-05 11:06:09 +01:00
Peter D. Gray
cd57742602 clenaup 2023-12-05 11:06:09 +01:00
Peter D. Gray
338136bd4c major speed bump up 2023-12-05 11:06:09 +01:00
Peter D. Gray
a7c7496465 need this 2023-12-05 11:06:09 +01:00
Peter D. Gray
82cf526f43 more q1 capabilities 2023-12-05 11:06:09 +01:00
Peter D. Gray
f02b6aa9de q1 support 2023-12-05 11:03:51 +01:00
Peter D. Gray
a7c1cdf8ff working keyboard sim 2023-12-05 11:03:51 +01:00
Peter D. Gray
9b6b676dd1 refactor 2023-12-05 11:03:51 +01:00
Peter D. Gray
3ea0711b28 makes screens.h variable 2023-12-05 11:03:51 +01:00
Peter D. Gray
b85f9b22a1 q1 power down case 2023-12-05 11:03:51 +01:00
Peter D. Gray
279da41b1d more 2023-12-05 11:03:51 +01:00
Peter D. Gray
645a172801 use progress_bar_show when possible 2023-12-05 11:03:51 +01:00
Peter D. Gray
020cef6706 lcd support 2023-12-05 11:01:43 +01:00
Peter D. Gray
6b0bcf3927 working better 2023-12-05 11:01:43 +01:00
Peter D. Gray
125489b4ea q1 addition 2023-12-05 11:01:43 +01:00
Peter D. Gray
77828b3d00 add light 2023-12-05 11:01:43 +01:00
Peter D. Gray
31b4823281 q1 basics 2023-12-05 11:01:43 +01:00
Peter D. Gray
407737df09 b4 cleanup 2023-12-05 11:01:43 +01:00
Peter D. Gray
30a66adb60 first pass q1 2023-12-05 11:01:43 +01:00
Peter D. Gray
cf5834653f first pass q1 2023-12-05 10:50:20 +01:00
Peter D. Gray
c115e6e816 more LCD support 2023-12-05 10:50:20 +01:00
Peter D. Gray
a5e2c1600a LCD support in bootrom 2023-12-05 10:50:20 +01:00
Peter D. Gray
2f2a56bd12 pull basics from mk4 2023-12-05 10:50:20 +01:00
Peter D. Gray
21e84b84ef another workaround 2023-12-05 10:50:20 +01:00
scgbckbone
e71d932b30 prevent yikes in settings._read_slot when loading settings 2023-11-24 09:17:17 -05:00
scgbckbone
ced5f068b1 Add test to sign 400 different PSBTs in one session 2023-11-13 10:17:44 -05:00
scgbckbone
883c79b14f mpy bump to include MacOS btree build cope 2023-11-09 10:11:02 -05:00
scgbckbone
073e8cf98b forgotten BDB cope 2023-11-07 08:45:51 -05:00
Peter D. Gray
73b84862fb
Editings 2023-11-06 10:19:20 -05:00
Peter D. Gray
d5f5956187
dup import 2023-11-06 10:19:12 -05:00
scgbckbone
1b90f240b1 cope with future removal of BDB wallet from bitcoin client 2023-11-03 10:56:23 -04:00
scgbckbone
56e26d051e postpone Restore Saved MicroSD card reading 2023-11-03 10:55:49 -04:00
Peter D. Gray
dc6625e466
Merge branch 'master' of github.com:Coldcard/firmware 2023-10-26 10:25:07 -04:00
Peter D. Gray
080f935a42
add edge 2023-10-26 10:25:00 -04:00
scgbckbone
e797e7d78b test fixes 2023-10-25 11:29:23 -04:00
scgbckbone
a65b1fcc09 temporary seed from encrypted COLDCARD backup 2023-10-23 10:59:47 -04:00
scgbckbone
e3014390c4 move 12 Words mnemonic options at the top of the menus 2023-10-23 10:28:51 -04:00
scgbckbone
81e8f3dee2 Add current tmp seed to Seed Vault via Seed Vault menu 2023-10-15 14:47:24 -04:00
scgbckbone
55fc81755f regenerate menu-tree.txt 2023-10-12 11:10:43 -04:00
Peter D. Gray
ec7b54979e
edit 2023-10-11 08:50:20 -04:00
Peter D. Gray
adb9939df0
this is it 2023-10-11 08:42:10 -04:00
Peter D. Gray
48be2d9005
New release: 2023-10-10T1735-v5.2.0 2023-10-10 13:35:18 -04:00
scgbckbone
8a4b4b3d7b remove last "Ephemeral" UX string from test 2023-10-10 11:16:20 -04:00
scgbckbone
c9cf5b7db8 seed vault xfp collision 2023-10-09 12:43:35 -04:00
scgbckbone
bb6fea731e seed vault backup tests 2023-10-09 12:43:35 -04:00
Peter D. Gray
05a08b6ff8 seed vault optimizations 2023-10-09 12:43:35 -04:00
scgbckbone
3784e1e007 UX: rename Ephemeral Seed to Temporary Seed 2023-10-09 11:23:53 -04:00
scgbckbone
e1ac204e04 Never store 'seeds' in ephemeral settings 2023-10-06 08:27:14 -04:00
Martin
1a761d0daf Fix double 'before' 2023-10-06 07:59:11 -04:00
Peter D. Gray
93860bab2e
Ephemeral => Temporary Seeds 2023-10-05 10:01:39 -04:00
Peter D. Gray
09322abfd4
more lang tweaks 2023-10-05 09:18:21 -04:00
scgbckbone
8d304f408a bugfix: incorrect xfp shown in meta for passphrase on top of eph secret 2023-10-05 09:13:43 -04:00
Peter D. Gray
52d71a615f
Edits 2023-10-05 08:48:16 -04:00
Peter D. Gray
5734b316d0
Messaging and logic 2023-10-04 11:50:03 -04:00
Peter D. Gray
cb6fef244d
add dfu upload option for dev.dfu 2023-10-04 11:11:45 -04:00
Peter D. Gray
e635f5d9bc
Bugfix 2023-10-04 11:10:22 -04:00
Peter D. Gray
349a739e86
bump 2023-10-04 10:52:09 -04:00
scgbckbone
e798765056 UX renaming 2023-10-04 10:35:57 -04:00
Peter D. Gray
ee9e01bc6b
cleanup 2023-10-04 09:50:43 -04:00
Peter D. Gray
75235b240e
cleanup 2023-10-04 09:40:45 -04:00
scgbckbone
c2b8527f0c remove forgotten debug print statements 2023-10-04 09:35:00 -04:00
Peter D. Gray
58ba4000b5
edits 2023-10-04 09:01:33 -04:00
scgbckbone
bceaaf92e0 Seed Vault 2023-10-04 08:54:29 -04:00
Peter D. Gray
f91925c187
edits 2023-10-02 09:48:54 -04:00
scgbckbone
fe63163c85 restore to main se2 secret without reboot; active ephemeral seeds have first home menu item [XFP]; tests reorg - created separate test_backup.py; add ability to remove ephemeral seed settings via Restore Seed 2023-09-25 09:36:09 -04:00
scgbckbone
325435b678 NUM_SLOTS in PSRAM increased from 64 to 100 2023-09-25 09:28:16 -04:00
scgbckbone
9f408c2167 bugfix: off by one bug in trick pin - login countdown 2023-09-22 09:37:16 -04:00
scgbckbone
efda6f84dd PSBTv2 2023-09-21 10:17:44 -04:00
scgbckbone
e5d1782b9d BIP39 passphrase as ephemeral seed; Lock Down Seed for all ephemeral; BIP-39 wallet backup 2023-09-21 08:50:32 -04:00
scgbckbone
6655238409 remove obsolete Mk2/Mk3 code paths from firmware 2023-09-21 08:32:59 -04:00
scgbckbone
d497e5006e se2 (duress wallet) tests need to run without --eff 2023-09-14 11:52:37 -04:00
scgbckbone
4fb9148cfd shortcut to Batch Sign 2023-09-14 11:48:35 -04:00
scgbckbone
5782dafed2 replace obsolete plausible deniability in nvstore.py 2023-09-14 11:32:10 -04:00
Peter D. Gray
690b667b2f
New release: 2023-09-08T2009-v5.1.4 2023-09-08 16:09:25 -04:00
Peter D. Gray
5393e924ba
Bugfix: firmware sizes must align with flash erase unit (4k) 2023-09-08 16:06:38 -04:00
Peter D. Gray
aaa178d5bb
New release: 2023-09-07T1502-v5.1.3 2023-09-07 11:02:05 -04:00
scgbckbone
79ce4ae115 Do NOT inherit linked and prelogin settings, do NOT backup words length setting; goto_top_menu after activating bip85 as ephemeral secret 2023-09-07 10:52:43 -04:00
Peter D. Gray
cd068f7bbc
bump 2023-09-07 09:31:42 -04:00
Peter D. Gray
36fb1144de
New release: 2023-09-07T1328-v5.1.2 2023-09-07 09:28:36 -04:00
Peter D. Gray
f9d206d844
Merge branch 'master' of github.com:Coldcard/firmware 2023-09-07 09:23:38 -04:00
scgbckbone
0c92824b46 Pillow textsize removed in 10.0.0 2023-09-06 10:27:25 -04:00
Peter D. Gray
1122eaafa8
editing 2023-09-06 09:17:36 -04:00
Peter D. Gray
7e1460b501
cleanup/generalize 2023-09-06 09:00:22 -04:00
Peter D. Gray
3cec82d912
Merge branch 'master' of github.com:Coldcard/firmware 2023-09-05 11:11:10 -04:00
Peter D. Gray
fc06f73017
language change to be more clear 2023-09-05 11:11:06 -04:00
scgbckbone
519d4ef5f1 remove "Look Blank" option from "if wrong" trick pins as it is not supported by the bootrom, remove duplicate "Blank Coldcard" menu item from Duress Wallet option 2023-09-05 10:29:42 -04:00
Peter D. Gray
f4588ab6f1
edits 2023-09-05 08:56:24 -04:00
scgbckbone
673d8ab3e2 preserve defined order of chooser in Login Countdown 2023-08-30 11:15:54 -04:00
scgbckbone
205a2713d4 more UX elements to improve responsiveness 2023-08-30 10:54:18 -04:00
scgbckbone
5a0e423e5d accept TOS only presented if pa.is_blank=True and settings.terms_ok=False 2023-08-30 10:52:04 -04:00
scgbckbone
5d0b6357be update ckcc-protocol to master tip 2023-08-30 10:50:19 -04:00
scgbckbone
fba7de33cf Sparrow export via named_generic_export 2023-08-30 08:15:05 -04:00
scgbckbone
b282b5598d cli: explicit sigheader declaration in setup.py 2023-08-29 09:18:35 -04:00
scgbckbone
90dff02591 fix msg signing previously broken by 836980d9ce 2023-07-20 15:30:55 -04:00
scgbckbone
263800d720 update bip85-passwords.md 2023-07-19 10:37:16 -04:00
scgbckbone
500f730265 sd2fa is NOT backed up and not restored from older backups 2023-07-19 10:19:20 -04:00
scgbckbone
0d271d9027 update simulator README.md with link to WSL/Windows 2023-07-19 08:28:23 -04:00
scgbckbone
836980d9ce bug: fix paper wallet error when no secrets 2023-07-17 09:11:51 -04:00
scgbckbone
99eb4b0345 bug: xfp shown as integer in signing UI when bip39 passphrase in effect 2023-07-12 09:52:13 -04:00
Peter D. Gray
5172b3b9cd
add 4.1.9 for mk3 2023-06-26 09:56:47 -04:00
Peter D. Gray
6fd6684004
backport 2023-06-26 09:56:26 -04:00
@RandyMcMillan
dadc6bc452 README.md: fix spelling: products 2023-06-23 13:07:08 -04:00
Peter D. Gray
71b893f417
Renamed 2023-06-23 11:23:35 -04:00
Peter D. Gray
689496f018
bugfix on MacOS 2023-06-23 11:23:15 -04:00
Peter D. Gray
ffb4cd32e9
rename file 2023-06-23 10:20:42 -04:00
scgbckbone
a3b466fc71 truncated address - add one more char to first part to view regtest segwit version 2023-06-23 10:07:09 -04:00
Peter D. Gray
0fe230e150
Make menu item 'Batch Sign PSBT' 2023-06-23 09:05:17 -04:00
scgbckbone
39a125a753 Batch Sign 2023-06-23 08:59:20 -04:00
Peter D. Gray
39c3e89b69
sign edge release 2023-06-20 11:11:32 -04:00
Peter D. Gray
cc043e2fdf
Edits 2023-06-20 09:03:44 -04:00
Peter D. Gray
ebd4cd9812
Merge branch 'master' of github.com:Coldcard/firmware 2023-06-20 08:58:22 -04:00
scgbckbone
0fa8c8b0d2 bugfix: empty b39 pwd number selection causes type error 2023-06-20 08:08:05 -04:00
Peter D. Gray
bf7fa7b713
add 4.1.8 from other branch 2023-06-19 16:38:05 -04:00
Peter D. Gray
c488882862
Merge branch 'master' of github.com:Coldcard/firmware 2023-06-19 13:43:53 -04:00
Peter D. Gray
abddb41dd0
back/cross-port for mk4 4.1.8 release 2023-06-19 13:43:44 -04:00
scgbckbone
1667ee8369 rename "Unchained Capital" to "Unchained" 2023-06-15 10:22:20 -04:00
scgbckbone
2dedccb0fb B85 menu flow 2023-06-02 09:24:58 -04:00
scgbckbone
d0a318000f duplicate XFP limitations.md 2023-05-30 10:14:56 -04:00
Peter D. Gray
9b2ef862cb Add middle-dots character to font, use arrows/dots in address explorer menu; tweaks. 2023-05-29 13:50:25 -04:00
scgbckbone
0874324372 remove label from bitcoin core export - in 24.1 label is no longer supported with ranged descriptors 2023-05-29 08:46:26 -04:00
KST ☩ WINTER HODLER
e406b27838 Update bitcoin-core-usage.md 2023-05-26 14:57:18 -04:00
scgbckbone
573456885f remove buggy error msg 2023-05-26 09:43:33 -04:00
Vishal Menon
762cfb3a86 Added notes from dochex. 2023-05-23 11:15:57 -04:00
Vishal Menon
0e455fde27 Created docs/notes-on-repro.md to explain how repro builds are checked and verified. 2023-05-23 11:15:57 -04:00
Peter D. Gray
c6f58e5eb4
add edge release 2023-05-12 10:21:08 -04:00
scgbckbone
63debfebaf unify address format labels; address explorer now uses both labels and shortened addresses; axi updated to track last 4 addr chars or MenuItem label (multisig) 2023-05-10 11:57:48 -04:00
scgbckbone
eb0f22ec6b force vdisk for From Virtdisk firmware upgrade 2023-05-10 11:57:31 -04:00
Peter D. Gray
037fc27dcd
re-enable screensaver, which SDL disables by default 2023-05-09 13:57:55 -04:00
Peter D. Gray
c9fbe0e251
Better 2023-05-09 09:54:32 -04:00
Peter D. Gray
56f99f41de
edge version 2023-05-09 09:45:07 -04:00
Peter D. Gray
feca7268c2
edits 2023-05-09 09:42:27 -04:00
scgbckbone
c126553147 change Key Origin Information export format of multisig addresses .csv according to BIP-0380 2023-05-03 09:15:18 -04:00
scgbckbone
f7af32cce7 fake_txn segwit_in fix 2023-04-25 14:09:56 -04:00
scgbckbone
fe4b13a81b correct scrptPubkey parsing for segwit v1-v16 2023-04-25 14:09:56 -04:00
scgbckbone
627d042a1d allow witness utxo to be defined for legacy p2sh multisig 2023-04-21 14:55:42 -04:00
Peter D. Gray
6278f5c0ef
New release: 2023-04-07T1330-v5.1.2 2023-04-07 09:30:22 -04:00
Peter D. Gray
b5056c8ab8
Updated for 5.1.2 2023-04-07 09:27:47 -04:00
Peter D. Gray
a1504934c1
Bump 2023-04-07 09:27:15 -04:00
Peter D. Gray
0b56737e25
broaden check of commits 2023-04-07 09:27:00 -04:00
Peter D. Gray
a93b5dc534
edit 2023-04-07 09:26:21 -04:00
Peter D. Gray
cdb79f6d63
New release: 2023-04-07T1319-v5.1.1 2023-04-07 09:19:12 -04:00
Peter D. Gray
6dbfa81e18
Slight language change 2023-04-06 12:08:40 -04:00
Peter D. Gray
e4693e0738
Cleanups, text changes 2023-04-06 11:12:27 -04:00
Peter D. Gray
dd8b257705
comment 2023-04-06 09:58:26 -04:00
Peter D. Gray
c157a9505a
comment 2023-04-06 09:57:38 -04:00
scgbckbone
8cc55e8539 restrict segwit SINGLE output out of bound; sighash restrictions 2023-04-06 09:54:39 -04:00
scgbckbone
4bfec18ac3 Revert "keep regtest net alive during multiple tests"
This reverts commit 571b67e913.
2023-04-06 09:54:39 -04:00
scgbckbone
c37ebd3f1a zero output test; limitations update 2023-04-05 14:41:51 -04:00
Peter D. Gray
83d82cb162
bugfix: support CLI --set operation in tests 2023-04-04 09:39:15 -04:00
Peter D. Gray
571b67e913
keep regtest net alive during multiple tests 2023-04-03 12:16:01 -04:00
Peter D. Gray
1f2f8bc1e9
Bugfixes 2023-03-31 11:12:28 -04:00
Peter D. Gray
643126161d
Fluff 2023-03-31 11:12:14 -04:00
Peter D. Gray
f5fc03c661
Edits 2023-03-31 10:14:55 -04:00
Peter D. Gray
1af410e9ec
Tweak 2023-03-31 10:09:46 -04:00
scgbckbone
98459a62c1 output validation optimization - no caching 2023-03-31 10:05:26 -04:00
scgbckbone
c566e389c8 UX issues 2023-03-30 16:07:45 -04:00
scgbckbone
2ee65e628c solo release commit 2023-03-30 13:26:52 -04:00
scgbckbone
64843e42e3 docker container improvements: no root, no privileges, and correct uid/gid mapping 2023-03-30 12:57:02 -04:00
scgbckbone
6111d552ea support all sighash flags; do not set sighash for foreign inputs; deltamode optimizations; bip143 test vectors 2023-03-30 12:52:26 -04:00
scgbckbone
c437f19cf3 refresh menu after set_seed_extended_key 2023-03-30 12:45:46 -04:00
scgbckbone
9629664bf5 Update SEED XOR docs 2023-03-20 15:49:25 -04:00
scgbckbone
1226502170 SeedXOR improvements 2023-03-16 14:14:40 -04:00
scgbckbone
265edcd1d2 SeedXOR for 12 and 18 words mnemonics 2023-03-16 14:00:47 -04:00
Peter D. Gray
67f5640b53
New release: 2023-02-27T2106-v5.1.1 2023-02-27 16:06:08 -05:00
Peter D. Gray
8270b98993
Signed for release. 2023-02-27 16:06:05 -05:00
Peter D. Gray
4146cafd6f
better 2023-02-27 16:04:12 -05:00
Peter D. Gray
8028416329
For 2023-02-27T2059-v5.1.1 2023-02-27 16:00:04 -05:00
Peter D. Gray
2c07c37bd4
quick 5.1.1 release to get back under size limit 2023-02-27 15:57:55 -05:00
Peter D. Gray
295b6c7fbf
fix for manual testing 2023-02-27 15:57:37 -05:00
Peter D. Gray
2f769f1219
New release: 2023-02-27T1509-v5.1.0 2023-02-27 10:09:23 -05:00
Peter D. Gray
5140ae001f
Signed for release. 2023-02-27 10:09:21 -05:00
Peter D. Gray
88e00a8b2f
bugfix 2023-02-27 09:51:59 -05:00
Peter D. Gray
a30e4aaeca
Commit! 2023-02-27 09:51:46 -05:00
scgbckbone
a25ada8416 fix insufficient funds error in test_bitcoind_MofN_tutorial 2023-02-27 09:50:42 -05:00
scgbckbone
1d68536ba1 * tapsigner/xprv NFC import stop immediatly after no data received
* more verbose error message for malformed sig files
* skip digest check for NFC imported sig files
2023-02-27 09:46:13 -05:00
Peter D. Gray
3a0ac0f14c
Add test case for issue w/ missing leading dash 2023-02-24 14:56:27 -05:00
Peter D. Gray
43524a8ef5
support NDEF test cases >= 256 bytes 2023-02-24 14:49:14 -05:00
Peter D. Gray
42abaf3bc9
handle nfc/vdsk enabled or not in unrelated tests 2023-02-24 09:19:27 -05:00
scgbckbone
a1bc4617d1 1of1 multisig correct UI 2023-02-23 08:58:13 -05:00
Dee
6ade41606a Changed "Cheap" to "Affordable" 2023-02-22 18:45:29 -05:00
scgbckbone
157673da8f correct MPY submodule branch 2023-02-21 20:05:18 -05:00
Peter D. Gray
6fe6ff565d
language changes 2023-02-21 14:31:34 -05:00
Peter D. Gray
2f8f950679
Quick fix for secp256k1 on Arm MacOS 2023-02-21 10:38:31 -05:00
scgbckbone
b535d7ed22 verify digest for detached signature files 2023-02-21 09:21:20 -05:00
Peter D. Gray
c86b527d13
edits, reorg 2023-02-17 10:21:13 -05:00
scgbckbone
ebd34c81b3 backup fix + update attended tests to cope with new backup procedure 2023-02-17 09:28:35 -05:00
scgbckbone
d2e61b692d regenerate menu-tree.txt; menu_dumppy fixes 2023-02-16 16:25:22 -05:00
scgbckbone
5e89cf687a Detached signature file for single sig exports, generic single sig exports, paper wallets, derived entropy; BIP137 fixes; signature file verification; sign files in 'List Files' manu 2023-02-16 16:25:09 -05:00
scgbckbone
307df0c013 Main seed and ephemeral seed from Tapsigner backup + ephemeral seed from extended private key 2023-02-16 11:35:03 -05:00
Peter D. Gray
d6193d5636 Save test backup password for next use 2023-02-16 09:38:01 -05:00
516 changed files with 409235 additions and 12926 deletions

2
.gitignore vendored
View File

@ -24,3 +24,5 @@ __pycache__/
.tags .tags
pp pp
.idea/

8
.gitmodules vendored
View File

@ -1,7 +1,7 @@
[submodule "external/micropython"] [submodule "external/micropython"]
path = external/micropython path = external/micropython
url = https://github.com/Coldcard/micropython.git url = https://github.com/Coldcard/micropython.git
branch = master branch = mk4-base
[submodule "external/ckcc-protocol"] [submodule "external/ckcc-protocol"]
path = external/ckcc-protocol path = external/ckcc-protocol
url = https://github.com/Coldcard/ckcc-protocol.git url = https://github.com/Coldcard/ckcc-protocol.git
@ -14,3 +14,9 @@
[submodule "stm32/mk4-bootloader/hal"] [submodule "stm32/mk4-bootloader/hal"]
path = stm32/mk4-bootloader/hal path = stm32/mk4-bootloader/hal
url = https://github.com/STMicroelectronics/STM32CubeL4.git url = https://github.com/STMicroelectronics/STM32CubeL4.git
[submodule "misc/gpu/external/stm32c0xx_hal_driver"]
path = misc/gpu/external/stm32c0xx_hal_driver
url = https://github.com/STMicroelectronics/stm32c0xx_hal_driver.git
[submodule "misc/gpu/external/cmsis_device_c0"]
path = misc/gpu/external/cmsis_device_c0
url = https://github.com/STMicroelectronics/cmsis_device_c0.git

View File

@ -1,6 +1,6 @@
# Coldcard Wallet # COLDCARD Hardware Wallet
Coldcard is a Cheap, Ultra-secure & Verifiable Hardware Wallet for Bitcoin. Coldcard is an Affordable, Ultra-secure & Verifiable Hardware Wallet for Bitcoin.
Get yours at [Coldcard.com](http://coldcard.com) Get yours at [Coldcard.com](http://coldcard.com)
[Follow @COLDCARDwallet on Twitter](https://twitter.com/coldcardwallet) to keep up [Follow @COLDCARDwallet on Twitter](https://twitter.com/coldcardwallet) to keep up
@ -8,7 +8,13 @@ with the latest updates and security alerts.
![coldcard logo](https://coldcard.com/static/images/coldcard-logo-nav.png) ![coldcard logo](https://coldcard.com/static/images/coldcard-logo-nav.png)
![Mk4 coldcard picture front](https://coldcard.com/static/images/mk4.png) ![Mk5 coldcard picture front](https://coldcard.com/static/images/mk5-front.png)
## Quick Links
- [Latest firmware changes and updates](releases/ChangeLog.md)
- [PGP signature file](releases/signatures.txt)
- [Firmware binaries](https://coldcard.com/downloads)
## Reproducible Builds ## Reproducible Builds
@ -18,23 +24,45 @@ has been automated using Docker. Steps are as follows:
1. Install [Docker](https://www.docker.com) and start it. 1. Install [Docker](https://www.docker.com) and start it.
2. Install [make (GNUMake)](https://www.gnu.org/software/make/) if you don't already have it. 2. Install [make (GNUMake)](https://www.gnu.org/software/make/) if you don't already have it.
3. Checkout the code, and start the process. 3. Checkout a specific version of the code, and start the process.
```shell ```shell
git clone https://github.com/Coldcard/firmware.git git clone https://github.com/Coldcard/firmware.git
cd firmware/stm32 cd firmware
make repro # DOWNLOAD https://coldcard.com/downloads
# get a copy of binary into ./releases/2026-03-05T2052-v5.5.0-mk-coldcard.dfu
git checkout 2026-03-05T2052-v5.5.0
cd stm32
make -f MK4-Makefile repro
``` ```
4. At the end of the process a clear confirmation message is shown, or the differences. 4. At the end of the process a clear confirmation message is shown, or the differences.
5. Build products can be found `firmware/stm32/built`. 5. Build products can be found `firmware/stm32/built`.
6. If you do not trust the results of `make repro` refer to `docs/notes-on-repro.md`
which breaks down the process.
7. Process for Q firmware is the same, but change `MK4-Makefile` in last step to `Q1-Makefile`
## Long-Lived Branches
We are now maintaining two branches: `master` and `edge`.
"Edge" will contain features that may not be ready for prime time,
such as Taproot or Miniscript. Our standards for releasing new Edge
versions are lower, so we can iterate faster and get these advancements
out to other developers.
Q and Mk series share the same code base. Individual files that are added,
or removed, can be see in differences between `shared/manifest_mk4.py`
and `shared/manifest_q1.py`. Common files are in `shared/manifest.py`.
Firmware built for Mk5, supports the Mk4 without any functional differences.
## Check-out and Setup ## Check-out and Setup
**NOTE** This is the `master` branch and covers the latest hardware (Mk4). **NOTE** This is the `master` branch and covers the latest hardware (Mk and Q).
See branch `v4-legacy` for firmware which supports only Mk3/Mk2 and earlier. See branch `v4-legacy` for firmware which supports only Mk3/Mk2 and earlier.
Do a checkout, recursively to get all the submodules: Do a checkout, recursively, to get all the submodules:
```shell ```shell
git clone --recursive https://github.com/Coldcard/firmware.git git clone --recursive https://github.com/Coldcard/firmware.git
@ -57,7 +85,7 @@ git submodule update --init --recursive
``` ```
Do not use a path with any spaces in it. The Makefiles do not handle Do not use a path with any spaces in it. The Makefiles do not handle
that well, and we're not planning to fix it. that well and we're not planning to fix it.
Keep in mind that python requirements may change between versions, Keep in mind that python requirements may change between versions,
so at the top level, do this command: so at the top level, do this command:
@ -158,7 +186,16 @@ git clone --recursive https://github.com/Coldcard/firmware.git
cd firmware cd firmware
# Apply address patch # Apply address patch
git apply unix/linux_addr.patch # if unix/linux_addr.patch exists use below command
# not needed in current revision
# git apply unix/linux_addr.patch
# * below is needed for ubuntu 24.04
pushd external/micropython
git apply ../../ubuntu24_mpy.patch
popd
# *
# Create Python virtual environment and activate it # Create Python virtual environment and activate it
python3 -m venv ENV # or virtualenv -p python3 ENV python3 -m venv ENV # or virtualenv -p python3 ENV
@ -198,8 +235,8 @@ Top-level dirs:
- shared code between desktop test version and real-deal - shared code between desktop test version and real-deal
- expected to be largely in python, and higher-level - expected to be largely in python, and higher-level
- new code found only on the Mk4 will be listed in `manifest_mk4.py` code exclusive - code exclusive to the Mk4 or Mk5 will be listed in `manifest_mk4.py`, and
to earlier hardware is in `manifest_mk3.py` to the Q will be listed in `manifest_q1.py`
`unix` `unix`
@ -229,13 +266,14 @@ Top-level dirs:
- however, you can inspect what code is on your coldcard and compare to this. - however, you can inspect what code is on your coldcard and compare to this.
`stm32/mk4-bootloader` `stm32/mk4-bootloader`
`stm32/q1-bootloader`
- 128k of factory-set code that you cannot change for Mk4 - 128k of factory-set code that you cannot change
- however, you can inspect what code is on your coldcard and compare to this. - however, you can inspect what code is on your coldcard and compare to this.
`hardware` `hardware`
- schematic and bill of materials for the Coldcard - schematic and bill of materials for the Coldcard, all versions.
`unix/work/...` `unix/work/...`
@ -248,3 +286,4 @@ Top-level dirs:
## Support ## Support
Found a bug? Email: support@coinkite.com Found a bug? Email: support@coinkite.com

View File

@ -11,7 +11,7 @@ from setuptools import setup
setup( setup(
name='signit', name='signit',
version='1.0', version='1.0',
py_modules=['signit'], py_modules=['signit', 'sigheader'],
install_requires=[ install_requires=[
'Click', 'Click',
], ],

View File

@ -1 +1 @@
../stm32/bootloader/sigheader.py ../stm32/sigheader.py

View File

@ -208,7 +208,9 @@ def readback(fname):
if v & MK_2_OK: d.append('Mk2') if v & MK_2_OK: d.append('Mk2')
if v & MK_3_OK: d.append('Mk3') if v & MK_3_OK: d.append('Mk3')
if v & MK_4_OK: d.append('Mk4') if v & MK_4_OK: d.append('Mk4')
if v & ~(MK_1_OK | MK_2_OK | MK_3_OK | MK_4_OK): if v & MK_5_OK: d.append('Mk5')
if v & MK_Q1_OK: d.append('Q1')
if v & ~(MK_1_OK | MK_2_OK | MK_3_OK | MK_4_OK | MK_5_OK | MK_Q1_OK):
d.append('?other?') d.append('?other?')
v = nv + '+'.join(d) v = nv + '+'.join(d)
elif fld == 'timestamp': elif fld == 'timestamp':
@ -244,7 +246,7 @@ def readback(fname):
@click.option('--pubkey-num', '-k', type=int, help='Which key # to use for signing', default=0) @click.option('--pubkey-num', '-k', type=int, help='Which key # to use for signing', default=0)
@click.option('--high_water', '-h', is_flag=True, help='Mark version as new highwater mark (no downgrades below this version)') @click.option('--high_water', '-h', is_flag=True, help='Mark version as new highwater mark (no downgrades below this version)')
@click.option('--verbose', '-v', default=False, is_flag=True, help='Show numbers related to signature') @click.option('--verbose', '-v', default=False, is_flag=True, help='Show numbers related to signature')
@click.option('--hw-compat', '-m', type=int, metavar='BITMASK', help="Set HW compat field (mk number)") @click.option('--hw-compat', '-m', type=str, metavar='mk', help="Set HW compat field (hw_label value)")
@click.option('--backdate', type=int, metavar='DAYS', @click.option('--backdate', type=int, metavar='DAYS',
help='Make downgrade attack test version', default=0) help='Make downgrade attack test version', default=0)
@click.option('--build_dir', '-b', default='l-port/build-COLDCARD') @click.option('--build_dir', '-b', default='l-port/build-COLDCARD')
@ -277,9 +279,12 @@ def doit(keydir, outfn=None, build_dir=None, high_water=False,
vectors = open(build_dir + '/firmware0.bin', 'rb').read() vectors = open(build_dir + '/firmware0.bin', 'rb').read()
body = open(build_dir + '/firmware1.bin', 'rb').read() body = open(build_dir + '/firmware1.bin', 'rb').read()
if hw_compat == 4: if hw_compat in { 'mk4', '4', 'mk5', '5', 'mk' }:
hw_compat = MK_4_OK # Mk4 and 5 can run the same firmware, once Mk5 support was added
elif hw_compat in {3, None}: hw_compat = MK_4_OK | MK_5_OK
elif hw_compat == 'q1':
hw_compat = MK_Q1_OK
elif hw_compat in { 'mk3', '3'}:
hw_compat = MK_2_OK | MK_3_OK hw_compat = MK_2_OK | MK_3_OK
else: else:
assert not "known" assert not "known"
@ -293,8 +298,12 @@ def doit(keydir, outfn=None, build_dir=None, high_water=False,
# bugfix: size must be non-page aligned, so extra bytes are erased past end # bugfix: size must be non-page aligned, so extra bytes are erased past end
if (body_len % 4096) == 0: if (body_len % 4096) == 0:
body_len += 512 body_len += 512
assert body_len % 512 == 0, body_len
assert body_len % 512 == 0, body_len else:
# bugfix: PSRAM-based products (Mk4, Q1) need to erase 4k blocks, so
# trouble happens if final binary isn't aligned to that size.
body_len = align_to(body_len, 4096)
assert body_len % 4096 == 0, body_len
# pad out # pad out
vectors = pad_to(vectors, FW_HEADER_OFFSET) vectors = pad_to(vectors, FW_HEADER_OFFSET)
@ -312,14 +321,15 @@ def doit(keydir, outfn=None, build_dir=None, high_water=False,
pubkey_num=pubkey_num, pubkey_num=pubkey_num,
timestamp=timestamp(backdate) ) timestamp=timestamp(backdate) )
assert FW_MIN_LENGTH <= hdr.firmware_length <= FW_MAX_LENGTH, hdr.firmware_length
if hw_compat & MK_4_OK: if hw_compat & MK_3_OK:
# new value for Mk4: limited only by final binary size, not SPI flash
USB_MAX_LEN = 1472 * 1024
else:
# actual file length limited by size of SPI flash area reserved to txn data/uploads # actual file length limited by size of SPI flash area reserved to txn data/uploads
assert FW_MIN_LENGTH <= hdr.firmware_length <= FW_MAX_LENGTH, hdr.firmware_length
USB_MAX_LEN = (786432-128) USB_MAX_LEN = (786432-128)
else:
# new value for Mk4 and later: limited only by final binary size, not SPI flash
assert FW_MIN_LENGTH <= hdr.firmware_length <= FW_MAX_LENGTH_MK4, hdr.firmware_length
USB_MAX_LEN = 1472 * 1024
assert hdr.firmware_length <= USB_MAX_LEN, \ assert hdr.firmware_length <= USB_MAX_LEN, \
"too big for our USB upgrades: %d = %d bytes too big" % ( "too big for our USB upgrades: %d = %d bytes too big" % (

View File

@ -3,14 +3,32 @@
These docs are meant for you hackers out there... but also for anyone who These docs are meant for you hackers out there... but also for anyone who
wants to understand why it's safe to put your moneys into Coldcard. wants to understand why it's safe to put your moneys into Coldcard.
- [`security-model.md`](security-model.md) The COLDCARD Mk4/Mk5/Q security model.
- [`pin-entry.md`](pin-entry.md) Huge and detailed discussion of PIN codes and the security element that holds the secrets. - [`pin-entry.md`](pin-entry.md) Huge and detailed discussion of PIN codes and the security element that holds the secrets.
- [`secure-elements.md`](secure-elements.md) How the dual secure elements work together.
- [`dev-access.md`](dev-access.md) How developers can modify Coldcard to extend it. - [`dev-access.md`](dev-access.md) How developers can modify Coldcard to extend it.
- [`memory-map.md`](memory-map.md) Memory map highlights - [`memory-map.md`](memory-map.md) Memory map highlights
- [`notes-on-repro.md`](notes-on-repro.md) Detailed breakdown of the reproducible build process.
- [`upgrade-recovery.md`](upgrade-recovery.md) Firmware upgrade and recovery process.
- [`backup-files.md`](backup-files.md) Some details of our encrypted backup files. - [`backup-files.md`](backup-files.md) Some details of our encrypted backup files.
- [`temporary-seeds.md`](temporary-seeds.md) Temporary (ephemeral) seeds and the Seed Vault.
- [`seed-xor.md`](seed-xor.md) More about _Seed XOR_ feature, including fully worked Seed XOR example, and useful XOR lookup chart.
- [`key-teleport.md`](key-teleport.md) Key Teleport: encrypted transfer of seeds and secrets between Q devices.
- [`spending-policy.md`](spending-policy.md) Spending policy: autonomous signing with configurable limits.
- [`microsd-2fa.md`](microsd-2fa.md) Using a MicroSD card as a second factor for login.
- [`web2fa.md`](web2fa.md) Web 2FA authentication.
- [`bip85-passwords.md`](bip85-passwords.md) Deriving deterministic passwords via BIP-85.
- [`msg-signing.md`](msg-signing.md) COLDCARD message signing.
- [`proof-of-reserves-bip-322.md`](proof-of-reserves-bip-322.md) BIP-322 generic signed message format and proof of reserves.
- [`generic-wallet-export.md`](generic-wallet-export.md) Generic JSON wallet export file format.
- [`bip-21-extensions.md`](bip-21-extensions.md) Coldcard's BIP-21 URI extensions, including multisig ownership address check.
- [`nfc-coldcard.md`](nfc-coldcard.md) NFC support on Coldcard Mk4 and Q.
- [`nfc-pushtx.md`](nfc-pushtx.md) NFC Push Transaction: broadcast a signed transaction via your phone.
- [`usb-batteries.md`](usb-batteries.md) Using USB battery packs with Coldcard.
- [`electrum-usage.md`](electrum-usage.md) Importing seed words into Electrum for funds usage (and other tips). - [`electrum-usage.md`](electrum-usage.md) Importing seed words into Electrum for funds usage (and other tips).
- [`bitcoin-core-usage.md`](bitcoin-core-usage.md) How to use with Bitcoin Core. - [`bitcoin-core-usage.md`](bitcoin-core-usage.md) How to use with Bitcoin Core.
- [`bitcoin-core2of2desc.md`](bitcoin-core2of2desc.md) Airgapped 2-of-2 multisig with Bitcoin Core using descriptors.
- [`limitations.md`](limitations.md) Documented limitations, policy choices, and TODO items. - [`limitations.md`](limitations.md) Documented limitations, policy choices, and TODO items.
- [`paperwallet.pdf`](paperwallet.pdf) Example paper wallet template file. - [`paperwallet.pdf`](paperwallet.pdf) Example paper wallet template file.
- [`seed-xor.md`](seed-xor.md) More about _Seed XOR_ feature, including fully worked Seed XOR example, and useful XOR lookup chart.
- [`menu-tree.txt`](menu-tree.txt) Dump of the menu system. Incomplete, may be out of date. - [`menu-tree.txt`](menu-tree.txt) Dump of the menu system. Incomplete, may be out of date.

View File

@ -38,6 +38,17 @@ a single file, which is a simple text file and
easy to read. Before version 4.0.0, this text file was always easy to read. Before version 4.0.0, this text file was always
called `ckcc-backup.txt`, but the filename is now picked randomly. called `ckcc-backup.txt`, but the filename is now picked randomly.
## BIP39 Passphrase
If BIP39 passphrase is active the default behavior is to back-up
main wallet - not BIP39 passphrase wallet. From version `5.2.0`
users can choose to back-up also BIP39 passphrase wallet.
## Ephemeral Seeds
If ephemeral seed is active the default behavior is to always
back-up ephemeral wallet instead of the main wallet.
## Limitations ## Limitations
- The archive file names are not encrypted. You can see there is a single - The archive file names are not encrypted. You can see there is a single

15
docs/bip-21-extensions.md Normal file
View File

@ -0,0 +1,15 @@
## Multisig Ownership address check: "wallet"
If the name of the multisig wallet related to an address is provided, address search
can be greatly accelerated. Just provide `wallet=name` parameter in a standard
[BIP-21](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki) URL
shown in QR code or NFC record. If omitted, search will continue across
all multisig wallets known by COLDCARD.
### Examples
```
tb1q4d67p7stxml3kdudrgkg5mgaxsrgzcqzjrrj4gg62nxtvnsnvqjsxjkej0?wallet=goldmine
bitcoin:mtHSVByP9EYZmB26jASDdPVm19gvpecb5R?label=coldcard_purchase&amount=50&wallet=Haystack%20Four
```

View File

@ -1,19 +1,17 @@
# BIP-85 Passwords # BIP-85 Passwords
This feature derives a deterministic password according from your seed, This feature derives a deterministic password from your seed,
according to [BIP-85](https://github.com/bitcoin/bips/blob/master/bip-0085.mediawiki) according to [BIP-85 PWD BASE64](https://github.com/bitcoin/bips/blob/master/bip-0085.mediawiki#pwd-base64).
(with the recent changes
[proposed here](https://github.com/scgbckbone/bips/blob/passwords/bip-0085.mediawiki)).
Generated passwords can be sent as keystrokes via USB to the host computer, Generated passwords can be sent as keystrokes via USB to the host computer,
effectively using Coldcard as specialized password manager. effectively using Coldcard as specialized password manager.
In addition to deriving up to 10,000 distinct secure passwords, the Coldcard Mk4 In addition to deriving up to 10,000 distinct secure passwords, the Coldcard
can also type them into a computer by emulating a USB keyboard, and simulating the can also type them into a computer by emulating a USB keyboard, and simulating the
keystrokes needed to type the password. keystrokes needed to type the password.
#### Requirements #### Requirements
* Coldcard Mk4 with version 5.0.5 or newer * Coldcard Mk4 or Mk5 (firmware 5.0.5 or newer), or any Q
* USB-C with data link (won't work with power only cable from Coinkite) * USB-C with data link (won't work with power only cable from Coinkite)
## Type Passwords over USB ## Type Passwords over USB
@ -34,11 +32,13 @@ to exit. Exiting from "Type Passwords" will cause Coldcard to turn off keyboard
1. Go to Advanced/Tools -> Derive Seed B85 -> Passwords 1. Go to Advanced/Tools -> Derive Seed B85 -> Passwords
2. Choose "Password/Index number" (BIP-85 index) and press OK to generate password. 2. Choose "Password/Index number" (BIP-85 index) and press OK to generate password.
3. Screen shows generated password, path, and entropy from which password was derived 3. Screen shows generated password, path, and entropy from which password was derived
4. A few different options are available at this point: 4. A few different options are available at this point (on Mk; on Q the NFC and
1. press 1 to save password backup file on MicroSD card (cleartext!) QR buttons are used instead of (3)/(4)):
2. press 2 to send keystrokes (this will first of all enable keyboard emulation, then send keystrokes + enter, and finally disables keyboard emulation) 1. press (1) to save password backup file on MicroSD card (cleartext!)
3. press 3 to view password as QR code 2. press (2) to save to Virtual Disk (only when available)
4. press 4 to send over NFC (only appears when NFC is enabled) 3. press (3) to send over NFC (only appears when NFC is enabled)
4. press (4) to view password as QR code
5. press (6) to send keystrokes over USB (this enables keyboard emulation, sends keystrokes + enter, then disables keyboard emulation)
## Keyboard language settings ## Keyboard language settings

View File

@ -29,6 +29,7 @@ Step 2: Export descriptor from Coldcard to Core
- in Bitcoin Core, go to Windows -> Console - in Bitcoin Core, go to Windows -> Console
- select your newly created descriptor wallet in the wallet pulldown (top left) - select your newly created descriptor wallet in the wallet pulldown (top left)
- paste the `importdescriptor` command. It should respond with a success message - paste the `importdescriptor` command. It should respond with a success message
- in Bitcoin Core v24.1, the console response will include `"message": "Ranged descriptors should not have a label"` and Bitcoin Core won't allow address generation. Removing the entry `"label": "Coldcard x0x0x0x0"` from the .txt file fixes this issue.
NOTE: If you are importing an existing wallet this way, with UTXO on the blockchain, NOTE: If you are importing an existing wallet this way, with UTXO on the blockchain,
you may need to rescan and/or delete "timestamp=now" from the command. If the you may need to rescan and/or delete "timestamp=now" from the command. If the

View File

@ -1,39 +0,0 @@
# Ephemeral Seeds
Ephemeral seed is temporary secret stored only in Coldcard volatile
memory (RAM). It only survives single boot, meaning after Coldcard
restart it is gone. Ephemeral seeds *completely* defeats the design
of Coldcard's security model, based on secure elements.
Make sure you know what you're doing!
## Usage
- go to `Advanced/Tools -> Ephemeral Seed`
- if ephemeral seed is already in use, the menu option `CLEAR [<xfp>]` is visible
with fingerprint of ephemeral master secret
- an ephemeral seed can be Imported or Generated at random
- `Generate`:
- `Advanced/Tools -> Ephemeral Seed -> Generate`
- same options as generating new seeds, dice rolls included
- `Import`:
- `Advanced/Tools -> Ephemeral Seed -> Import`
- same options as importing seeds
- an ephemeral seed can also be a BIP-85 derived value
## Trick PIN Notes
If you intend to use the ephemeral seed feature frequently, you can
define a "Trick PIN" which takes you to a "look blank" trick wallet
(ie. no seed set appears to be set). Then you may then safely
unlock your Coldcard, without revealing the true PIN, and perform
all your ephemeral seed work in that state.
## Purpose
This feature is intended for those one-off signings, like recovering
a lost seed from some other system or importing some seed as an
balance check. We do not recommend handing unencrypted seed material
on a regular basis!

View File

@ -5,9 +5,12 @@ wallet systems, but we also have a file format for general purpose
exports, which we hope future wallet makers will leverage. exports, which we hope future wallet makers will leverage.
It contains master XPUB, XFP for that, and derived values for the top hardened It contains master XPUB, XFP for that, and derived values for the top hardened
position of BIP44, BIP84 and BIP49. position of the single-signature schemes BIP44, BIP49 and BIP84, plus the
multisig schemes BIP48 (`bip48_1` = `.../1h` P2SH-P2WSH and `bip48_2` = `.../2h` P2WSH).
When the account number is zero, a BIP45 (`m/45h`) multisig section is also included
(it is omitted for non-zero accounts, as in the example below).
The feature can be found here: _Advanced > MicroSD > Export Wallet > Generic JSON_ The feature can be found here: _Advanced/Tools > Export Wallet > Generic JSON_
Please contact us (or better yet, make a pull request), if you need something Please contact us (or better yet, make a pull request), if you need something
more in this file. more in this file.
@ -18,32 +21,51 @@ Here is an example, produced by the Simulator for account number 123.
```javascript ```javascript
{ {
"chain": "XTN", "chain": "BTC",
"xfp": "0F056943", "xfp": "0F056943",
"xpub": "tpubD6NzVbkrYhZ4XzL5Dhayo67Gorv1YMS7j8pRUvVMd5odC2LBPLAygka9p7748JtSq82FNGPppFEz5xxZUdasBRCqJqXvUHq6xpnsMcYJzeh",
"account": 123, "account": 123,
"xpub": "xpub661MyMwAqRbcGC9DmWbtbAmuUjpMYxw4BWE88NSDHB3jSjfUK7KtYJuKa52GbowD3DVLkgsxH9QwPnTx5mjdHykYFEncnmAsNsCTbWzBhA7",
"bip44": { "bip44": {
"deriv": "m/44'/1'/123'",
"first": "n44vs1Rv7T8SANrg2PFGQhzVkhr5Q6jMMD",
"name": "p2pkh", "name": "p2pkh",
"xfp": "B7908B26", "xfp": "5F898064",
"xpub": "tpubDCiHGUNYdRRGoSH22j8YnruUKgguCK1CC2NFQUf9PApeZh8ewAJJWGMUrhggDNK73iCTanWXv1RN5FYemUH8UrVUBjqDb8WF2VoKmDh9UTo" "deriv": "m/44h/0h/123h",
"xpub": "xpub6DStQXfAgHuLbMpCf86ruVkF4yT9pSLyWsFiqQTWY9osuinq8Dyee4W5jCjMfyku5LNkRB9oFinrY5ufn9XXEn8Vvzc2jnifKMaQCNV7RBZ",
"desc": "pkh([0f056943/44h/0h/123h]xpub6DStQXfAgHuLbMpCf86ruVkF4yT9pSLyWsFiqQTWY9osuinq8Dyee4W5jCjMfyku5LNkRB9oFinrY5ufn9XXEn8Vvzc2jnifKMaQCNV7RBZ/<0;1>/*)#4tl8jryn",
"first": "1GTNtzG5xX2UhdD5e3Nu7i1WPxFdjxQMJt"
}, },
"bip49": { "bip49": {
"_pub": "upub5DMRSsh6mNak9KbcVjJ7xAgHJvbE3Nx22CBTier5C35kv8j7g2q58ywxskBe6JCcAE2VH86CE2aL4MifJyKbRw8Gj9ay7SWvUBkp2DJ7y52", "name": "p2sh-p2wpkh",
"deriv": "m/49'/1'/123'", "xfp": "A748B1FC",
"first": "2N87V39riUUCd4vmXfDjMWAu9gUCiBji5jB", "deriv": "m/49h/0h/123h",
"name": "p2wpkh-p2sh", "xpub": "xpub6DDm8WzH5a9qjKkttzqSB3uGofNohU9D3n3UG8WMxkUZzJEMPTYiQRf1dvTFCQR82MjGW4LUMVuTtnW4hF17RpzCqVwhf6Z2fnJPWtjG164",
"xfp": "CEE1D809", "desc": "sh(wpkh([0f056943/49h/0h/123h]xpub6DDm8WzH5a9qjKkttzqSB3uGofNohU9D3n3UG8WMxkUZzJEMPTYiQRf1dvTFCQR82MjGW4LUMVuTtnW4hF17RpzCqVwhf6Z2fnJPWtjG164/<0;1>/*))#5j7t2n2u",
"xpub": "tpubDCDqt7XXvhAdy1MpSze5nMJA9x8DrdRaKALRRPasfxyHpiqWWEAr9cbDBQ9BcX7cB3up98Pk97U2QQ3xrvQsi5dNPmRYYhdcsKY9wwEY87T" "_pub": "ypub6Y42SBfCEFhKacx1jMd4P8zmydXFe68hxtZh3XQFLkrT3Q3ae7iH2VK9f8QqCK53Rzr5FXw2pAG1n57dQwR8E4fohqe8F1NWwWN2uVRfBry",
"first": "3CeBRbJKCpg7BpJME2vM8ZxhCjBnhG4toy"
}, },
"bip84": { "bip84": {
"_pub": "vpub5Y5a91QvDT45EnXQaKeuvJupVvX8f9BiywDcadSTtaeJ1VgJPPXMitnYsqd9k7GnEqh44FKJ5McJfu6KrihFXhAmvSWgm7BAVVK8Gupu4fL",
"deriv": "m/84'/1'/123'",
"first": "tb1qc58ys2dphtphg6yuugdf3d0kufmk0tye044g3l",
"name": "p2wpkh", "name": "p2wpkh",
"xfp": "78CF94E5", "xfp": "2C5207AA",
"xpub": "tpubDC7jGaaSE66VDB6VhEDFYQSCAyugXmfnMnrMVyHNzW9wryyTxvha7TmfAHd7GRXrr2TaAn2HXn9T8ep4gyNX1bzGiieqcTUNcu2poyntrET" "deriv": "m/84h/0h/123h",
"xpub": "xpub6CaWStGvcXqSW9BzU2vpCoP7aWjz9VfR5DS2nuYWVvKV2nug2dESg3HdFsaWHeoZaxuAhNcPB3TH2gq8MugS3JX1yGuhB4QbC2BneaYqB16",
"desc": "wpkh([0f056943/84h/0h/123h]xpub6CaWStGvcXqSW9BzU2vpCoP7aWjz9VfR5DS2nuYWVvKV2nug2dESg3HdFsaWHeoZaxuAhNcPB3TH2gq8MugS3JX1yGuhB4QbC2BneaYqB16/<0;1>/*)#yk84tprf",
"_pub": "zpub6rF34DckutvQCjaE8kW4cya7vT2t2jeQuSUUMhLHFw5F8zY8XwZZvAbuJHVgHU7QQF8nCKoW6NANoG4FoJWTdmtDhxJYLt3ZjUK5RqUSMdF",
"first": "bc1qhj6avwmp5lhpgqwm6dgxrf3v5lf67rjm99a8an"
},
"bip48_1": {
"name": "p2sh-p2wsh",
"xfp": "845A3542",
"deriv": "m/48h/0h/123h/1h",
"xpub": "xpub6EkcQSTygvxVnBP2X2fM6HY5D7wv46tWbBc54ADaypuCr47vQh1GPdPAZFdx81ou5Rp4vBnzeJT5MDWDZstzijxkHfrofXRycpt1ASfg1La",
"desc": "sh(wsh(sortedmulti(M,[0f056943/48h/0h/123h/1h]xpub6EkcQSTygvxVnBP2X2fM6HY5D7wv46tWbBc54ADaypuCr47vQh1GPdPAZFdx81ou5Rp4vBnzeJT5MDWDZstzijxkHfrofXRycpt1ASfg1La/0/*,...)))",
"_pub": "Ypub6kUxqLsLQa4M43jXJ3ux8SyP6t8dD5ZbpZmxkpP1jc7VXLW4RkZ76ouEPAZ1gMgiiXzrYFPfzBC8MfjYaoTxfTm1zUfdeqiTnHDX8raCfeg"
},
"bip48_2": {
"name": "p2wsh",
"xfp": "2A01C6B0",
"deriv": "m/48h/0h/123h/2h",
"xpub": "xpub6EkcQSTygvxVneXmk3ywiS2PFhBdiPxeMxYf6RFxHCHH36NxdcN7DjUpudCppAAxs58CG6DQLjtqZNmyC3MpgVob6wpdeATjpZZ1woX92EF",
"desc": "wsh(sortedmulti(M,[0f056943/48h/0h/123h/2h]xpub6EkcQSTygvxVneXmk3ywiS2PFhBdiPxeMxYf6RFxHCHH36NxdcN7DjUpudCppAAxs58CG6DQLjtqZNmyC3MpgVob6wpdeATjpZZ1woX92EF/0/*,...))",
"_pub": "Zpub75KE91YFZFbpup5PMS2AxgZCKRWnozdEWTEmaUKGQysSmUaKuL5WYyf2kk5UNQhhupRnddQe9GzST7crvfLoRTHTg6KtDPZiFjxBJobzcUz"
} }
} }
``` ```
@ -51,16 +73,23 @@ Here is an example, produced by the Simulator for account number 123.
## Notes ## Notes
1. The `first` address is formed by added `/0/0` onto the given derivation, and is assumed 1. The `first` address is formed by added `/0/0` onto the given derivation, and is assumed
to be the first (non-change) receive address for the wallet. to be the first (non-change) receive address for the wallet. It is only present on the
single-signature sections (`bip44`, `bip49`, `bip84`); multisig sections omit it.
1a. Each section includes a `desc` field: a ready-to-import Bitcoin output descriptor
(with `#checksum`). Single-sig descriptors use the `<0;1>/*` multipath form. Multisig
sections (`bip48_1`, `bip48_2`, and `bip45` when present) emit a `sortedmulti(...)`
template with `M` and a trailing `...` as placeholders, to be completed with your
threshold and the other co-signers' keys.
2. The user may specify any value (up to 9999) for the account number, and it's meant to 2. The user may specify any value (up to 9999) for the account number, and it's meant to
segregate funds into sub-wallets. Don't assume it's zero. segregate funds into sub-wallets. Don't assume it's zero.
3. When making your PSBT files to spend these amounts, remember that the XFP of the master 3. When making your PSBT files to spend these amounts, remember that the XFP of the master
(`0F056943` in this example) is is the root of the subkey paths found in the file, and (`0F056943` in this example) is the root of the subkey paths found in the file, and
you must include the full derivation path from master. So based on this example, you must include the full derivation path from master. So based on this example,
to spend a UTXO on `tb1qc58ys2dphtphg6yuugdf3d0kufmk0tye044g3l`, the input section to spend a UTXO on `bc1qhj6avwmp5lhpgqwm6dgxrf3v5lf67rjm99a8an`, the input section
of your PSBT would need to specify `(m=0F056943)/84'/1'/123'/0/0`. of your PSBT would need to specify `(m=0F056943)/84'/0'/123'/0/0`.
4. The `_pub` value is the [SLIP-132](https://github.com/satoshilabs/slips/blob/master/slip-0132.md) style "ypub/zpub/etc" which some systems might want. It implies 4. The `_pub` value is the [SLIP-132](https://github.com/satoshilabs/slips/blob/master/slip-0132.md) style "ypub/zpub/etc" which some systems might want. It implies
a specific address format. a specific address format.

224
docs/key-teleport.md Normal file
View File

@ -0,0 +1,224 @@
# Key Teleport
Purpose: Send a small quantity of very secret data between two COLDCARD Q systems, with
no risk of anything in the middle learning the secret.
Method: ECDH and AES-256-CTR plus an extra wrapping layer, transmitted over a mixture of
NFC, passive websites, and QR/BBQr codes.
# Protocol Overview
## Steps
- Receiver picks an EC keypair, stores it in settings, and publishes the pubkey via a QR/NFC
- The pubkey is encrypted by a short 8-digit numeric code, which should be
sent by a different channel.
- Sender gets QR and numeric code, picks own keypair, and does ECDH to arrive at a
shared session key
- Sender picks a human-readable secret which is independent of anything else (P key)
- The secret data (perhaps a seed phrase, XPRV, secure note, full backup, etc) is
AES-256-CTR encrypted with P key, then encrypted + MAC added with session key
- Data packet is sent to receiver (via BBQr), who can reconstruct the session key via ECDH
- Prompt user for the P key to finish decoding
- Decoded secret value is saved to Seed Vault or secure notes as appropriate
- Receiver destroys EC keypair used in transfer
### When used for PSBT Multisig
- No action required on receiver
- Sender uses the pubkey derived from pre-shared XPUB involved in the multisig wallet.
- Same steps, but drops immediately into signing process when decoded correctly
## Notes and Limitations
- max 4k (after encoding) of data is possible due to HTTP limitations
- all transfers are "data typed" and decode only on COLDCARD
- Q model is required due to the use of QR codes to ultimately get data into the COLDCARD
# Details
## Data Type Codes
The first byte encodes what the package contents (under all the encryption).
- `s` - 12/18/24 words/raw master/xprv - 17-72 bytes follow, encoded in an internal format
- `x` - XPRV mode, full details - 4 bytes (XPRV) + base58 *decoded* binary-XPRV follows
- `n` - one or many notes export (JSON array)
- `v` - seed vault export (JSON: one secret key but includes name, source of key)
- `p` - binary PSBT to be signed, perhaps multisig but not required.
- `b` - complete system backup file (text lines, internal format)
## QR details
BBQr is always used for the QR's involved in this process, even if
they are short enough for a normal QR code. Because the BBQr is
being generated by the COLDCARD embedded firmware, it will not be
compressed and will always be Base32 encoded.
New type codes for BBQr are defined for the purposes of this application:
- `R` contains `(pubkey)` ... begins the process from receiver; compressed pubkey is 33 bytes
- `S` contains `(pubkey)(data)` ... data from sender; first 33 bytes are sender's pubkey
- `E` for Multisig PSBT: `(randint)(data)` ... randint (4 byte nonce) indicates which
derived subkey from pre-shared xpub associated with receiver
All the data is encrypted with the exception randint. Keep in mind
this is a nonce value picked uniquely for each transfer. The
receiver's pubkey is only weakly encrypted by the 8-digit numeric
password, but is also a nonce effectively.
### PSBT Key Selection
When sending PSBT data, a nonce is picked at random by the sender
in range: `0..(2^28)`
This nonce is called `randint`. The receiver's pubkey will be
.../20250317/(randint)
where `...` is the derivation used in the multisig wallet for the co-signer who will
receive the package. The sender's keypair has the same sub key path assuming all
co-signers have same derivation path from root (not required).
Because both the sender and receiver already have each other's XPUB they can derive
the appropriate pubkeys (and privkey for their side) without communicating
more than `randint`. The sending COLDCARD will pick a new random value each time.
When receiving a multisig PSBT encrypted this way, the receiver does not need
to do any setup (nor numeric password) and can receive a QR code at any time.
This works because the shared multisig wallet is already setup. Receiver will
take the nonce value (randint) and seach all pre-defined multisig wallets for
any pubkey that can decrypt the package successfully (based on checksum inside
first layer of ECDH encryption).
The next layer of encryption (paranoid password) is unchanged.
## Encryption Details
AES-256-CTR is used exclusively. Session key is picked via ECDH with final
key value being the SHA256 over 64 bytes of coordinate X (concat) Y.
While ECDH is enough to assure privacy from men in the middle, we
add an additional layer of encryption. We call this the "paranoid key" internally
and in the UX it is called "Teleport Password".
The user sees a random 8-character password, generated as a random 40-bit value, but
shown in Base32 (8 chars) for the human to enter. We apply PBKDF2-SHA512 with
an iteration count of 5000 to stretch that to 512 bits, of which we use half.
The session key is used as the key for the KDF, and the entered value as salt.
- ECDH arrives at session key
- decrypt (AES-256-CTR) the binary body of message
- verify checksum:
- final 2 bytes should be `== SHA256(decrypted body[0:-2])[-2:]`
- if not, corruption, truncation, or wrong keys
- if that decryption is correct, then prompt user for the paranoid key (8 chars)
- stretch that value using session key and 5000 iterations of PBKDF2-SHA512
- use upper 256 bits and run AES-256-CTR again
- same checksum of 2 bytes of SHA256 are found inside after decryption
Encryption adds 4 bytes of overhead because of these MAC values,
but should catch truncation and bitrot. There are no other
protections against truncation as length data is not transmitted.
# Receiver Password
When the teleport process is started, the receiver shares his pubkey
as QR. However, we also show an 8-digit numeric password. The
purpose of this is force the receiver to share this separately from
the pubkey QR on another channel. The code is randomly picked, but
only represents about 26 bits of entropy and is stretched with
a single round of SHA256 before being used as a AES-256-CTR key
to decrypt the pubkey. No checksum verifies correct
decryption, so any code is accepted, and will with near-50% odds,
decrypt to a valid pubkey.
When the sender is given the receiver's pubkey via QR code, it
prompts for the numeric code and uses it to decrypt the pubkey.
Thus a MiTM who injects their pubkey will be detected and blocked.
The "paranoid key" serves the same role in the other direction but
it is Base32 character set, so it will not look similar or be
confusing as to its purpose.
# Web Component
In order to "teleport" the contents of a QR code over NFC, we will
publish a static website directly from an open Github repository.
The single-page website contains javascript code which looks at the
"hash" part of the incoming URL (`window.location.hash`) and if it
meets the requirements, renders a large QR. The QR data must look like
a correctly-encoded BBQr with one of the 3 type-codes above (`R` `S` or `E`).
Otherwise the website could render any QR, which we don't want to
support.
The page will offer "copy to clipboard" features for the data inside
the QR as a URL (ie. same URL as shown) and as an image and of course,
the COLDCARD Q can scan from the web browser screen itself.
When the BBQr data is larger than comfortable for a single QR, the
website can split into a multi-frame BBQr. The website can
do this without understanding the contents of the BBQr data (all
of which is encrypted). Download options will be provided for
single-frame QR, animated PNG, and "stacked BBQr" (a single tall
PNG with each QR frame stacked).
On the COLDCARD side, when NFC is tapped, it will offer a long URL
to this site with the data to be transferred "after the hash". This
is optional since the QR can be shown on the Q itself, and would
pass the same data.
Since the website is running on Github, Coinkite does not have
access to IP addresses or other access log details. Because the data for
teleport is "after the hash" it is never sent to Github's servers
but remains in the browser only. All JS resources referenced by the
webpage will have content hashes applied to prevent interference,
and the site will be served over SSL.
Visit [keyteleport.com](https://keyteleport.com/), or an
[example small QR](https://keyteleport.com/#B$2R0100VHT2AGUUH7KUZUUSTOWOIWHJX3XM7GA2N4BHQOXDFHXLVHVA7K6ZO)
and [view source code](https://github.com/coinkite/keyteleport.com).
# UX Details
- When the receive process is started by the user, a pubkey is picked
and stored, so that they can come back later (after a power cycle)
and make use of the data encoded by the sender. However once a package
is decoded successfully, that key is deleted.
- Sender must start by scanning the QR from a receiver. Then can pick what
to send, from secure notes to seeds and so on.
- For PSBT multisig, user must pick a single co-signer (who hasn't already
signed) and the QR is prepared for that receiver. Because we
cannot do arbitary combining, it's best if the next signer continues
to teleport the updated PSBT to further signers. In other words,
a daisy-chain pattern is prefered to a star pattern. The signer
who completes the Mth (of N) signature will be able to finalize
the transaction, and ideally with PushTx feature, broadcast it.
# Security Comments
## Such short passwords?
We are using 8-character passwords because we want them to be
practical to share over non-digital channels such as a voice phone
call, or hand-written note.
It is very important to remind users that the passwords should be sent
by a different channel from the QR itself. Best is to call up your
other party and say the letters to them directly.
## Is it safe to save image of QR to cloud?
Yes, this seems safe. Of course, if you can control it, perhaps not
a risk to accept... but the QR is encrypted via ECDH using a key
that is forgotten after the transfer, so forward privacy is protected.
Also your cloud service (or photo roll, chat app log, etc) will not
have the 8-character password which is also required unpack the secrets.
The QR codes themselves are fully random and do not reveal the
identity of your COLDCARD, your on chain funds or anything linked
to you.

View File

@ -1,12 +1,12 @@
# BIP39 Import # BIP-39 Import
- there must be 12, 18 or 24 words in your mnemonic - there must be 12, 18 or 24 words in your mnemonic
- we have only the English word list - we have only the English word list
- we support BIP39 passwords during import - we support BIP-39 passwords during import
# XPRV Import # XPRV Import
- we can import a BIP32 HD-wallet root private key in XPRV format - we can import a BIP-32 HD-wallet root private key in XPRV format
- it's assumed to be top-level, and we don't store the parent fingerprint or depth value - it's assumed to be top-level, and we don't store the parent fingerprint or depth value
- SLIP-132 format HD-wallet keys are also supported (xprv/yprv/zprv), but we strip - SLIP-132 format HD-wallet keys are also supported (xprv/yprv/zprv), but we strip
the implied address format the implied address format
@ -14,11 +14,12 @@
# PIN Codes # PIN Codes
- 2-2 through 6-6 in size, numeric digits only - 2-2 through 6-6 in size, numeric digits only
- pin code 999999-999999 is reserved (means 'clear pin') - pin code 999999-999999 was reserved (meaning 'clear pin'), but now available again
# Backup Files # Backup Files
- we don't know what day it is, so meta data on files will not have correct date/time - we don't know what day it is, so meta data on files will not have correct date/time
- release date of the firmware version that made the file is used instead of true date
- encrypted files produced cannot be changed, and we don't support other tools making them - encrypted files produced cannot be changed, and we don't support other tools making them
# Micro SD # Micro SD
@ -32,7 +33,7 @@
- with Electrum, we support classic payment addresses (p2pkh), Bech32 Segwit and P2SH/Segwit - with Electrum, we support classic payment addresses (p2pkh), Bech32 Segwit and P2SH/Segwit
- however, each wallet must be of a single address type; cannot be mixed (their limitation) - however, each wallet must be of a single address type; cannot be mixed (their limitation)
- the same Coldcard could be used in each of the three modes (we don't care about address format) - the same Coldcard could be used in each of the three modes (we don't care about address format)
- with Bitcoin Core (version 0.17?), we can do PSBT transactions, which support all address types - with Bitcoin Core (version 0.17+), we can do PSBT transactions, which support all address types
- we don't support signing coinbase transactions, so don't mine directly into a Coldcard wallet - we don't support signing coinbase transactions, so don't mine directly into a Coldcard wallet
# Max Transaction Size # Max Transaction Size
@ -41,40 +42,62 @@
- we support transactions up to 384k-bytes in size when serialized into PSBT format - we support transactions up to 384k-bytes in size when serialized into PSBT format
- we can handle transactions with up to 20 inputs to be signed at one time. - we can handle transactions with up to 20 inputs to be signed at one time.
- a maximum of 250 outputs per transaction is supported (will attempt more if memory allows) - a maximum of 250 outputs per transaction is supported (will attempt more if memory allows)
- mk4: - mk4/Q:
- we support PSBT files up to 2M bytes in size. - we support PSBT files up to 2M bytes in size.
- any number of inputs and outputs are supported, limited only by final transaction size (100k) - any number of inputs and outputs are supported, limited only by final transaction size (100k)
- tested with: 250 inputs, 2000 outputs - tested with: 250 inputs, 2000 outputs
- bitcoin limits transactions to 100k, but there could be large input transactions - bitcoin limits transactions to 100k, but there could be large input transactions
inside the PSBT. Reduce this by using segwit signatures and provide only the inside the PSBT. Reduce this by using segwit signatures and provide only the
individual UTXO ("out points"). individual UTXO ("out points").
- every transaction needs to have at least one output, or we reject it
# P2SH / Multisig # P2SH / Multisig
- only one signature will be added per input. However, if needed the partly-signed - only one signature will be added per input. However, if needed the partly-signed
PSBT can be given again, and the "next" leg will be signed. PSBT can be given again, and the "next" leg will be signed.
- we do not support PSBT combining or finalizing of transactions involving - finalizing of multisig transactions involving P2SH signatures:
P2SH signatures (so the combine step must be off-device) * SD/Vdisk signing exports both signed PSBT and finalized txn ready for broadcast (if txn is complete)
* QR/NFC outputs finalized txn ready for broadcast if txn is complete otherwise signed PSBT only
* USB signing requires `--finalize` parameter (as for standard single signature wallets)
- we can sign for P2SH and P2WSH addresses that represent multisig (M of N) but - we can sign for P2SH and P2WSH addresses that represent multisig (M of N) but
we cannot sign for non-standard scripts because we don't know how to present we cannot sign for non-standard scripts because we don't know how to present
that to the user for approval. that to the user for approval.
- during USB "show address" for multisig, we limit subkey paths to - during USB "show address" for multisig, we limit subkey paths to
16 levels deep (including master fingerprint) 16 levels deep (including master fingerprint)
- max of 15 co-signers due to 520 byte script limitation in consensus layer with classic P2SH - max of 15 co-signers due to 1650 byte `scriptSig` limitation in policy with classic P2SH (same limit applies to segwit even though consensus allows up to 20 co-signers).
note: the consensus layer sets an upper bound of 520 bytes for the length of each stack element
- (mk3) we have space for up to 8 M-of-3 wallets, or a single M-of-15 wallet. YMMV - (mk3) we have space for up to 8 M-of-3 wallets, or a single M-of-15 wallet. YMMV
- only a single multisig wallet can be involved in a PSBT; can't sign inputs from two different - only a single multisig wallet can be involved in a PSBT; can't sign inputs from two different
multisig wallets at the same time. multisig wallets at the same time.
- we always store xpubs in BIP32 format, although we can read SLIP132 format (Ypub/Zpub/etc) - we always store xpubs in BIP-32 format, although we can read SLIP132 format (Ypub/Zpub/etc)
- change outputs (indicated with paths, scripts in output section) must correspond to - change outputs (indicated with paths, scripts in output section) must correspond to
the active multisig wallet, and cannot be used to describe an unrelated (multisig) wallet. the active multisig wallet, and cannot be used to describe an unrelated (multisig) wallet.
- derivation path for each cosigner must be known and consistent with PSBT - derivation path for each cosigner must be known and consistent with PSBT
- fixed: XFP values (fingerprints) for each of the co-signers must be unique (limitation removed) - XFP values (fingerprints) MUST be unique for each of the co-signers
- multisig wallet `name` can only contain printable ASCII characters `range(32, 127)`
### BIP-67
- importing multisig from PSBT can ONLY create `sortedmulti(...)` multisig according to BIP-67, DO NOT use with `multi(...)`
- creating airgapped multisig using COLDCARD as coordinator always produces `sortedmulti(...)` multisig according to BIP-67
- COLDCARD import/export [format](https://coldcard.com/docs/multisig/#configuration-text-file-for-multisig) only supports `sortedmulti(...)` multisig according to BIP-67. To import multisig wallet with `multi(...)` use descriptor import [format](https://github.com/bitcoin/bips/blob/master/bip-0383.mediawiki)
- encrypted COLDCARD backups that contains multisig wallets with `multi(...)` MUST only be restored on firmware versions with `multi(...)` support
- all imported `multi(...)` must differ in keys (same as `sortedmulti(...)`). If `wsh(multi(2,A,B))` is already registered, `wsh(multi(2,B,A))` will be rejected upon import as duplicate, even thought they are actually different script/wallet.
- just BIP67 difference is also treated as duplicate. If `wsh(multi(2,A,B)` is registered, `wsh(sortedmulti(2,A,B))` will be rejected as duplicate and vice-versa.
# SIGHASH types # SIGHASH types
- only `SIGHASH_ALL` is supported at this time - all sighash flags are supported:
- in time, we will add support for others, especially to support Coinjoin usage - `ALL`
- `NONE`
- `SINGLE`
- `ALL|ANYONECANPAY`
- `NONE|ANYONECANPAY`
- `SINGLE|ANYONECANPAY`
- any value other than ALL will cause a warning to be shown to user
- by default, we reject `NONE` and `NONE|ANYONECANPAY` but there is a setting to allow
# U2F Protocol / Web Access to USB / WebUSB # U2F Protocol / Web Access to USB / WebUSB
@ -96,7 +119,7 @@
We will summarize transaction outputs as "change" back into same wallet, however: We will summarize transaction outputs as "change" back into same wallet, however:
- PSBT must specify BIP32 path in corresponding output section for us to treat as change - PSBT must specify BIP-32 path in corresponding output section for us to treat as change
- for p2sh-wrapped segwit outputs, redeem script must be provided when needed - for p2sh-wrapped segwit outputs, redeem script must be provided when needed
- any incorrect values here are assumed to be fraud attempts, and are highlighted to user - any incorrect values here are assumed to be fraud attempts, and are highlighted to user
- the _redeemScript_ for `p2wsh-p2sh` is optional, but if provided must be - the _redeemScript_ for `p2wsh-p2sh` is optional, but if provided must be
@ -117,21 +140,25 @@ We will summarize transaction outputs as "change" back into same wallet, however
- key derivatation paths must be 12 or less in depth (`MAX_PATH_DEPTH`) - key derivatation paths must be 12 or less in depth (`MAX_PATH_DEPTH`)
# Pay-to-Pubkey
# NFC Feature (Mk4) - although we have some code for "pay to pubkey" (P2PK not P2PKH), it is untested
and unused since this style of payment address is obsolete and largely unused today
# NFC Feature
- can share up to 8000 bytes of PSBT or signed transaction data. - can share up to 8000 bytes of PSBT or signed transaction data.
- NFC-V (ISO-15693) radio/modulation is common on mobile phones but very rare on desktops - NFC-V (ISO-15693) radio/modulation is common on mobile phones but very rare on desktops
# Fast Wipe (Mk4) # Fast Wipe
- each use of "fast wipe" feature consumes a MCU key slot, of which there are 256. - each use of "fast wipe" feature consumes a MCU key slot, of which there are 256.
- use _Advanced > Danger Zone > MCU Key Slots_ to view usage - use _Advanced > Danger Zone > MCU Key Slots_ to view usage
# Trick Pins (Mk4) # Trick Pins
- "deltamode" PIN must be same length as true pin, and differ only in final 4 positions. - "deltamode" PIN must be same length as true pin, and differ only in final 4 positions.
- there are 14 trick "slots", but we avoid slot 10, so 13 available. - there are 14 trick "slots", but on mk4, we avoid slot 10, so 13 available. (Q: 14)
- duress wallets consume 2 slots (or 3 slots for legacy duress wallet) which must be contiguous - duress wallets consume 2 slots (or 3 slots for legacy duress wallet) which must be contiguous
- when restoring trick pins from backup files, "forgotten" pins are not restored, - when restoring trick pins from backup files, "forgotten" pins are not restored,
and any trick pin which matches the true PIN of the restored system will be dropped and any trick pin which matches the true PIN of the restored system will be dropped
@ -139,9 +166,58 @@ We will summarize transaction outputs as "change" back into same wallet, however
is not compatible, the deltamode trick PIN is dropped and not restored is not compatible, the deltamode trick PIN is dropped and not restored
- duress wallets are supported when derived from 24- or 12-word seed phrases - duress wallets are supported when derived from 24- or 12-word seed phrases
# Debug Serial Port (Mk4) # Debug Serial Port
- virtual USB serial port disabled completely by default, and even if enabled - virtual USB serial port disabled completely by default, and even if enabled
in Danger Zone, only echos output, and does not accept any input in Danger Zone, only echos output, and does not accept any input
- use hardware serial port for interactive REPL access (3.3v TTL levels) - use hardware serial port for interactive REPL access (3.3v TTL levels)
# BBQr Scanning (Q)
- files up to 2MiB in size can be accepted
- when 14 or less parts, we display status of each part, if more, just percent complete
# QR Scanning (Q)
- if not BBQr (or sent as unicode inside BBQr) we auto detect these data types:
- PSBT in Base64 or hex
- Wire Transaction in Base64 or hex
- XPRV, XPUB, bare payment addresses, BIP-21 invoices
- seed words (truncated, or full)
- SeedQR (but not Compact SeedQR)
- for Base58, Bech32 encoded values, if checksum is wrong then it is shown as text
- binary QR codes are not supported
- when pasting into a secure note, if the QR's data is > 60 chars long, we assume done
# Secure Notes & Passwords (Q)
- when Q picks a password for you (using F1 thru F5), the entropy is 126 bits or more,
except F3 which makes an easier to type password of around 48 bits entropy.
- Title, Sitename and Username fields are limited to 32 characters in length.
- Passwords are limited to 128 characters.
- Note text is unlimited, but storing very large notes may affect performance system-wide.
- Q Backup files restored onto Mk4 will lose their notes, since notes feature is not supported.
# Address Ownership
- only the first 1528 addresses (764 each from internal and external (change/not) paths)
are considered
- if you have used an sub-account, without ever exploring it in the Address Explorer, nor
signing a PSBT with those account numbers, we do not search it.
- does not search Seed Vault, you'll need to load each of those and re-search
- if you have an XFP collision between multiple wallets in SeedVault (ie. two wallets
with same descriptors, but different seeds) you will get false negatives
# Spending Policy
- (Cosign mode) only 12 or 24 word seeds (not XPRV) are accepted for "key C"
- velocity limit:
- based on a max magnitude per txn, and a required minimum block height
gap, based on previous `nLockTime` value in last-signed PSBT.
- if you sign a transaction, but never broadcast it, you will still have to wait out
the velocity policy.
- PSBT creator must put in `nLockTime` block heights (most already do to avoid fee sniping)
- maximum of 25 whitelisted addresses can be stored
- Web2FA: any number of mobile devices can be enrolled, but all will have the same shared secret
- any warning from the PSBT, such as huge fees, will cause the transaction to be rejected

View File

@ -38,7 +38,7 @@ directly from python programs.
| Start | Size | Notes | Start | Size | Notes
|---------------|-----------|-------------------------- |---------------|-----------|--------------------------
| 0x0800 0000 | 128k | Bootloader code, including reset vector. See `stm32/mk4-bootloader` | 0x0800 0000 | 112k | Bootloader code, including reset vector. See `stm32/mk4-bootloader`
| 0x0801 c000 | 8k | Sensitive "pairing secrets" for SE1 and SE2 | 0x0801 c000 | 8k | Sensitive "pairing secrets" for SE1 and SE2
| 0x0801 e000 | 8k | MCU keys, consumable; 256 32-bit write-once slots. | 0x0801 e000 | 8k | MCU keys, consumable; 256 32-bit write-once slots.
| 0x0802 0000 | 16k | Interrupt handlers, file header (Micropython and Coldcard code) | 0x0802 0000 | 16k | Interrupt handlers, file header (Micropython and Coldcard code)

View File

@ -2,11 +2,6 @@
Choose PIN Code Choose PIN Code
Advanced/Tools Advanced/Tools
View Identity View Identity
Upgrade Firmware
Show Version
From MicroSD
From VirtDisk [IF VIRTDISK ENABLED]
Bless Firmware
Paper Wallets Paper Wallets
Perform Selftest Perform Selftest
Secure Logout Secure Logout
@ -16,71 +11,95 @@
[IF BLANK WALLET] [IF BLANK WALLET]
New Seed Words New Seed Words
24 Word (default)
12 Word
24 Word Dice Roll
12 Word Dice Roll
Import Existing
24 Words
[SEED WORD MENUS]
18 Words
[SEED WORD MENUS]
12 Words 12 Words
[SEED WORD MENUS] 24 Words
Advanced
12 Word Dice Roll
24 Word Dice Roll
Import Existing
12 Words
[SEED WORD ENTRY]
18 Words
[SEED WORD ENTRY]
24 Words
[SEED WORD ENTRY]
Scan QR Code [IF QR SCANNER]
Restore Backup Restore Backup
Clone Coldcard Clone Coldcard
Import XPRV Import XPRV
Tapsigner Backup
Seed XOR Seed XOR
Migrate Coldcard
Key Teleport (start)
Help Help
Advanced/Tools Advanced/Tools
View Identity View Identity
Upgrade Firmware Temporary Seed
Generate Words
12 Words
24 Words
12 Word Dice Roll
24 Word Dice Roll
Import from QR Scan [IF QR SCANNER]
Import Words
12 Words
18 Words
24 Words
Import via NFC [IF NFC ENABLED]
Import XPRV
Tapsigner Backup
Coldcard Backup
Restore Seed XOR
Upgrade Firmware [IF NOT TMP SEED]
Show Version Show Version
From MicroSD From MicroSD
From VirtDisk [IF VIRTDISK ENABLED] From VirtDisk [IF VIRTDISK ENABLED]
Bless Firmware
File Management File Management
Verify Backup Verify Backup
List Files List Files
Verify Sig File
NFC File Share [IF NFC ENABLED] NFC File Share [IF NFC ENABLED]
BBQr File Share [IF QR SCANNER]
QR File Share [IF QR SCANNER]
Format SD Card Format SD Card
Format RAM Disk [IF VIRTDISK ENABLED] Format RAM Disk [IF VIRTDISK ENABLED]
Key Teleport (start)
Paper Wallets Paper Wallets
Perform Selftest Perform Selftest
I Am Developer. I Am Developer.
Serial REPL Serial REPL
Wipe LFS
Warm Reset Warm Reset
Restore Txt Bkup Restore Bkup
Reflash GPU [IF QWERTY KEYBOARD]
Secure Logout Secure Logout
Settings Settings
Login Settings Login Settings
Change Main PIN Change Main PIN
PIN Options
Trick PINs
Trick PINs:
↳22-22
Add New Trick
Add If Wrong
Delete All
Set Nickname Set Nickname
Scramble Keypad Scramble Keys
Kill Key Kill Key
Login Countdown Login Countdown
Disabled Disabled
5 minutes
15 minutes 15 minutes
30 minutes 30 minutes
4 hours
1 hour 1 hour
5 minutes 2 hours
4 hours
8 hours 8 hours
12 hours 12 hours
2 hours
3 days
48 hours
1 week
24 hours 24 hours
48 hours
3 days
1 week
28 days later 28 days later
MicroSD 2FA [IF SECRET AND NOT TMP SEED]
Add Card
Check Card
Remove Card #1
Calculator Login [IF QWERTY KEYBOARD]
Default Off
Calculator Login
Test Login Now Test Login Now
Hardware On/Off Hardware On/Off
USB Port USB Port
@ -93,13 +112,11 @@
NFC Sharing NFC Sharing
Default Off Default Off
Enable NFC Enable NFC
Multisig Wallets NFC Push Tx
(none setup yet) coldcard.com
Import from SD mempool.space
Export XPUB Custom URL...
Create Airgapped Disable
Trust PSBT?
Skip Checks?
Display Units Display Units
BTC BTC
mBTC mBTC
@ -118,17 +135,106 @@
4 hours 4 hours
8 hours 8 hours
Never Never
Idle Timeout (on battery) [IF BATTERIES]
30 seconds
60 seconds
2 minutes
5 minutes
10 minutes
15 minutes
30 minutes
1 hour
4 hours
Never
LCD Brightness (on battery) [IF BATTERIES]
25%
50%
60%
70%
80%
90%
95% (default)
100%
Delete PSBTs Delete PSBTs
Default Keep Default Keep
Delete PSBTs Delete PSBTs
Buried Settings
Home Menu XFP [IF SECRET AND NOT TMP SEED]
Only Tmp
Always Show
Menu Wrapping
Default
Always Wrap
[QR key shortcut] [IF QR SCANNER]
--- ---
[NORMAL OPERATION] [NORMAL OPERATION]
Ready To Sign Ready To Sign
Passphrase Passphrase [IF WORD BASED SEED]
Restore Saved
c*******
[3A14F788]
Restore
Delete
Edit Phrase
Scan Any QR Code [IF QR SCANNER]
Start HSM Mode [IF HSM POLICY] Start HSM Mode [IF HSM POLICY]
Address Explorer Address Explorer
Secure Logout Classic P2PKH
↳ mtHSVByP9EYZ⋯Vm19gvpecb5R
P2SH-Segwit
↳ 2NCAJ5wD4Gvm⋯NphNU8UYoEJv
Segwit P2WPKH
↳ tb1qupyd58nd⋯vu9jtdyws9n9
Applications
Samourai
Post-mix
Pre-mix
Wasabi
Account Number
Custom Path
CC-2-of-4
Secure Notes & Passwords [IF ENBALED] [MAYBE]
1: note0
"note0"
View Note
Edit
Delete
Export
Sign Note Text
2: secret-PWD
"secret-PWD"
↳ satoshi
↳ abc.org
View Password
Send Password [MAYBE]
Export
Edit Metadata
Delete
Change Password
Sign Note Text
New Note
New Password
Export All
Sort By Title
Import
Type Passwords [MAYBE]
Seed Vault [MAYBE]
1: [7126EB3C]
[7126EB3C]
Use This Seed
Rename
Delete
2: [CCEE13B9]
[CCEE13B9]
Use This Seed
Rename
Delete
3: [03EE9989]
[03EE9989]
Use This Seed
Rename
Delete
Advanced/Tools Advanced/Tools
Backup Backup
Backup System Backup System
@ -136,101 +242,229 @@
Restore Backup Restore Backup
Clone Coldcard Clone Coldcard
Export Wallet Export Wallet
Sparrow
Cove
Bitcoin Core Bitcoin Core
Nunchuk
Bull Bitcoin
Blue Wallet
Electrum Wallet Electrum Wallet
Wasabi Wallet Wasabi Wallet
Unchained Capital Fully Noded
Unchained
Theya
Bitcoin Safe
Zeus
Samourai Postmix
Samourai Premix
Descriptor
Generic JSON Generic JSON
Export XPUB Export XPUB
Segwit (BIP-84) Segwit (BIP-84)
Classic (BIP-44) Classic (BIP-44)
P2WPKH/P2SH (49) P2WPKH/P2SH (BIP-49)
Master XPUB Master XPUB
Current XFP Current XFP
Key Expression
Dump Summary Dump Summary
Upgrade Firmware Upgrade Firmware [IF NOT TMP SEED]
Show Version Show Version
From MicroSD From MicroSD
From VirtDisk [IF VIRTDISK ENABLED] From VirtDisk [IF VIRTDISK ENABLED]
Bless Firmware
File Management File Management
Verify Backup Verify Backup
Backup System Backup System
Export Wallet Export Wallet
Sparrow
Cove
Bitcoin Core Bitcoin Core
Nunchuk
Bull Bitcoin
Blue Wallet
Electrum Wallet Electrum Wallet
Wasabi Wallet Wasabi Wallet
Unchained Capital Fully Noded
Unchained
Theya
Bitcoin Safe
Zeus
Samourai Postmix
Samourai Premix
Descriptor
Generic JSON Generic JSON
Export XPUB Export XPUB
Segwit (BIP-84) Segwit (BIP-84)
Classic (BIP-44) Classic (BIP-44)
P2WPKH/P2SH (49) P2WPKH/P2SH (BIP-49)
Master XPUB Master XPUB
Current XFP Current XFP
Key Expression
Dump Summary Dump Summary
Sign Text File Sign Text File
Clone Coldcard Batch Sign PSBT
Teleport Multisig PSBT
List Files List Files
Verify Sig File
NFC File Share [IF NFC ENABLED] NFC File Share [IF NFC ENABLED]
BBQr File Share [IF QR SCANNER]
QR File Share [IF QR SCANNER]
Clone Coldcard
Format SD Card Format SD Card
Format RAM Disk [IF VIRTDISK ENABLED] Format RAM Disk [IF VIRTDISK ENABLED]
Derive Seed B85 Secure Notes & Passwords [IF QWERTY KEYBOARD]
1: note0
"note0"
View Note
Edit
Delete
Export
Sign Note Text
2: secret-PWD
"secret-PWD"
↳ satoshi
↳ abc.org
View Password
Send Password [MAYBE]
Export
Edit Metadata
Delete
Change Password
Sign Note Text
New Note
New Password
Export All
Sort By Title
Import
Derive Seeds (BIP-85)
View Identity View Identity
Temporary Seed
Generate Words
12 Words
24 Words
12 Word Dice Roll
24 Word Dice Roll
Import from QR Scan [IF QR SCANNER]
Import Words
12 Words
18 Words
24 Words
Import via NFC [IF NFC ENABLED]
Import XPRV
Tapsigner Backup
Coldcard Backup
Restore Seed XOR
Key Teleport (start)
Spending Policy [IF SECRET AND NOT TMP SEED]
Single-Signer [IF SECRET AND NOT TMP SEED]
Co-Sign Multisig (CCC) [IF NOT TMP SEED]
HSM Mode [IF HSM AND SECRET]
Default Off
Enable
User Management [MAYBE]
Paper Wallets Paper Wallets
User Management WIF Store
(no users yet) NFC Tools [IF NFC ENABLED]
Sign PSBT
Show Address
Sign Message
Verify Sig File
Verify Address
File Share
Import Multisig
Push Transaction [IF PUSHTX ENABLED]
Danger Zone Danger Zone
Debug Functions Debug Functions
Seed Functions Seed Functions
View Seed Words View Seed Words
Seed XOR Seed XOR
Split Existing Split Existing [IF WORD BASED SEED]
Restore Seed XOR Restore Seed XOR
Destroy Seed Destroy Seed [IF SECRET AND NOT TMP SEED]
Lock Down Seed Lock Down Seed [MAYBE]
Export SeedQR [IF WORD BASED SEED]
I Am Developer. I Am Developer.
Serial REPL Serial REPL
Wipe LFS
Warm Reset Warm Reset
Restore Txt Bkup Restore Bkup
BKPW Override
Reflash GPU [IF QWERTY KEYBOARD]
Seed Vault [IF SECRET AND NOT TMP SEED]
Default Off
Enable
Perform Selftest Perform Selftest
Set High-Water Set High-Water
Wipe HSM Policy [IF HSM POLICY] Wipe HSM Policy [IF HSM POLICY]
Clear OV cache Clear OV cache
Clear Address cache
Sighash Checks
Default: Block
Warn
Testnet Mode Testnet Mode
Bitcoin Bitcoin
Testnet3 Testnet4
Regtest
AE Start Index
Default Off
Enable
B85 Idx Values
Default Off
Unlimited
Settings Space Settings Space
MCU Key Slots MCU Key Slots
Bless Firmware
Wipe LFS
Nuke Device
Settings Settings
Login Settings Login Settings
Change Main PIN Change Main PIN
PIN Options Trick PINs [IF SECRET AND NOT TMP SEED]
Trick PINs
Trick PINs: Trick PINs:
↳22-22 ↳11-11
PIN 11-11
↳Bricks CC
Hide Trick
Delete Trick
Change PIN
↳333-3334
PIN 333-3334
↳Duress Wallet
Activate Wallet
Hide Trick
Delete Trick
Change PIN
↳WRONG PIN
After 3 wrong:
↳Wipes seed
↳Reboots
Hide Trick
Delete Trick
Add New Trick Add New Trick
Add If Wrong
Delete All Delete All
Set Nickname Set Nickname
Scramble Keypad Scramble Keys
Kill Key Kill Key
Login Countdown Login Countdown
Disabled Disabled
5 minutes
15 minutes 15 minutes
30 minutes 30 minutes
4 hours
1 hour 1 hour
5 minutes 2 hours
4 hours
8 hours 8 hours
12 hours 12 hours
2 hours
3 days
48 hours
1 week
24 hours 24 hours
48 hours
3 days
1 week
28 days later 28 days later
MicroSD 2FA [IF SECRET AND NOT TMP SEED]
Add Card
Check Card
Remove Card #1
Calculator Login [IF QWERTY KEYBOARD]
Default Off
Calculator Login
Test Login Now Test Login Now
Hardware On/Off Hardware On/Off
USB Port USB Port
@ -244,12 +478,30 @@
Default Off Default Off
Enable NFC Enable NFC
Multisig Wallets Multisig Wallets
(none setup yet) 2/4: CC-2-of-4
Import from SD "CC-2-of-4"
View Details
Delete
Coldcard Export
Electrum Wallet
Descriptors
View Descriptor
Export
Bitcoin Core
Import
Export XPUB Export XPUB
Create Airgapped Create Airgapped
Trust PSBT? Trust PSBT?
Skip Checks? Skip Checks?
Full Address View?
Partly Censor
Show Full
Unsorted Multisig?
NFC Push Tx
coldcard.com
mempool.space
Custom URL...
Disable
Display Units Display Units
BTC BTC
mBTC mBTC
@ -268,17 +520,205 @@
4 hours 4 hours
8 hours 8 hours
Never Never
Idle Timeout (on battery) [IF BATTERIES]
30 seconds
60 seconds
2 minutes
5 minutes
10 minutes
15 minutes
30 minutes
1 hour
4 hours
Never
LCD Brightness (on battery) [IF BATTERIES]
25%
50%
60%
70%
80%
90%
95% (default)
100%
Delete PSBTs Delete PSBTs
Default Keep Default Keep
Delete PSBTs Delete PSBTs
Keyboard EMU
Default Off
Enable
Buried Settings
Home Menu XFP [IF SECRET AND NOT TMP SEED]
Only Tmp
Always Show
Menu Wrapping
Default
Always Wrap
Secure Logout
[NFC key shortcut] [IF NFC ENABLED]
Sign PSBT
Show Address
Sign Message
Verify Sig File
Verify Address
File Share
Import Multisig
Push Transaction [IF PUSHTX ENABLED]
--- ---
[FACTORY MODE] [FACTORY MODE]
Bag Me Now Bag Me Now
Version: 5.x.x
DFU Upgrade DFU Upgrade
Show Version
Ship W/O Bag Ship W/O Bag
Debug Functions Debug Functions
Perform Selftest Perform Selftest
--- ---
[SSSP]
Ready To Sign
Passphrase [IF WORD BASED SEED & SSSP RELATED KEYS ENABLED]
Restore Saved
c*******
[3A14F788]
Restore
Delete
Edit Phrase
Scan Any QR Code [IF QR SCANNER]
Address Explorer
Classic P2PKH
↳ mtHSVByP9EYZ⋯Vm19gvpecb5R
P2SH-Segwit
↳ 2NCAJ5wD4Gvm⋯NphNU8UYoEJv
Segwit P2WPKH
↳ tb1qupyd58nd⋯vu9jtdyws9n9
Applications
Samourai
Post-mix
Pre-mix
Wasabi
Account Number
Custom Path
CC-2-of-4
Secure Notes & Passwords[IF ENABLED & SSSP ALLOW NOTES]
1: note0
"note0"
View Note
Sign Note Text
2: secret-PWD
"secret-PWD"
↳ satoshi
↳ abc.org
View Password
Send Password [MAYBE]
Sign Note Text
Type Passwords [MAYBE]
Seed Vault[IF ENABLED & SSSP RELATED KEYS ENABLED]
1: [7126EB3C]
[7126EB3C]
Use This Seed
2: [CCEE13B9]
[CCEE13B9]
Use This Seed
3: [03EE9989]
[03EE9989]
Use This Seed
Advanced/Tools
File Management
Sign Text File
Batch Sign PSBT
List Files
Export Wallet
Sparrow
Cove
Bitcoin Core
Nunchuk
Bull Bitcoin
Blue Wallet
Electrum Wallet
Wasabi Wallet
Fully Noded
Unchained
Theya
Bitcoin Safe
Zeus
Samourai Postmix
Samourai Premix
Descriptor
Generic JSON
Export XPUB
Segwit (BIP-84)
Classic (BIP-44)
P2WPKH/P2SH (BIP-49)
Master XPUB
Current XFP
Key Expression
Dump Summary
Verify Sig File
NFC File Share [IF NFC ENABLED]
BBQr File Share [IF QR SCANNER]
QR File Share [IF QR SCANNER]
Format SD Card
Format RAM Disk [IF VIRTDISK ENABLED]
Export Wallet
Sparrow
Cove
Bitcoin Core
Nunchuk
Bull Bitcoin
Blue Wallet
Electrum Wallet
Wasabi Wallet
Fully Noded
Unchained
Theya
Bitcoin Safe
Zeus
Samourai Postmix
Samourai Premix
Descriptor
Generic JSON
Export XPUB
Segwit (BIP-84)
Classic (BIP-44)
P2WPKH/P2SH (BIP-49)
Master XPUB
Current XFP
Key Expression
Dump Summary
Teleport Multisig PSBT [MAYBE]
View Identity
Temporary Seed [IF SSSP RELATED KEYS ENABLED]
Import from QR Scan [IF QR SCANNER]
Import Words
12 Words
18 Words
24 Words
Import via NFC [IF NFC ENABLED]
Import XPRV
Tapsigner Backup
Coldcard Backup
Restore Seed XOR
Paper Wallets
WIF Store
NFC Tools [IF NFC ENABLED]
Sign PSBT
Show Address
Sign Message
Verify Sig File
Verify Address
File Share
Push Transaction [IF PUSHTX ENABLED]
Show Firmware Version
Destroy Seed [IF SECRET AND NOT TMP SEED]
Secure Logout
EXIT TEST DRIVE [MAYBE]
[NFC key shortcut] [IF NFC ENABLED]
Sign PSBT
Show Address
Sign Message
Verify Sig File
Verify Address
File Share
Push Transaction [IF PUSHTX ENABLED]
---

View File

@ -29,6 +29,9 @@ tools may or may not hide it from you based on Unix filename
conventions. Reformating the card will certainly remove this file, conventions. Reformating the card will certainly remove this file,
so keep that in mind when managing your "special" cards. so keep that in mind when managing your "special" cards.
If using COLDCARD Q and both card slot are populated during login
make sure that enrolled card is in top slot (slot A).
## Menu Settings ## Menu Settings
See menu in: `Settings -> Login Settings -> MicroSD 2FA` See menu in: `Settings -> Login Settings -> MicroSD 2FA`

62
docs/msg-signing.md Normal file
View File

@ -0,0 +1,62 @@
# COLDCARD Message Signing
COLDCARD can sign messages send to it via USB with the help of `ckcc` utility,
sign messages provided via specially crafted file on SD card or Vdisk,
and NFC-equipped models (Mk4, Mk5, and Q) can also sign messages sent to COLDCARD via NFC.
The resulting signature can be returned over SD card/Vdisk, NFC, or — on Q — as a QR code.
Signature format follows [BIP-0137](https://github.com/bitcoin/bips/blob/master/bip-0137.mediawiki) specification.
COLDCARD Mk3 and COLDCARD Mk4 up to version `5.1.0` used compressed P2PKH header byte for all script types.
From version `5.1.0` correct header byte is used for corresponding script type.
### Verification
From version `5.1.0` users can verify signed messages directly on the device.
If signature file is on SD card or Virtual disk `Advanced/Tools -> File Management -> Verify Sig File`. In case
signature file is detached signature of signed export (or any other file), COLDCARD can check if digest of file
specified in the message matches contents of file. This requires file signed to be available on SD card or Vdisk.
File size limit for signature files is approximately 10KB.
If signature file is imported via NFC `Advance/Tools -> NFC Tools -> Verify Sig File`.
To cross-verify COLDCARD verification use https://www.verifybitcoinmessage.com/ as it supports multiple script types.
Bitcoin core can only verify P2PKH.
## Signed Exports
From version `5.1.0` most of SD card and Virtual disk exports are accompanied by detached signature file.
If exported file name is `addresses.csv` signature file name will be `addresses.sig`.
### Message construction and signature file format
1. contents of the exported file are hashed with single SHA256 hash
2. `msg = hash from step 1. + two spaces + exported filename (basename)`
3. msg from step 2. is hashed again with Bitcoin msg hash `"Bitcoin Signed Message:" + ser_compact_size(len(msg)) + msg`
4. detached signature file format:
```text
-----BEGIN BITCOIN SIGNED MESSAGE-----
f1591bfb04a89f723e1f14eb01a6b2f6f507eb0967d0a5d7822b329b98018ae4 coldcard-export.json
-----BEGIN BITCOIN SIGNATURE-----
mtHSVByP9EYZmB26jASDdPVm19gvpecb5R
IFOvGVJrm31S0j+F4dVfQ5kbRKWKcmhmXIn/Lw8iIgaCG5QNZswjrN4X673R7jTZo1kvLmiD4hlIrbuLh/HqDuk=
-----END BITCOIN SIGNATURE-----
```
### What Is Signed
1. **Single sig address explorer exports:** Signed by the key corresponding to the first (0th) address on the exported list.
2. **Specific single sig exports:** Signed by the key corresponding to the external address at index zero of chosen application specific derivation `m/<app_deriv>h/<coin_type>'h/<account>h/0/0`.
* Bitcoin Core
* Electrum Wallet
* Wasabi Wallet
* Samourai Postmix
* Samourai Premix
* Descriptor
3. **Generic single sig exports:** Signed by key that corresponds to first (0th) external address at derivation `m/44h/<coin_type>h/<account>h/0/0`.
* Lily Wallet
* Generic JSON
* Dump Summary
4. **BIP85 derived entropy exports:** Signed by path that corresponds to specific BIP85 application.
5. **Paper wallet exports:** Signed by key and address exported as paper wallet itself.
6. **Multisig exports:** public keys are encoded as P2PKH address for all multisg signature exports
* Multisig wallet descriptor: signed by the key corresponding to the first external address of own enrolled extended key `my_key/0/0`
* Generic XPUBs export: signed by the key corresponding to the first external address of own standard P2WSH derivation `m/48h/<coin_type>h/<account>h/2h/0/0`
* Multisig address explorer export: Signed by own key at the same derivation as first (0th) row on exported list. `my_key/<change>/<start_index>`

View File

@ -1,10 +1,20 @@
# NFC and Coldcard Mk4 # NFC and Coldcard
(Applies to Coldcard Mk4 only) (Applies to NFC-equipped models: Mk4, Mk5, and Q)
## Usage ## Usage
Mk4 NFC antenna is centered under number `8` on the keypad. Before using NFC, The NFC antenna location depends on the hardware:
- **Mk4**: a PCB trace loop, centered under number `8` on the keypad.
- **Mk5**: a discrete coil (`L6`) in the **top-right corner** of the device
- **Q1**: a flexible "sticker" antenna behind the display. The green LED below the
bottom-right of the display (`D12`) lights up while an NFC transfer is active —
it is the activity indicator, not the antenna.
![nfc tap sweet-spots per model](nfc-tap-locations.png)
Before using NFC,
it is important to locate the position of NFC antenna on your device and point it it is important to locate the position of NFC antenna on your device and point it
correctly towards the Coldcard NFC antenna. Picture below shows an example with iPhone correctly towards the Coldcard NFC antenna. Picture below shows an example with iPhone
that has NFC antenna located at the top right edge. The NFC smartphone antenna that has NFC antenna located at the top right edge. The NFC smartphone antenna
@ -36,7 +46,7 @@ in general. Good interoperability is critical with radio standards.
## Lower Layers ## Lower Layers
The Coldcard Mk4 has an chip that acts as a Type 5 NFC tag. The The Coldcard has a chip that acts as a Type 5 NFC tag. The
radio standard is called "NFC-V" or ISO-15693, and operates on a radio standard is called "NFC-V" or ISO-15693, and operates on a
13.56 Mhz carrier wave. 13.56 Mhz carrier wave.
@ -58,9 +68,13 @@ unless we are actively sharing something. We disable the "energy
harvesting" features of the chip, so it will not do anything when harvesting" features of the chip, so it will not do anything when
the Coldcard is powered-down, regardless of the NFC setting. the Coldcard is powered-down, regardless of the NFC setting.
If the above is not enough for you, the antenna can be destroyed If the above is not enough for you, the antenna can be destroyed:
by cutting the trace labeled "NFC" inside the hole for the MicroSD
card. Use the point of a sharp knife to cut and peel up the trace. - **Mk4**: cut the trace labeled "NFC" inside the hole for the MicroSD card,
using the point of a sharp knife to cut and peel up the trace.
- **Mk5**: has no such trace — its antenna is the discrete coil `L6` in the
top-right corner, which would have to be physically removed instead.
- **Q1**: cut the trace labeled "NFC DATA" under the batteries.
The NFC traffic is not encrypted and is subject to eavesdropping. The NFC traffic is not encrypted and is subject to eavesdropping.
While the NFC feature is active, your Coldcard can be uniquely While the NFC feature is active, your Coldcard can be uniquely

103
docs/nfc-pushtx.md Normal file
View File

@ -0,0 +1,103 @@
# NFC Push Tx
This feature allows single-tap broadcast of the freshly-signed transaction.
`PSBT ==[SD|QR|NFC]==> COLDCARD signed TXN ==[NFC tap]==> Phone Browser ==> Server TXN Broadcast`
Once enabled with a URL, the COLDCARD will show the NFC animation
after signing the transaction. When the user taps their phone, the
phone will see an NFC tag with URL inside. That URL contains the
signed transaction ready to go, and once opening in the mobile
browser, that URL will load. The landing page will connect to a
Bitcoin node (or similar) and send the transaction on the public
Bitcoin network.
This feature is available on Q and Mk4 and requires NFC to be enabled.
See `Settings > NFC Push Tx`.
See the latest on our feature minisite: [PushTx.org](https://pushtx.org)
## Protocol Spec
The COLDCARD needs a URL prefix. To that it appends some values:
- `t=...`
- this is the transaction, in binary encoded with
[base64url](https://datatracker.ietf.org/doc/html/rfc4648#section-5)
- `&c=...`
- the rightmost 8 bytes of SHA256 over the transaction. Also `base64url` encoded.
- `&n=XTN`
- if, and only if, the COLDCARD is set for Testnet, this value is appended to
indicate that the transaction is for Testnet3 and not MainNet.
- when RegTest is enabled, the value will be `XRT`
We provide a few default URL values to our customers, including one backend we
will operate on `coldcard.com`. The URL can also be directly entered by the
customer. On the Q, it can be scanned from a QR code.
For COLDCARD backend, the url used is:
https://coldcard.com/pushtx#
The complete URL with a typical transaction might look like this (but longer):
https://coldcard.com/pushtx#t=AgAAAAMNCxXtp2GVYVhkRXHLMmdZFs4p3kbFK ⋯ ABf&c=uiSVRda-1tw
We are using hash symbol here so that our server logs do not get
contaminated with the arguments. The landing page uses javascript
to read the hash part of the URL and decodes from there. If you
prefer, your URL can end with `?` and then the arguments will be
sent by the phone's browser to your server. Your processing can be
entirely done in the backend in this case.
## Expectations for the Backend
Your code should decode the transaction and check the SHA-256 hash
matches. If it does not match, or if `c` value is missing, assume
the URL has been truncated and report that to the user.
Once decoded, your code should immediately broadcast the transaction.
A confirmation step is not required in our opinion. Once it is
submitted to Bitcoin Core (or other API), any status response should
be decoded and shown to the user so they know it is on it's way.
If it was not accepted, please report the error to the user as
clearly as possible.
Next, it would make sense to either link to the TXID on a block
explorer to provide further proof that it has been sent and that
it is now waiting in the mempool.
## Backend Implementations
- Mempool.space's [implementation of this feature](https://github.com/mempool/mempool/pull/5132).
- A single-file (html and javascript) file is available
at [coldcard.com/static/coldcard-pushtx.html](https://coldcard.com/static/coldcard-pushtx.html).
You can host this file anywhere your phone can reach, and then use that URL in your
COLDCARD settings. It uses your phone's browser to submit directly
to `mempool.space` and `blockstream.info` sites (both at same time). It is equivalent
to the page hosted at `https://coldcard.com/pushtx#`. Full source code is published here:
[github.com/Coldcard/push-tx](https://github.com/Coldcard/push-tx)
### Notes
- Complete URL might be as large as 8,000 bytes. Some web servers will not support beyond
4k bytes and the NFC implementation of the phone may also have limits.
- The service URL provided must end in `?` or `#` or `&`.
- `base64url` values from COLDCARD will not have padding (`=` bytes) at end.
- POST cannot be used directly because the expect the phone to do a GET on the URL provided.
- Honest backends will not log the IP address of incoming transactions, but there is
no way to enforce that, and CloudFlare sees all.
## Example URL
```
https://mempool.space/pushtx#t=AgAAAAOHqK3w3hC6PSC0buthnJA5R9Y88WAlEvm9cifNVUPhIwAAAABqRzBEAiB-M9YprNYoohqHdQHg4wY_qcEMwDmyIQH8prykk8-0KwIgARxcojKrtixicouiUxhk4jQq_MAl11ptIgHDlRjgk5ABIQM4bgMAVDbDSr_9CvLjbg5nxrWnDGI-kVmkfL81GXZtCf____8OaH0RxW7DjZKdIF6rvbHvvyFGCBQ0PTgpx20nA_wbLgAAAABqRzBEAiBwUFigORJDPK8ptnYPAntjV-RUn1jAuzphicQstwVv-QIgEbMC8FWXQ5Jve5DaAqKJsqoj3peK83iub_oOkmbiYg4BIQO5Ehn2t0oUG3hnK4cBnwCwMc33DcdJ8aSMWzRQ_wjZL_____-UG6M-eBeAun-EZp6EbVypvVJ3mXCQrN_fUDn-kwoEnQAAAABqRzBEAiAgFAtVTpQYTKplc9NuV7Ws7ZFYeNO8BCS4ozgWrgd2ogIgGTTcw98xQdcGWeWQhVfVm_vZorBIOYovQPQeK0Lg9t8BIQLPWPioVWvj1z4NMHBCkeirYOUalCa83wbSH0CREnGZvv____8CjM_wCAAAAAAZdqkUIJA8_yqzaj0NzhvYVEIBno5gETGIrIzP8AgAAAAAGXapFEaV7xTyleuEX9OejdlUlsz7RTr0iKwAAAAA&c=hre47vyMC78&n=XTN
```
- this transaction doesn't have valid inputs, and will cause an error
- mempool.space will redirect this to a testnet endpoint (because ends with `n=XTN`)

BIN
docs/nfc-tap-locations.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

196
docs/notes-on-repro.md Normal file
View File

@ -0,0 +1,196 @@
# Notes on Reproducible Builds
The following document aims to breakdown how reproducibility is verified in the `make repro` build step.
## stm32/shared.mk
The entrypoint makefile for repro builds.
### repro
The `repro` command in `shared.mk` is the first step in the repro build process, which triggers a docker build and run process.
```makefile
repro: submods-match code-committed
repro:
docker build -t coldcard-build - < dockerfile.build
(cd ..; docker run $(DOCK_RUN_ARGS) sh src/stm32/repro-build.sh $(VERSION_STRING) $(HW_MODEL) $(PARENT_MKFILE))
```
`$(HW_MODEL)` is the model string (e.g. `mk4`, `q1`) and `$(PARENT_MKFILE)` is the
top-level makefile being used (`MK-Makefile` or `Q1-Makefile`). The `submods-match`
and `code-committed` prerequisites ensure the submodules and working tree are clean
before a repro build.
Below are interesting sections from the docker logs that give an idea as to what is going on in build process:
```stdout
+ mkdir /tmp/checkout
+ mount -t tmpfs tmpfs /tmp/checkout
...
```
We will pull the release from coldcard.com into the `/tmp/checkout` directory.
```
+ git clone /work/src/.git firmware
...
+ cd firmware/external
+ git submodule update --init
...
Successfully installed signit-1.0
...
+ cd ../stm32
+ cd ../releases
+ '[' -f '*-v5.0.7-mk4-coldcard.dfu' ]
+ dd 'bs=66' 'skip=1'
+ grep -F v5.0.7-mk4-coldcard.dfu signatures.txt
0+1 records in
0+1 records out
+ PUBLISHED_BIN=2022-10-05T1724-v5.0.7-mk4-coldcard.dfu
+ '[' -z 2022-10-05T1724-v5.0.7-mk4-coldcard.dfu ]
+ wget -S https://coldcard.com/downloads/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu
...
'2022-10-05T1724-v5.0.7-mk4-coldcard.dfu' saved
...
+ PUBLISHED_BIN=/tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu
...
+ make -f MK-Makefile setup
...
+ make -f MK-Makefile firmware-signed.bin firmware-signed.dfu production.bin dev.dfu firmware.lss firmware.elf
...
signit sign -b l-port/build-COLDCARD_MK4 -m mk4 5.0.7 -o firmware-signed.bin
...
signit sign -m mk4 5.0.7 -r firmware-signed.bin -k 1 -o production.bin
You don't have that key (1), so using key zero instead!
...
cd ../external/micropython/ports/stm32 && make BOARD=COLDCARD_MK4 -j 4 EXCLUDE_NGU_TESTS=1 DEBUG_BUILD=0
...
../external/micropython/tools/dfu.py -b 0x08020000:dev.bin dev.dfu
arm-none-eabi-objdump -h -S l-port/build-COLDCARD_MK4/firmware.elf > firmware.lss
cp l-port/build-COLDCARD_MK4/firmware.elf .
+ '[' /tmp/checkout/firmware/stm32 '!=' /work/src/stm32 ]
+ rsync -av --ignore-missing-args firmware-signed.bin firmware-signed.dfu production.bin dev.dfu firmware.lss firmware.elf /work/built
sending incremental file list
dev.dfu
firmware-signed.bin
firmware-signed.dfu
firmware.elf
firmware.lss
production.bin
...
+ make -f MK-Makefile 'PUBLISHED_BIN=/tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu' check-repro
...
Comparing against: /tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu
test -n "/tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu" -a -f /tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu
rm -f -f check-fw.bin check-bootrom.bin
signit split /tmp/checkout/firmware/releases/2022-10-05T1724-v5.0.7-mk4-coldcard.dfu check-fw.bin check-bootrom.bin
start 293 for 870400 bytes: Firmware => check-fw.bin
start 870701 for 114688 bytes: Bootrom => check-bootrom.bin
signit check check-fw.bin
magic_value: 0xcc001234
timestamp: 2022-10-05 17:24:55 UTC
version_string: 5.0.7
pubkey_num: 1
firmware_length: 870400
install_flags: 0x0 =>
hw_compat: 0x8 => Mk4
best_ts: b'\x00\x00\x00\x00\x00\x00\x00\x00'
future: 0000000000000000 ... 0000000000000000
signature: 293948e7ce4a3555 ... 766437aa65d3e88a
sha256^2: 7f3a7c5f794ce72f68280447cddc837fa62245fdf4b795822127624f8775dca2
ECDSA Signature: CORRECT
signit check firmware-signed.bin
magic_value: 0xcc001234
timestamp: 2022-10-24 13:33:16 UTC
version_string: 5.0.7
pubkey_num: 0
firmware_length: 870400
install_flags: 0x0 =>
hw_compat: 0x8 => Mk4
best_ts: b'\x00\x00\x00\x00\x00\x00\x00\x00'
future: 0000000000000000 ... 0000000000000000
signature: deb643d0a140d89e ... c544f09cd80fa65c
sha256^2: a46ddd6e599a49a573bf76054f438c9efe1ee031bfae74a00b0e7bbe76f516c3
ECDSA Signature: CORRECT
hexdump -C firmware-signed.bin | sed -e 's/^00003f[89abcdef]0 .*/(firmware signature here)/' > repro-got.txt
hexdump -C check-fw.bin | sed -e 's/^00003f[89abcdef]0 .*/(firmware signature here)/' > repro-want.txt
diff repro-got.txt repro-want.txt
SUCCESS.
You have built a bit-for-bit identical copy of Coldcard firmware for v5.0.7
```
## check-repro
The `check-repro` section of the makefile contains the steps required to verify that the build artifacts are infact a bit-for-bit match to the release candidates.
```makefile
check-repro: TRIM_SIG = sed -e 's/^00003f[89abcdef]0 .*/(firmware signature here)/'
check-repro: firmware-signed.bin
ifeq ($(PUBLISHED_BIN),)
@echo ""
@echo "Need published binary for: $(VERSION_STRING)"
@echo ""
@echo "Copy it into ../releases"
@echo ""
else
@echo Comparing against: $(PUBLISHED_BIN)
test -n "$(PUBLISHED_BIN)" -a -f $(PUBLISHED_BIN)
$(RM) -f check-fw.bin check-bootrom.bin
$(SIGNIT) split $(PUBLISHED_BIN) check-fw.bin check-bootrom.bin
$(SIGNIT) check check-fw.bin
$(SIGNIT) check firmware-signed.bin
hexdump -C firmware-signed.bin | $(TRIM_SIG) > repro-got.txt
hexdump -C check-fw.bin | $(TRIM_SIG) > repro-want.txt
diff repro-got.txt repro-want.txt
@echo ""
@echo "SUCCESS. "
@echo ""
@echo "You have built a bit-for-bit identical copy of Coldcard firmware for v$(VERSION_STRING)"
endif
```
To summarize `check-repro`:
- At the final `check-repro` step, we have a locally built `firmware-signed.bin` and we want to check that it matches the binary release provided by Coinkite.
- This step verifies the signature of the binary is valid, using either the Coinkite key factory key or the "debug" key zero which is public.
- An identical checksum match will not be possible as is, since there is signature data embedded into into the binary, which must be removed.
- The specific release of the version that is being built is fetched, and placed it under /tmp/checkout/firmware/releases/*.dfu
- `split` (cli/signit.py: Line 153-175) is run against the release `*.dfu` resulting in a `check-fw.bin` and `check-bootrom.bin`. "This splits the DFU file into the two parts it contains: the main firmware (COLDCARD application) and the boot loader code."
- `check` (cli/signit.py: Line 176-243) is run against each the release `check-fw.bin` and our built `firmware-signed.bin`.
- a hexdump is taken of each the release `check-fw.bin` and our built `firmware-signed.bin` piped through $TRIM_SIG which removes 64 bytes of signature data and subsitutes it with a common string.
- Finally the diff of the two hexdumps are compared to prove reproducibility.

View File

@ -81,7 +81,7 @@ of your duress PIN.
The attackers could tell when the brick-me PIN has worked, but when The attackers could tell when the brick-me PIN has worked, but when
the brick-me PIN works, the Coldcard will immediately use it to the brick-me PIN works, the Coldcard will immediately use it to
destroy the main pairing secret. This renders the security element destroy the main pairing secret. This renders the security element
useless. This happens in about 50 milliseconds and is done long before useless. This happens in about 50 milliseconds and is done long
before anyone gets an on-screen confirmation that it worked. before anyone gets an on-screen confirmation that it worked.
There is little time to interrupt this or jam the bus to stop it. There is little time to interrupt this or jam the bus to stop it.
@ -183,12 +183,12 @@ This double-hashed value is what's stored inside the secure element
as it travels on the bus. Because of the inclusion of the pairing as it travels on the bus. Because of the inclusion of the pairing
secret, the hashes generated by each Coldcard will be different. secret, the hashes generated by each Coldcard will be different.
With Mark3 hardware, we've added a key-streching step, which starts With Mark3 hardware, we've added a key-stretching step, which starts
with the above value, and does HMAC-SHA256 using a secret key known with the above value, and does HMAC-SHA256 using a secret key known
only to the 608a (repeatedly). That value is used directly to check the only to the 608a (repeatedly). That value is used directly to check the
duress PIN, and if that doesn't match, it is HMAC-SHA256'ed again, duress PIN, and if that doesn't match, it is HMAC-SHA256'ed again,
using a key that is usage limited. This limits actual PIN login attempts using a key that is usage limited. This limits actual PIN login attempts
to a set value and is enfoced by the 608a internally. to a set value and is enforced by the 608a internally.
## Genuine vs. Caution Lights ## Genuine vs. Caution Lights
@ -281,7 +281,7 @@ Here's what the warning screen looks like:
### Benefits ### Benefits
- no warnings, but still trustable thanks to ATECC608A - no warnings, but still trustable thanks to ATECC608
- random devs can replace 99% of firmware at Micropython layer (everything but bootloader) - random devs can replace 99% of firmware at Micropython layer (everything but bootloader)
- but they need to retain our code for talking to bootloader and secure element, - but they need to retain our code for talking to bootloader and secure element,
so that PIN can be entered and verified. so that PIN can be entered and verified.

View File

@ -0,0 +1,112 @@
# BIP-322 Generic Signed Message Format
BIP-322 specification: <https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki>
## Proof of Reserves (POR)
### PoR PSBT
COLDCARD accepts a specially crafted PSBT file to sign as BIP-322 Proof of Reserves. The PSBT
must meet all these requirements:
* COLDCARD acts as a BIP-322 PSBT signer. It validates the BIP-322 `to_sign`
transaction, shows the message from `PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE`, and
adds signatures to the PSBT. Finalizing and encoding the final BIP-322
signature string is the responsibility of the finalizer.
* PSBT MUST include `PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE = 0x09`; the value is
the exact message shown to the user and signed by BIP-322.
* PSBT requires `PSBT_IN_BIP32_DERIVATION` for each input
* P2SH wrapped segwit addresses MUST have proper redeem script in PSBT: `PSBT_IN_REDEEM_SCRIPT`
* P2WSH segwit addresses MUST have proper witness script in PSBT: `PSBT_IN_WITNESS_SCRIPT`
* PSBT (`to_sign`) MUST have at least one input.
* First (0th) input of `to_sign` MUST spend the BIP-322 `to_spend` output.
* Input 0 MUST include one of `PSBT_IN_NON_WITNESS_UTXO` or `PSBT_IN_WITNESS_UTXO`.
* When input 0 provides `PSBT_IN_WITNESS_UTXO`, COLDCARD reconstructs the
expected `to_spend` txid from `PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE` and the
witness UTXO scriptPubKey.
* When input 0 provides `PSBT_IN_NON_WITNESS_UTXO`, it MUST be the BIP-322
`to_spend` transaction as defined in
[BIP-322](https://github.com/bitcoin/bips/blob/master/bip-0322.mediawiki#full):
* 1 input, 1 output
* output nValue is 0
* input prevout hash is 0
* input prevout n is 0xffffffff
* input scriptSig is `OP_0 PUSH32 message_hash`
* PSBT (`to_sign`) MUST only have one output with null-data `OP_RETURN`
* `to_sign` transaction version MUST be 0 or 2.
* Optionally inputs can be added to `to_sign` for Proof of Reserve signing.
* PSBT MUST be version 0 or 2.
* Foreign inputs not allowed in POR PSBT.
The signatures created by the BIP-322 process will never be suitable
for a on-chain Bitcoin transaction that could move funds, because
of these restrictions imposed by BIP-322.
### Output
COLDCARD always returns a signed PSBT for BIP-322 message signing and Proof of
Reserves. It never returns an extracted/finalized transaction for these PSBTs.
This is true even when finalization is requested over USB, such as with
`ckcc unsigned.psbt --finalize`.
The signed PSBT is the handoff artifact for the external finalizer/verifier. It
keeps the PSBT metadata needed to verify or finalize the BIP-322 signature,
including public keys, scripts, partial signatures, and UTXO data. This matters
because the address being proven normally commits only to a hash of the public
key or script, not the public key or script itself.
### Proof of Reserves Signing Experience
After Coldcard recognizes a BIP-322 PSBT it reads the message from
`PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE` and shows it to the user for approval.
COLDCARD verifies that the message hash matches the input 0 `to_spend`
commitment before offering to sign.
When the PSBT contains only input 0, COLDCARD labels the request as
`BIP-322 Message`, because it is message signing and does not prove ownership
of any additional reserve UTXOs. In that case it does not show transaction
input/output counts. When the PSBT contains additional inputs, COLDCARD labels
the request as `Proof of Reserves` and shows the reserve amount.
If the message contains non-ASCII characters, COLDCARD warns that some
characters may not be readable on screen.
Legacy PoR PSBTs without `PSBT_GLOBAL_GENERIC_SIGNED_MESSAGE` are rejected by
this flow.
Read more [here.](https://gist.github.com/orangesurf/0c1d0a31d3ebe7e48335a34d56788d4c)
Example screen text for a one-input BIP-322 message signing PSBT:
```text
BIP-322 Message
Message:
This is the signed message
Challenge Address:
bc1qzvjnhf7k70uxv6xvneaqxql7k09dd6nsr5wheq
Press ENTER to approve and sign message. Press (2) to explore transaction.
CANCEL to abort.
```
Example screen text for a Proof of Reserves PSBT:
```text
Proof of Reserves
Message:
POR
Amount 0.20000000 BTC
Challenge Address:
bc1qzvjnhf7k70uxv6xvneaqxql7k09dd6nsr5wheq
21 inputs
1 output
Press ENTER to approve and sign proof of reserves. Press (2) to explore transaction.
CANCEL to abort.
```

View File

@ -2,9 +2,9 @@
## Background ## Background
The Mk4 **COLDCARD<sup>&reg;</sup>** has two secure elements: The **COLDCARD<sup>&reg;</sup>** Mk4 and Q have two secure elements:
- SE1 (Secure Element 1): Microchip ATECC608B - SE1 (Secure Element 1): Microchip ATECC608
- SE2 (Secure Element 2): Maxim DS28C36B - SE2 (Secure Element 2): Maxim DS28C36B
Because different vendors make them, they do not share bugs and weaknesses. Because different vendors make them, they do not share bugs and weaknesses.
@ -20,15 +20,13 @@ HMAC-SHA256.
Assume attackers have physical access to a COLDCARD, have opened Assume attackers have physical access to a COLDCARD, have opened
the case, and can probe the bus connections between the MCU and SE1 the case, and can probe the bus connections between the MCU and SE1
or SE2. They may even desolder SE1 and SE2 from the board, and put or SE2. They may even de-solder SE1 and SE2 from the board, and put
active circuits between them and the MCU &mdash; an active MiTM active circuits between them and the MCU &mdash; an active MiTM attack.
attack. (The Mk4 has improved goop on all three parts and all these
critical signals run on internal layers of the PCBA.)
### The Solutions ### The Solutions
Three parties hold secrets in the Mk4: the main MCU (microcontroller) Three parties hold secrets in the COLDCARD: the main MCU (microcontroller)
and the two secure elements. Our goal is that **all three** must and the two secure elements. Our goal is that **all three** must
be fully compromised to access the seed words. Thus, if one part be fully compromised to access the seed words. Thus, if one part
has a vulnerability, the COLDCARD as a whole is still secure. has a vulnerability, the COLDCARD as a whole is still secure.
@ -37,7 +35,7 @@ if all three devices are cracked wide open. (This is a last line
of defence, a brute-force attack on all PIN combinations will breach of defence, a brute-force attack on all PIN combinations will breach
it.) it.)
The Mk4 also supports new Trick PIN codes with side effects such COLDCARD also supports new Trick PIN codes with side effects such
as wiping or bricking the COLDCARD, or providing access to a decoy as wiping or bricking the COLDCARD, or providing access to a decoy
or duress wallet. Ideally, attackers will not detect using a false or duress wallet. Ideally, attackers will not detect using a false
PIN, even while probing the signals on the board. PIN, even while probing the signals on the board.
@ -53,7 +51,7 @@ and the MicroPython code cannot read this area of the chip. Using
an internal firewall feature and PCROP (proprietary code readout an internal firewall feature and PCROP (proprietary code readout
protection) achieves this result. protection) achieves this result.
Mk4 also shares a secret between SE2 and the MCU. Just like SE1, COLDCARD also shares a secret between SE2 and the MCU. Just like SE1,
this authenticates SE2 to the MCU and encrypts their mutual this authenticates SE2 to the MCU and encrypts their mutual
communications. The Pairing Secret for SE2 is not stored in SE1 and communications. The Pairing Secret for SE2 is not stored in SE1 and
is unique from the other Pairing Secret used for SE1. is unique from the other Pairing Secret used for SE1.
@ -94,8 +92,8 @@ increases flexibility and resistance to known plain text attacks.
| `pin stretch` | slot 2 | HMAC | SE1 | Key stretching for PIN entry and anti-phish words | `pin stretch` | slot 2 | HMAC | SE1 | Key stretching for PIN entry and anti-phish words
| `firmware` | slot 14 | SHA256d | SE1 | Firmware checksum, controls green/red LEDs | `firmware` | slot 14 | SHA256d | SE1 | Firmware checksum, controls green/red LEDs
| `nonce/chksum` | slot 10 | data | SE1 | AES nonce and GMAC tag, protected by PIN | `nonce/chksum` | slot 10 | data | SE1 | AES nonce and GMAC tag, protected by PIN
| `SE2 easy key` | page 15 | AES via HMAC | SE2 | Another SE2 part of AES seed key | `SE2 easy key` | page 14 | AES via HMAC | SE2 | Another SE2 part of AES seed key
| `SE2 hard key` | page 14 | AES via ECC | SE2 | SE2's part of AES seed key; ECC used to unlock | `SE2 hard key` | page 15 | AES via ECC | SE2 | SE2's part of AES seed key; ECC used to unlock
| `tpin key` | `tpin_key` | HMAC(key) | MCU | Key for HMAC used to encrypt trick PINs | `tpin key` | `tpin_key` | HMAC(key) | MCU | Key for HMAC used to encrypt trick PINs
| `trick PIN slots` | pages 0-12 | HMAC | SE2 | Protect duress wallet seeds and pins (6 spots) | `trick PIN slots` | pages 0-12 | HMAC | SE2 | Protect duress wallet seeds and pins (6 spots)
| `SE2 trash` | secret B | HMAC | SE2 | Used to destroy values (only SE2 knows the value) | `SE2 trash` | secret B | HMAC | SE2 | Used to destroy values (only SE2 knows the value)
@ -195,7 +193,7 @@ user enters against all the slots and works silently to support the
Trick features. Trick features.
The type of support depends on the type of Trick. Duress wallets The type of support depends on the type of Trick. Duress wallets
require storing 32 bytes of seed words (generated from the true require storing 32 or 64 bytes of seed words (generated from the true
seed via BIP-85). Other cases dictate encoding a short numeric code seed via BIP-85). Other cases dictate encoding a short numeric code
provided to higher layers for implementation. For example, a flag provided to higher layers for implementation. For example, a flag
in that code can trigger the boot ROM to wipe the `mcu seed key`. in that code can trigger the boot ROM to wipe the `mcu seed key`.
@ -206,7 +204,8 @@ key` being zero makes the seed permanently inaccessible.
The MCU code may continue speaking to SE1 to complete the fraud, The MCU code may continue speaking to SE1 to complete the fraud,
but in general, SE1 will no longer store the duress wallet or Brick but in general, SE1 will no longer store the duress wallet or Brick
Me PINs. Mk4 implements those feature in SE2. Me PINs as in previous generations (Mk1-3). Mk4 and Q implement
those feature in SE2.
### Trick PIN Operation ### Trick PIN Operation
@ -268,7 +267,7 @@ inside SE1. This storage is called Spare Secrets. Spare Secrets has
3 &times; 72 bytes of space, protected by the same measures as the 3 &times; 72 bytes of space, protected by the same measures as the
seed words. seed words.
Mk4 still supports the Long Secret (416 bytes), but its API is Mk4/Q still supports the Long Secret (416 bytes), but its API is
changed. The slow speed of fetching the Long Secret in 32-byte changed. The slow speed of fetching the Long Secret in 32-byte
blocks due to the reconstructing the primary AES Seed Key for each blocks due to the reconstructing the primary AES Seed Key for each
call necessitated the change. call necessitated the change.
@ -292,7 +291,7 @@ PINs that continue operation (duress PINs), unlike the average thug.
## Fast Brick ## Fast Brick
On the Mk4, quickly bricking the system is done by rotating the SE1 Quickly bricking the system is done by rotating the SE1
pairing secret by mixing in a random nonce via the chip's key pairing secret by mixing in a random nonce via the chip's key
rotation process. Only a knowledge of the old pairing secret is rotation process. Only a knowledge of the old pairing secret is
needed for this change. This is similar the to `brick_me` PIN needed for this change. This is similar the to `brick_me` PIN

View File

@ -1,4 +1,4 @@
# COLDCARD Mk4 Security Model # COLDCARD Mk4/Mk5/Q Security Model
## Abstract ## Abstract
@ -8,11 +8,14 @@ seed words used to generate a deterministic wallet. This secure
element is in a limited and read-only state until authorized by PIN entry. element is in a limited and read-only state until authorized by PIN entry.
Clearing the secure element is impossible without first entering Clearing the secure element is impossible without first entering
the correct PIN. The Mark 4 COLDCARD (Mk4) introduces several new the correct PIN. The Mk4 COLDCARD introduced several new security
security features, including a second secure element and Trick PINs features, including a second secure element and Trick PINs which
which can render stored data unrecoverable, or brick the COLDCARD can render stored data unrecoverable, or brick the COLDCARD entirely
entirely if necessary, without entering the true authorization PIN if necessary, without entering the true authorization PIN (True
(True PIN). PIN).
The COLDCARD Q continues with the same security model introduced
in Mk4.
## Introduction ## Introduction
@ -22,7 +25,7 @@ the Microchip ATECC508A and later the ATECC608B, to store its
secrets. This secure element has 72 bytes of storage protected by secrets. This secure element has 72 bytes of storage protected by
a 4- to 12-digit PIN code. a 4- to 12-digit PIN code.
Mk4 adds a second secure element to the COLDCARD. The ATECC608B is Mk4 adds a second secure element to the COLDCARD. The ATECC608 is
still used, now called SE1 (Secure Element 1), along with a new still used, now called SE1 (Secure Element 1), along with a new
chip, the Maxim DS28C36B, called SE2 (Secure Element 2). The chip, the Maxim DS28C36B, called SE2 (Secure Element 2). The
DS28C36B (SE2) has more memory with fifteen 32-byte slots of secure DS28C36B (SE2) has more memory with fifteen 32-byte slots of secure
@ -93,9 +96,10 @@ user entered the True PIN. An attacker will only have access to the
duress wallet. They won't have access to steal the main stash. duress wallet. They won't have access to steal the main stash.
The private key can be automatically derived using BIP-85 methods, The private key can be automatically derived using BIP-85 methods,
based on account numbers 1001, 1002, or 1003. Because this is BIP-85 based on account numbers 1001, 1002, or 1003 for a 24-word duress wallet
based and uses a 24-word seed, it behaves exactly like a normal (or 2001, 2002, 2003 for a 12-word one). Because this is BIP-85
wallet. Defining a passphrase for the wallet is also possible. based, it behaves exactly like a normal wallet. Defining a passphrase
for the wallet is also possible.
The Mk4 also supports older COLDCARD duress wallets and their UTXOs The Mk4 also supports older COLDCARD duress wallets and their UTXOs
on the blockchain. There is an option to create compatible wallets on the blockchain. There is an option to create compatible wallets
@ -187,9 +191,9 @@ customers suggested.
### Kill Key Feature ### Kill Key Feature
This feature allows the user to execute a Fast Wipe when the On the Mk4, this feature allows the user to execute a Fast Wipe
anti-phishing words are displayed on the screen. This feature is when the anti-phishing words are displayed on the screen. This
turned off by default. feature is turned off by default.
The user sets a particular key number to trigger Fast Wipe. If that The user sets a particular key number to trigger Fast Wipe. If that
key is pressed while viewing the anti-phishing words, the seed is key is pressed while viewing the anti-phishing words, the seed is
@ -200,13 +204,19 @@ It is strongly recommended that the first digit for the second half
of the True PIN is **not** used as the Kill Key. Missing a step of the True PIN is **not** used as the Kill Key. Missing a step
would unintentionally wipe the seed. would unintentionally wipe the seed.
For the COLDCARD Q, the same feature exists: any letter may be
specified but numbers are not supported. This change allows the
"kill button" to be active through-out the entire login process.
It can be even be pressed while the nickname is shown, and at any
point during the PIN entry.
### SPI Serial Flash Removed ### SPI Serial Flash Removed
The Mk3 and earlier had a dedicated, external chip to hold settings The Mk3 and earlier had a dedicated, external chip to hold settings
and the PSBT during operation. Mk4 does not have that chip. The and the PSBT during operation. Mk4 and later, do not have that
settings now reside inside the main MCU, increasing security. chip. The settings now reside inside the main MCU, increasing
Settings are still AES-encrypted as before. security. Settings are still AES-encrypted as before.
The separate settings chip could be blanked externally or even The separate settings chip could be blanked externally or even
removed/replaced. This possibility might enable getting around removed/replaced. This possibility might enable getting around
@ -234,11 +244,11 @@ COLDCARD's case to do so, but the option is there if needed.
## SD Card Recovery Mode ## SD Card Recovery Mode
Mk4 bootloader is smart enough to be able to read an SD card. You Mk4/Mk5/Q bootloader is smart enough to be able to read an SD card. You
will only be able to trigger the SD card loading code, if the will only be able to trigger the SD card loading code, if the
COLDCARD was powered down during the upgrade process. At that point, COLDCARD was powered down during the upgrade process. At that point,
the intended firmware image has been lost because it it held in the intended firmware image has been lost because it it held in
PSRAM only during the flash writing process. The bootloader knows PSRAM only, during the flash writing process. The bootloader knows
main flash (ie. Micropython code) is corrupt because it fails the main flash (ie. Micropython code) is corrupt because it fails the
checksum check (and/or signature check). checksum check (and/or signature check).
@ -256,6 +266,9 @@ If any other parts of flash---beyond the normal upgradable firmware
area---have also been corrupted, this process will not work and the area---have also been corrupted, this process will not work and the
unit will be a brick. unit will be a brick.
On the COLDCARD Q, only the top slot (A) is supported for this
operation.
## Flash ECC (Error Detection/Correction Codes) ## Flash ECC (Error Detection/Correction Codes)
@ -274,7 +287,7 @@ that it's an attack, such as exposing the bare die to targeted UV-C
radiation. If the attacker is able to flip 2 or more bits, then radiation. If the attacker is able to flip 2 or more bits, then
this will effectively brick the COLDCARD once the ECC error is detected. this will effectively brick the COLDCARD once the ECC error is detected.
Critical flash cells, such as those that prevent both JTAG access, Critical flash cells, such as those that prevent JTAG access, are
are not a single bit (it's a special bit pattern), and regardless not a single bit (it's a special bit pattern), and regardless are
are protected via ECC the same as other flash cells. protected via ECC the same as other flash cells.

View File

@ -12,31 +12,32 @@ are not discrete and you could be compelled to produce the passphrase.
Enter [_Seed XOR_](https://seedxor.com), a plausibly deniable means Enter [_Seed XOR_](https://seedxor.com), a plausibly deniable means
of storing secrets in two or more parts that look and behave just of storing secrets in two or more parts that look and behave just
like the original secret. One 24-word seed phrase becomes two or more parts like the original secret. One 12-, 18-, or 24-word seed phrase becomes two or more parts
that are also BIP-39 compatible seeds phrases. These should be backed up in your that are also BIP-39 compatible seeds phrases. These should be backed up in your
preferred method, metal or otherwise. These parts can be individually loaded preferred method, metal or otherwise. These parts can be individually loaded
with honeypot funds as each one is 24 words, with the 24th being with honeypot funds as each one has same word length, with the last being
the checksum and will work as such in any normal BIP-39 compatible wallet. the checksum and will work as such in any normal BIP-39 compatible wallet.
This one more solution for your game-theory arsenal. This one more solution for your game-theory arsenal.
- *Q*: I'm lazy, can I do this to my Existing Seed? - *Q*: I'm lazy, can I do this to my Existing Seed?
- *A*: Yes. You can split the words you have already in your Coldcard, making - *A*: Yes. You can split the words you have already in your Coldcard, making
2, 3 or 4 new SEEDPLATES. You could also any number of existing SEEDPLATES 2, 3 or 4 new SEEDPLATES. You could also use any number of existing SEEDPLATES
you have, and combine them to make a new random wallet that is the XOR of you have, and combine them to make a new random wallet that is the XOR of
their values. Effectively that makes a new random wallet. their values. Effectively that makes a new random wallet.
## Background ## Background
[_Seed XOR_](https://seedxor.com) works by taking any number of 24-word [_Seed XOR_](https://seedxor.com) works by taking any number of
seed phrases in BIP-39 style, and simply XOR-ing them together, seed phrases in BIP-39 style, and simply XOR-ing them together,
bit-by-bit into a new phrase. bit-by-bit into a new phrase. All seed phrases have to be of the same length.
The last word (in 24-word case, which is the only width we support) has The last word contains checksum.
8 bits of checksum. For the "parts" (sometimes called "shares") this checksum For the "parts" (sometimes called "shares") this checksum
is calculated as normal for BIP-39, but those final 8-bits are not used in is calculated as normal for BIP-39, but those final bits are not used in
the XOR process. But the checksums still protects the integrity of the the XOR process. But the checksums still protects the integrity of the
individual parts. individual parts. In 24-words XOR last 8 bits are checksum and in 12-words
XOR last 4 bits are checksum.
Useful properties of this approach: Useful properties of this approach:
@ -50,7 +51,7 @@ Useful properties of this approach:
- You can store funds on the seeds of any part, and any subset of parts, which - You can store funds on the seeds of any part, and any subset of parts, which
opens even more duress options. opens even more duress options.
We recommend storing the checksum word (24-th) of the original We recommend storing the checksum word of the original
wallet along with your N parts. This allows you to be sure you've wallet along with your N parts. This allows you to be sure you've
gotten all the parts and assembled them correctly. This does reveal gotten all the parts and assembled them correctly. This does reveal
3 bits of your real wallet however, and also reveals that a 3 bits of your real wallet however, and also reveals that a
@ -72,15 +73,17 @@ Advanced > Danger Zone > Seed Functions > Seed XOR > Split Existing
You can choose between 2, 3 or 4 parts. You can also choose (next You can choose between 2, 3 or 4 parts. You can also choose (next
screen) to generate them deterministically or using the TRNG. The screen) to generate them deterministically or using the TRNG. The
advantage of the deterministic approach is you'll always get the advantage of the deterministic approach is you'll always get the
same answers, so you can check that you've recorded the correct same answers, so you can check that you've recorded the correct
48 to 96 words right the next day. words right the next day.
When the parts are made deterministically, we take a double-SHA256 over When the parts are made deterministically, we take a double-SHA256 over
a fixed string (`Batshitoshi`), your master secret, and the text a fixed string (`Batshitoshi`), your master secret, and the text
`1 of 4 parts` which changes for each part. `0 of 4 parts` which changes for each part (the index is 0-based).
In random mode, we simply pick 32 random bytes (and then double-SHA256 In random mode, we simply pick random bytes (and then double-SHA256
them) from the Coldcard's True Random Number Generator (TRNG).. them) from the Coldcard's True Random Number Generator (TRNG). The number
of bytes matches your secret length: 16, 24, or 32 bytes for a 12-, 18-,
or 24-word seed respectively.
This is done to make all but the one part. The final part is the This is done to make all but the one part. The final part is the
value needed to get back to your secret, so it's the XOR of the value needed to get back to your secret, so it's the XOR of the
@ -109,7 +112,7 @@ of all the parts.
- You can pick your XOR parts randomly, and the result when XOR'ed - You can pick your XOR parts randomly, and the result when XOR'ed
together, is a random wallet. However, it would be best to get the together, is a random wallet. However, it would be best to get the
24-th word checksum recorded correctly, so please use a tool such last word checksum recorded correctly, so please use a tool such
as the Coldcard to lookup the 24th word and save that (for each as the Coldcard to lookup the 24th word and save that (for each
part). For example, you might take a fresh Coldcard (no secret) part). For example, you might take a fresh Coldcard (no secret)
and draw 23 words from a hat. After providing the 23rd word, the and draw 23 words from a hat. After providing the 23rd word, the
@ -156,9 +159,15 @@ with the others on a SEEDPLATE.
- right to A, down to B ... take that number, and go to that column - right to A, down to B ... take that number, and go to that column
- down to C, that is answer: a &oplus; b &oplus; c - down to C, that is answer: a &oplus; b &oplus; c
## Open Standard
Seed XOR is an open standard. Other software and hardware wallets are encouraged to
implement support. No license or permission is required, including usage of the term
"Seed XOR" when referring to implementations of this feature. Such implementations
should match the process described in this documentation and be fully interoperable.
--- ---
# XOR Seed Example Using 3 Parts # 24 Words XOR Seed Example Using 3 Parts
## Seed A (1 of 3) ## Seed A (1 of 3)
@ -209,10 +218,56 @@ with the others on a SEEDPLATE.
final word between: gas [300] - lend [3FF] final word between: gas [300] - lend [3FF]
correct final word: indoor [398] correct final word: indoor [398]
# 12 Words XOR Seed Example Using 3 Parts
## Seed A (1 of 3)
1=romance [5DC], 2=wink [7DE], 3=lottery [420], 4=autumn [07D], 5=shop [635], 6=bring [0E1],
7=dawn [1BF], 8=tongue [723], 9=range [58E], 10=crater [194], 11=truth [74E], 12=ability [001]
A = 5DC 7DE 420 07D 635 0E1 1BF 723 58E 194 74E 001
## Seed B (2 of 3)
1=boat [0C6], 2=unfair [768], 3=shell [62B], 4=violin [7A2], 5=tree [73F], 6=robust [5DA], 7=open [4D9],
8=ride [5CB], 9=visual [7A7], 10=forest [2D9], 11=vintage [7A1], 12=approve [056]
B = 0C6 768 62B 7A2 73F 5DA 4D9 5CB 7A7 2D9 7A1 056
## Seed C (3 of 3)
1=lion [411], 2=misery [46D], 3=divide [1FF], 4=hurry [37D], 5=latin [3EB], 6=fluid [2CD], 7=camp [106],
8=advance [01F], 9=illegal [388], 10=lab [3E0], 11=pyramid [578], 12=unhappy [76A]
C = 411 46D 1FF 37D 3EB 2CD 106 01F 388 3E0 578 76A
## Calculation (XOR each hex digit)
A = 5DC 7DE 420 07D 635 0E1 1BF 723 58E 194 74E 001
B = 0C6 768 62B 7A2 73F 5DA 4D9 5CB 7A7 2D9 7A1 056
C = 411 46D 1FF 37D 3EB 2CD 106 01F 388 3E0 578 76A
| | |
XOR = 10B 4DB 3F4 4A2 2E1 7F6 460 2F7 1A1 0AD 597 73x
## Resulting Seed Phrase
1=cannon [10B], 2=opinion [4DB], 3=leader [3F4], 4=nephew [4A2], 5=found [2E1], 6=yard [7F6],
7=metal [460], 8=galaxy [2F7], 9=crouch [1A1], 10=between [0AD], 11=real [597]
final word between: toward [730] - tree [73F]
correct final word: trade [735]
- It's not possible to calculate the checksum of the final seed phrase on paper (needs SHA256). - It's not possible to calculate the checksum of the final seed phrase on paper (needs SHA256).
- But it must start with the indicated digit, and there will be only one - But it must start with the indicated digit(s). If using 24 words XOR, there will be only one
suitable choice offered by the Coldcard in that range (x00 to xFF), suitable choice offered by the Coldcard in that range (x00 to xFF),
once you have entered the other 23 words. once you have entered the other 23 words.
- The checksum of each of the XOR-parts protects the final result, assuming your XOR - The checksum of each of the XOR-parts protects the final result, assuming your XOR
math is correct. math is correct.

209
docs/spending-policy.md Normal file
View File

@ -0,0 +1,209 @@
# Spending Policy
This special mode will stop you from signing transactions if they
exceed a spending policy you define beforehand. Once enabled, many
features of the COLDCARD are disabled or inaccessible.
You might want to use this feature when traveling with your COLDCARD.
## Spending Policy: Multisig (formerly CCC)
We also support a mode where the COLDCARD is a multisig co-signer
and only performs its signature when a spending policy is met. The
other multisig signers are free to sign or not sign as appropriate.
Multisig mode is more advanced and requires use of multisig addresses,
new UTXO, and cooperating multisig on-chain wallets.
This document will only discuss the "Single signer" version of
Spending Policy. Both modes can be active at the same time, but if
a transaction would be signed by Multisig policy, then we assume
it's also okay to sign your main key as well.
# Before You Start
When a Spending Policy is in effect, there are limitations
in effect:
- Firmware updates are blocked.
- There is no way to backup the COLDCARD.
- Seed vault and Secure Notes are read-only (and can also be hidden).
- Settings menu is inaccessible.
- BIP-39 passphrases may be blocked (optional).
We recommend getting the COLDCARD fully configured and setup
for typical transactions before enabling the Spending Policy.
# Setup Spending Policy
Visit `Advanced / Tools > Spending Policy` menu and choose
"Single-Signer". First some background information is shown,
then you are prompted to define the "Bypass PIN". This PIN code
is only used when you need to disable the spending policy, but is
also the only way to do so once enabled... so don't loose it.
Once the "Bypass PIN" is confirmed, you will arrive at menu for
related settings. Use "Edit Policy..." to change the spending policy
and define a Max Magnitude (limit number of BTC per transaction),
Velocity (minimum time gaps between signed transactions). You can
define a whitelist of up to 25 destination addresses (leave empty
for any). Finally you can enroll your phone in 2FA (second factor)
so that you must open an Authenticator app on your phone before
transactions are signed.
## Other Security Settings
In addition to policy itself, there are a number of on/off
switches which affect operation of the COLDCARD while the Spending
Policy is in effect:
### Word Check
If enabled, you will have to enter the first and last seed word
after the Bypass PIN as an additional security check.
### Allow Notes
On the Q, secure notes and passwords may be visible or hidden
using this setting. In either case they are strictly readonly.
### Related Keys
BIP-39 passphrase entry, Seed Vault usage will be blocked unless this
setting is enabled. Even when enabled, the Seed Vault is always readonly
and cannot be changed.
# Other Menu Items
## Last Violation
If you have recently tried and failed to sign a transaction, the
reason for the transaction being rejected can be viewed and cleared,
using menu item "Last Violation". It is shown only if a Spending
Policy violation (attempt) has occurred since the last valid signing.
This is meant as a debugging tool, and the information stored is
terse.
## Remove Policy
This will remove your spending policy completely and remove
the Bypass PIN. Your COLDCARD will be back to normal.
## Test Drive
Experiment with how the COLDCARD will function if the Spending
Policy was enabled. You can try to sign transactions that should
be rejected and view the menus in the new mode without rebooting.
Choose "EXIT TEST DRIVE" on top menu to return to the Spending
Policy menu. Reboot will also restore normal operation without
any special challenges.
## ACTIVATE
This step will enable the Spending Policy and return to the
main menu with it in effect. When you reboot the COLDCARD,
the policy will still be in effect. You must use the
Bypass PIN, followed by the normal main PIN, possibly
followed by entering the first and last words of your seed
phrase, before you can disable and change the policy.
We recommend test-driving the feature before doing that.
# Tips and Tricks
## Money Manager Mode
You could setup a Coldcard for another person, perhaps a family member,
and enable web 2FA authentication. There does not need to be any
other spending policy limits (velocity could be unlimited).
Then enroll your own phone with the required 2FA values, and
keep both that and the spending policy bypass PIN confidential.
The holder the the Coldcard will need a 2FA code from your phone
when they want to spend. They can call you for the 6-digit code
from the 2FA app on your phone. This is not hard to provide over a
voice call.
Because a spending policy is in effect, they will not be able to
see the seed words, other private key material, so regardless of
any spoofing or phishing, they cannot move funds without your help.
You should record the bypass PIN, so it can be revealed somehow,
should you die. You do not need to share the risks associated with
holding a copy of the seed words.
## Passphrase Considerations
If you are using the same BIP-39 passphrase for everything, you should
probably do a "Lock Down Seed" (Advanced/Tools > Danger Zone > Seed
Functions) first. This takes your master seed and BIP-39 passphrase
and cooks them together into an XPRV which then is stored as your
master secret. (Replacing the master seed phrase.) This process
cannot be reversed, so other funds you may have on the same seed
words are protected. Once you are operating in XPRV mode, you can
define a spending policy, and know that it is restricted to only
that wallet.
When operating in XPRV mode, the "Passphrase" menu item is not shown
because BIP-39 passwords cannot be applied to XPRV secrets.
## Trick PIN Thoughts
When doing your game theory w.r.t to bypass mode and this feature,
remember that you should assume the attacker already has your main
PIN. That's how they know they cannot spend all your coin, because
they either tried to, or noticed the menus are very limited. They also
have all your UTXO locations and total wallet balance (because they
can export your xpubs to any wallet and load balance from there).
Therefore, a trick pin that leads to a duress wallet after giving up
the bypass unlock PIN, will not fool them. Best would be to provide
a false bypass PIN that is in fact a brick/wipe PIN.
## Lock Out Changes to Policy
In the Trick Pin menu once Spending Policy has been enabled, you will
find the Bypass PIN listed. You could delete or "hide" it. Hiding
it is pointless since you cannot get to the trick PIN menu while
the policy is in effect. Deleting the PIN however, is useful because
it assures changes to spending policy are impossible. To recover
the COLDCARD when this move is later regretted, under Advanced,
there is "Destroy Seed" option which will clear the seed words and
all settings, including the spending policy.
### Unlock Policy & Wipe
We've provided a new trick PIN that pretends to be the unlock
spending policy pin, so the login sequence is correct... but it
will wipe the seed in the process. It will be obvious to your
attackers that you've wiped the seed because the main PIN will lead
to blank wallet now (no seed loaded).
### Delta Mode and Spending Policy
If, from the start, you gave your "delta mode PIN" to the attackers,
then when they bypass the policy (after also getting the bypass PIN
from you), they will still be in Delta Mode.
They could attempt unlimited spending, but transactions signed will
not be valid. If they try to view the seed words or generally export
private key material, they will hit many of the "wipe seed if delta
mode" cases.
## Forgotten Bypass PIN Code
If you've enabled a spending policy and still remember the main PIN,
but cannot disable the feature because you've forgotten the Bypass
PIN, your only option is to use `Advanced > Destroy Seed`. After
some confirmations, this erases the master seed, all settings, seed
vault items, secure notes, and trick pins. It's basically a factory
reset except for the main PIN code which is unchanged. Once you've
done that, you can enter your seed words from backup (or restore a
backup file) and continue to use the COLDCARD again.

122
docs/temporary-seeds.md Normal file
View File

@ -0,0 +1,122 @@
# Temporary Seeds
[_(new in v5.0.7, requires Mk4, Mk5, or Q)_](upgrade.md)
Temporary seed (renamed in `5.2.0` from Ephemeral seed) is a temporary secret completely separate
from the master seed, typically held in **COLDCARD<sup>&reg;</sup>** RAM and
not persisted between reboots in the Secure Element.
Temporary seeds *completely* defeat the design
of Coldcard's security model, based on secure elements.
Enable the `Seed Vault` feature to store these secrets longer-term.
Read more about `Seed Vault` feature below.
!!! warning "Make sure you know what you're doing!"
This feature is intended for those one-off signings, like recovering
a lost seed from some other system or importing some seed as a
balance check. We do not recommend handing unencrypted seed material
on a regular basis!
## Usage
* if temporary seed is already in use, first home menu option `[<xfp>]` is visible with fingerprint of temporary master secret
* go to `Advanced/Tools > Temporary Seed`
* temporary seed words can be Generated with TRNG
- `Advanced/Tools > Temporary Seed > Generate Words`
* temporary seed words can be imported
- `Advanced/Tools > Temporary Seed > Import Words`
* importing extended private keys
- `Advanced/Tools > Temporary Seed > Import XPRV`
- `Advanced/Tools > Temporary Seed > Tapsigner Backup`
* temporary seed can be activated from BIP-85 derived secrets - go to `Advanced/Tools > Derive Seed B85` and pick types of secret. Keep in mind that only word based and xprv based secrets can be used as temporary seed.
- `12 words`
- `18 words`
- `24 words`
- `XPRV (BIP-32)`
- pick derivation `Index` in next prompt, or just press OK for index 0
- Press (0) in next prompt to activate derived secret as a temporary seed
* temporary seed can be activated from Duress Wallet
- go to `Settings -> Login Settings -> Trick Pins`
- add new Duress Wallet trick pin and save it
- choose newly created trick pin in trick pins menu and use `Activate Wallet` option
* temporary seed can be obtained from `SeedXOR`
- go to `Advanced/Tools -> Danger Zone -> Seed Functions -> SeedXOR`
- pick `Restore Seed XOR` option and provide all XOR parts
- Press (2) to activate restored seed as temporary seed
* BIP-39 passphrase is from version `5.2.0` handled internally as temporary seed
Ability to generate and use **Temporary seed** is available on Coldcard when:
1. no PIN chosen and no secret chosen (newly unpacked Coldcard)
2. PIN set up but no secret chosen yet
3. with both PIN and secret already picked
# Restore Master
[_(new in v5.2.0, requires Mk4, Mk5, or Q)_](upgrade.md)
From version `5.2.0` users no longer need to reboot COLDCARD to return
to their "master seed" (one stored in SE2). Once COLDCARD has temporary
seed active, first item in home menu is `[xfp]` and is a clone of `Ready To Sign`.
Last item in home menu is `Restore Master`.
`Restore Master` offers two options. First, if user presses OK, COLDCARD wipes temporary seed settings
and switches back to master seed and its settings.
If user presses (1) temporary seed settings are preserved for later use and COLDCARD only switches
back to master seed and its settings.
If current temporary seed is also saved in Seed Vault, option to wipe settings is not available.
Seed Vault entries can only be deleted in Seed Vault menu.
# Seed Vault
[_(new in v5.2.0, requires Mk4, Mk5, or Q)_](upgrade.md)
Seed Vault adds the ability to store multiple temporary secrets into encrypted settings for simple
recall and later use (AES-256-CTR encrypted with your master seed's key).
Users can capture and hold master secret from any temporary seed source, including: TRNG, Dice Rolls,
SeedXOR, TAPSIGNER backups, BIP-85 derived values, BIP-39 passphrase wallets.
## Enable Seed Vault
Enable this functionality in `Advanced/Tools -> Danger Zone -> Seed Vault -> Enable`.
Once seed vault is enabled new menu item is visible in home menu `Seed Vault`.
To disable Seed Vault user needs to remove all entries from Seed Vault first.
## Add Seed to Vault
After `Seed Vault` is enabled, users will see a new prompt, after
creation of temporary seed, asking whether to save this temporary
seed to Seed Vault. Press (1) to save or any other key to ignore.
If option to save was chosen, confirmation prompt is shown - `Saved to seed vault.`
## Seed Vault menu
* if Seed Vault is empty `(none saved yet)` is the first menu item followed by shortcut to `Temporary Seed` menu.
* if not empty, saved seeds are listed in menu as `[xfp]`
* if current active temporary seed is stored in Seed Vault - it has checkmark next to it
* if temporary seed is active - last menu item of Seed Vault menu is `Restore Master`
## Seed Vault entry submenu
1. by default `[xfp]` but can be renamed to allow user labeling and leads to additional information about the seed
2. `Use This Seed` allows to switch to the saved temporary seed. If it is already active `In Use` is shown instead.
3. `Rename` allows to change 1. menu item to something personalized to user (limited to 40 characters)
4. `Delete` allows to remove temporary seed from Seed Vault and optionally to completely wipe its settings.

View File

@ -1,11 +1,12 @@
# Firmware Upgrade and Recovery Process # Firmware Upgrade and Recovery Process
_This document applies only to the Mk4. Earlier COLDCARDs did not use this approach._ _This document applies to the Mk4, Mk5, and Q. Earlier COLDCARDs did not use this approach._
On the new Mk4 COLDCARD, we have done away with the slow external On the COLDCARD, we have done away with the slow external SPI flash
SPI flash (serial flash) chip entirely. In it's place we use a much (serial flash) chip entirely (used in Mk1-Mk3). In it's place we
faster and huge 64 Mbit PSRAM chip (quad SPI RAM chip: ESP-PSRAM64H). use a much faster and huge 64 Mbit PSRAM chip (quad SPI RAM chip:
ESP-PSRAM64H).
This chip is volatile and forgets its contents at power down. This chip is volatile and forgets its contents at power down.
@ -14,7 +15,7 @@ can be a problem during firmware upgrades. This document explains
how we've solved the risks of firmware upgrades and possible bricking how we've solved the risks of firmware upgrades and possible bricking
that can happen with power fails at just the wrong time. that can happen with power fails at just the wrong time.
## Firmware Upgrade Process on Mk4 ## Firmware Upgrade Process
Steps: Steps:
@ -26,7 +27,7 @@ Steps:
- a checksum is calculated over the new firmware, and the current contents of - a checksum is calculated over the new firmware, and the current contents of
flash, including the bootloader code, its secrets, unique identity bits flash, including the bootloader code, its secrets, unique identity bits
(for the main chip). We call this the "world checksum". (for the main chip). We call this the "world checksum".
- before anything else happens, we update the main secure element (608B) with - before anything else happens, we update the main secure element (608C) with
the world checksum, and during boot, knowledge of the world checksum is required the world checksum, and during boot, knowledge of the world checksum is required
to light the green genuine light. to light the green genuine light.
- the light stays green at this point, and the system could still boot the old firmware - the light stays green at this point, and the system could still boot the old firmware
@ -79,7 +80,7 @@ to main flash. The PSRAM will forget it's contents, and the COLDCARD
no longer has a complete copy of firmware anywhere. no longer has a complete copy of firmware anywhere.
Most products would be a "brick" at this point, and the docs would Most products would be a "brick" at this point, and the docs would
warn against power fails during upgrade. However, the Mk4 can read warn against power fails during upgrade. However, the COLCARD can read
SD Cards to load replacement firmware. The card does not need to SD Cards to load replacement firmware. The card does not need to
be specially prepared, but we recommend erasing it, formating with be specially prepared, but we recommend erasing it, formating with
FAT32 and then copying just the firmware onto the card. FAT32 and then copying just the firmware onto the card.
@ -91,7 +92,7 @@ Once a card is inserted, a search is made for a suitable firmware file.
All DFU files will be considered, but you must provide the firmware All DFU files will be considered, but you must provide the firmware
file that you were attempting to upgrade to during the power failure, file that you were attempting to upgrade to during the power failure,
because the "world checksum" is calculated for each image found on because the "world checksum" is calculated for each image found on
the card. You will not be able to substitue a newer version of firmware. the card. You will not be able to substitute a newer version of firmware.
Of course, firmware factory signatures are checked as well. Of course, firmware factory signatures are checked as well.

97
docs/web2fa.md Normal file
View File

@ -0,0 +1,97 @@
# Web 2FA Authentication
How to support [RFC 6238](https://www.rfc-editor.org/rfc/rfc6238)
TOTP (Time based One Time Password) 2FA check, on our little embedded
device without a real-time clock?
Solution: Store the pre-shared secret in the COLDCARD, and send that
securely to a trusted webserver which knows the time and can do a
fancy UX. That webserver accepts the time-based-one-time 2FA numeric
code from the user, and if correct, reveals a secret
that can be used back on the COLDCARD to authorize an action.
For the Mk4, the secret is 8 digit numeric code to be entered,
for the COLDCARD Q, it is a QR code to be scanned.
### History / Background
The HSM feature uses HOTP tokens, which do not require a backend,
but are not as robust as time-based tokens.
Web2FA is available to be enabled as part of a Spending Policy,
both in Multisig and Single Signer modes. When enabled, you will be
prompted complete 2FA authentication after viewing the details of
the transaction to be signed. You will not be able to sign without
the correct code.
## How It Works
- Web backend has a ECC keypair, with pubkey known to CC firmware releases.
- Usual 2fa base32 secret is picked by CC and stored in CC (so that server is stateless)
- CC creates URL encrypted to the pubkey of server, containing args:
- shared secret for TOTP (same value as held in user's phone)
- the response nonce (32 bytes, shown as 64 hex chars, on Q; or 8 digits on Mk4)
to be revealed to the user on successful auth
- flag if Q model, so can provide a QR to be scanned in that case (rather than digits)
- some text label for what's being approved, which is presented to user so they can pick
correct 2fa shared secret.
- above is all encrypted in transit, and only the server can decrypt
- user is sent to that encrypted URL using NFC tap on the COLDCARD
- user arrives at server:
- shown label [which also indicates the server can be trusted, since only it could decrypt it]
- prompt for 6 digits from authenticator app
- does [RFC 6238](https://www.rfc-editor.org/rfc/rfc6238) 2FA check using current time
- checks using current time and the shared secret provided by CC, fails if wrong.
- time based failure: offer retry (they typed too slow / minor clock drift)
- can offer to retry, but also do some rate limiting (only one attempt per 30-sec period)
- server will store very recent responses so attacker cannot get two codes
in any 30sec period (ie. blocks immediate reuse of same URL)
- until a valid code is given, user is stuck here
- when valid token received:
- if Q, show a QR code to be scanned, with the full nonce
- for non-Q system, a 8-digit decimal value is given: user has to enter that into the COLDCARD
- web site shows instructions about what to do next on product.
## From COLDCARD PoV
- makes complex encrypted URL, which contains a nonce it wants, waits for that nonce back (or QR)
- it's either the nonce from the URL, or fail
- if the right nonce, then we know the server knows the decryption key, and we
are trusting it actually verify the 2FA token properly.
## Encryption - Simple ECDH
- CC picks a secp256k1 keypair, generates compressed pubkey
- multiplies that private key by server's known public key
- apply sha256(resulting coordinate) => the session key
- apply AES-256-CTR over URL contents (ascii text)
- prepend 33 bytes of pubkey, and then base64url encode all of it
- full url is: `https://coldcard.com/2fa?{base64 encoded binary}`
## Trust Issues
- 2FA enrol happens on the CC, which picks the shared secret and shows QR for mobile
app setup. Same TRNG process as picking a seed.
- Server knows the shared secret, but only during operation, and we won't store it [sorry,
gotta trust us on that, but no help to us to store it].
- Only we can run the server, because the private key is company-secret.
- MiTM and network snoopers get nothing because HTTPS is used and only your browser
can see the nonce, and only after you've given the right digits.
- Coinkite server could skip the 2FA checks and just give you the answer
you want to type into the COLDCARD. Again, you have to trust us on that.
## URL Format
https://coldcard.com/2fa?g={nonce}&ss={shared_secret}&nm={label_text}&q={is_q}
(the query string is then encrypted to the server's pubkey, so the args above
are what is inside the encrypted payload.)
- `nonce`: text string that is either 8 digits on Mk4, or 64 hex chars on Q
- `shared_secret`: 16 chars of Base32-encoded pre-shared secret
- `nm`: human readable label for the transaction/purpose
- `is_q`: flag indicating use of QR to provide nonce back to user
Server will accept plaintext arguments as above, but normally everything
after the question mark is encrypted.

2
external/README.md vendored
View File

@ -1,7 +1,7 @@
## Background on Submodules ## Background on Submodules
This project uses many submodules, and to build the final produts, you will This project uses many submodules, and to build the final products, you will
have to get all the submodules into place and build them in appropriate orders. have to get all the submodules into place and build them in appropriate orders.
A good resource, from an unrelated project, is: A good resource, from an unrelated project, is:

@ -1 +1 @@
Subproject commit 2216e4db0e2dd17ca16bd8772d09c69f6296f6df Subproject commit 3d1dfa858beb58b8dac37d8c66d7aed2909812f2

2
external/libngu vendored

@ -1 +1 @@
Subproject commit 356b9137cf7ddf5de66ec4cdc0a4d757b2e42790 Subproject commit 537519a829259622ea6b0334fbafd6cae852852f

@ -1 +1 @@
Subproject commit abf88c98b6ee9897b6fcc8ffea0276f07447dd48 Subproject commit 4107246f8a080807b62c3b4838e71e812ea68b6f

2
external/mpy-qr vendored

@ -1 +1 @@
Subproject commit 3ccf19ca142e9059904f0c8e53b6baeccb9c6b79 Subproject commit 11347d83f4eb325b10676a4eb8e17deccfe0df44

View File

@ -1,15 +1,16 @@
# (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC. # (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC.
all: graphics.py graphics_mk4.py all: graphics_mk4.py graphics_q1.py
SOURCES = $(filter-out mk4_%, $(wildcard *.txt) $(wildcard *.png)) MK4_SOURCES = $(wildcard mono/*.txt) $(wildcard mono/*.png)
MK4_SOURCES = $(wildcard mk4_*.txt) $(wildcard mk4_*.png) Q1_SOURCES = colour/*.???
graphics.py: Makefile $(SOURCES) build.py
./build.py graphics.py $(SOURCES)
graphics_mk4.py: Makefile $(MK4_SOURCES) build.py graphics_mk4.py: Makefile $(MK4_SOURCES) build.py
./build.py graphics_mk4.py $(MK4_SOURCES) ./build.py graphics_mk4.py $(MK4_SOURCES)
graphics_q1.py: Makefile $(Q1_SOURCES) compress.py
./compress.py graphics_q1.py $(Q1_SOURCES)
up: all up: all
(cd ../shared; make up) (cd ../shared; make up)

View File

@ -33,7 +33,7 @@ def read_text(fname):
def read_img(fn): def read_img(fn):
img = Image.open(fn) img = Image.open(fn)
w,h = img.size w,h = img.size
assert 1 <= w < 128, w assert 1 <= w < 128, (w, fn)
img = img.convert('L') img = img.convert('L')
# fix colour issues: assume minority colour is white (1) # fix colour issues: assume minority colour is white (1)
@ -88,7 +88,7 @@ class Graphics:
assert img.mode == '1' assert img.mode == '1'
#img.show() #img.show()
varname = fn.split('.')[0].replace('-', '_') varname = fn.split('/')[-1].split('.')[0].replace('-', '_')
w,h = img.size w,h = img.size
raw = img.tobytes() raw = img.tobytes()

BIN
graphics/colour/nfc_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
graphics/colour/nfc_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
graphics/colour/scan_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
graphics/colour/scan_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
graphics/colour/scan_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
graphics/colour/scan_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
graphics/colour/scan_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
graphics/colour/splash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

212
graphics/compress.py Executable file
View File

@ -0,0 +1,212 @@
#!/usr/bin/env python3
#
# (c) Copyright 2023 by Coinkite Inc. This file is covered by license found in COPYING-CC.
#
# Read in PNG (or even JPG) and output heavily compressed RGB565 data suited to Q1's LCD panel.
#
# - also renders status bar icons/indicators
#
import os, sys, pdb
from PIL import Image, ImageOps, ImageFont, ImageDraw
import zlib
from struct import pack
WBITS = -10
FONT_PATH = './fonts/'
def read_img(fn):
img = Image.open(fn)
w,h = img.size
assert 1 <= w <= 320, f'too wide; {w}'
assert 1 <= h <= 240, f'too tall: {h}'
img = img.convert('RGB')
# maybe: quantitize to a reasonable num colours, so compression
# can work better?
return img
def compress(n, wbits=WBITS):
# NOTE: neg wbits implies no zlib header, and receiver may need to know it?
z = zlib.compressobj(wbits=wbits, level=zlib.Z_BEST_COMPRESSION)
rv = z.compress(n)
rv += z.flush(zlib.Z_FINISH)
return rv
def crunch(n):
# try them all... not finding any difference tho.
a = [(wb,compress(n, wb)) for wb in range(-9, -15, -1)]
a.sort(key=lambda i: (-len(i[1]), -i[0]))
print("Wbit values:")
print('\n'.join("%3d => %d" % (wb,len(d)) for wb,d in a))
return a[0]
# LCD Display wants RGB565 values, but big endian, so green gets split weird.
def swizzle(r,g,b):
# from 0-255 per component => two bytes
b = (b >> 3)
g = (g >> 3) # should be >> 2 for 6 bits; but looks trash?
r = (r >> 3)
return pack('>H', ((r<<11) | (g<<6) | b))
# these values tested on real hardware
assert swizzle(255, 0, 0) == b'\xf8\x00' # red
##assert swizzle(0, 255, 0) == b'\xc0\x0f' # green (6 bits)
assert swizzle(0, 255, 0) == b'\x07\xc0' # green (5 bits)
assert swizzle(0, 0, 255) == b'\x00\x1f' # blue
def into_bgr565(img):
# get the raw bytes needed for this specific display
rv = bytearray()
for y in range(img.height):
for x in range(img.width):
px = img.getpixel((x, y))
assert len(px) == 3
r,g,b = px
rv.extend(swizzle(r,g,b))
return rv
def make_icons():
# return list of (varname, img) for each image
# - see shared/lcd_display.py TOP_MARGIN for this
ICON_SIZE = 14
MAX_HEIGHT = 14
# PROBLEM: this file costs money... altho free version looks okay too
try:
awesome = ImageFont.truetype(FONT_PATH + 'Font Awesome 6 Sharp-Regular-400.otf', ICON_SIZE)
except:
raise
# use a bitmap font for best readability
sm_font = ImageFont.load('ter-powerline-x12b.pil')
targets = [
#( 'brand', True, 'Q', dict(col='#ffb000') ),
( 'shift', True, 'SHIFT', {} ),
( 'symbol', True, 'SYM', {} ),
( 'caps', True, 'CAPS', {} ),
( 'bip39', True, 'PASSPHRASE', dict(col_1='yellow') ),
( 'tmp', True, 'TMP.SEED', dict(col_0='black', col_1='red') ),
( 'devmode', True, 'DEV', dict(col='#66E6FF') ),
( 'edge', True, 'EDGE', dict(col='#66E6FF') ),
( 'bat_0', False, '\uf244', dict(col='red', y=-1, pad=1)),
( 'bat_1', False, '\uf243', dict(col='yellow', y=-1, pad=1)),
( 'bat_2', False, '\uf242', dict(col='amber', y=-1, pad=1)),
( 'bat_3', False, '\uf240', dict(col='amber', y=-1, pad=1)),
( 'plugged', False, '\uf1e6', dict(col='amber', x=3, w=16, y=-2)), # to match width of bat_*
#( 'locked', False, '\uf023', dict(col='green')),
#( 'unlocked', False, '\uf3c1', dict(col='green')), # why tho?
]
targets += [ ( 'ch_'+c, True, c.upper(), dict(col='white') ) for c in
'0123456789abcdef']
samples = Image.new('RGB', (320*3, ICON_SIZE+1))
s_x = 5
for basename, is_text, body, opts in targets:
for state in [0, 1]:
col = opts.get('col', '#fff' if state else '#444')
vn = f'{basename}_{state}'
if 'col' in opts:
if state == 0: continue
vn = basename
if state == 0 and 'col_0' in opts:
col = opts['col_0']
if state == 1 and 'col_1' in opts:
col = opts['col_1']
img = Image.new('RGB', (100,100))
d = ImageDraw.Draw(img)
f = sm_font if is_text else awesome
x, y = (0, 1 if is_text else 0)
y += opts.get('y', 0)
x += opts.get('x', 0)
tl = (x, y)
_,_, w,h = d.textbbox(tl, body, font=f)
w = opts.get('w', w)
if h > MAX_HEIGHT:
h = MAX_HEIGHT
print(f'"{vn}" too tall, cropped')
elif opts.get('pad'):
h = MAX_HEIGHT
if col == 'amber':
# brand colour
col = '#ffb000'
d.text(tl, body, font=f, fill=col)
rv = img.crop( (0, 0, w,h) )
samples.paste(rv, (s_x, 0))
s_x += w + 10
yield (vn, rv)
samples = samples.crop( (0,0, s_x, samples.height ))
samples.save('icon-samples.png')
def doit(outfname, fnames):
assert outfname.endswith('.py')
assert outfname != 'compress.py'
assert fnames, "need some files"
fp = open(outfname, 'wt')
fp.write("""\
# autogenerated; don't edit
#
# BGR565 pixel data
#
class Graphics:
# (w,h, data)
""")
fnames += make_icons()
for fn in fnames:
if isinstance(fn, str):
img = read_img(fn)
varname = fn.split('/')[-1].split('.')[0].replace('-', '_')
else:
varname, img = fn
assert img.mode == 'RGB'
w,h = img.size
raw = into_bgr565(img)
comp = compress(raw)
#crunch(raw)
print(" %s = (%d, %d,\n %r\n )\n" % (varname, w, h, comp), file=fp)
print("done: '%s' (%d x %d) => %d raw => %d compressed bytes" % (
varname, w, h, len(raw), len(comp)))
fp.write("\n# EOF\n")
if 1:
doit(sys.argv[1], sys.argv[2:])
# EOF

View File

@ -1,4 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
#
# Generate some data for hsm_ux.py animation
#
from math import sin, pi from math import sin, pi
from collections import Counter from collections import Counter

3
graphics/fonts/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Font Awesome 6*.otf
iosevka-*.ttf
!iosevka-heavy.ttf

11
graphics/fonts/README.md Normal file
View File

@ -0,0 +1,11 @@
# Fonts for Q1
This directory may contain font files from Font Awesome.
We cannot re-distribute the OTF files themselves due to their license.
However, once we render and build the compressed graphics file that we need,
the font is not required anymore.
Iosveka is open and can be re-distributed here.

View File

@ -0,0 +1,18 @@
Font Awesome Pro License
------------------------
Font Awesome Pro is commercial software that requires a paid license. Full
Font Awesome Pro license: https://fontawesome.com/license.
# Commercial License
The Font Awesome Pro commercial license allows you to pay for FA Pro once, own
it, and use it just about everywhere you'd like.
# Attribution
Attribution is not required by the Font Awesome Pro commercial license.
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**

Binary file not shown.

View File

@ -1,27 +0,0 @@
# autogenerated; don't edit
#
class Graphics:
# (w,h, w_bytes, wbits, data)
arrow_down = (7, 11, 1, 0, b'\x10\x10\x10\x10\x10\x10\x10\xfe|8\x10')
arrow_up = (7, 11, 1, 0, b'\x108|\xfe\x10\x10\x10\x10\x10\x10\x10')
box = (13, 21, 2, 0, b'?\xe0@\x10\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08@\x10?\xe0')
scroll = (3, 61, 1, 0, b'@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@@\xe0@')
selected = (15, 12, 2, 0, b'\x00\x00\x00\x00\x00\x06\x00\x0c\x00\x18\x0000`\x18\xc0\r\x80\x07\x00\x02\x00\x00\x00')
sm_box = (11, 17, 2, 0, b'\xe4\xe0\x80 \x80 \x80 \x00\x00\x00\x00\x80 \x00\x00\x00\x00\x00\x00\x80 \x00\x00\x00\x00\x80 \x80 \x80 \xe4\xe0')
space = (9, 2, 2, 0, b'\x80\x80\xff\x80')
spin = (13, 36, 2, 0, b'\x02\x00\x07\x00\x0f\x80\x1f\xc0\x00\x00\x00\x00\x00\x00\xf2x\x80\x08\x80\x08\x80\x08\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x80\x08\x80\x08\x80\x08\xf2x\x00\x00\x00\x00\x00\x00\x1f\xc0\x0f\x80\x07\x00\x02\x00\x00\x00')
wedge = (6, 11, 1, 0, b'\x00\x00\xc0\xe0p8\x1c8p\xe0\xc0')
xbox = (13, 21, 2, 0, b'?\xe0b0\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88b0?\xe0')
# EOF

View File

@ -3,6 +3,12 @@
class Graphics: class Graphics:
# (w,h, w_bytes, wbits, data) # (w,h, w_bytes, wbits, data)
arrow_down = (7, 11, 1, 0, b'\x10\x10\x10\x10\x10\x10\x10\xfe|8\x10')
arrow_up = (7, 11, 1, 0, b'\x108|\xfe\x10\x10\x10\x10\x10\x10\x10')
box = (13, 21, 2, 0, b'?\xe0@\x10\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08\x80\x08@\x10?\xe0')
mk4_nfc_1 = (126, 49, 16, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xfe\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xfe\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') mk4_nfc_1 = (126, 49, 16, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xfe\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xfe\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
mk4_nfc_2 = (118, 49, 15, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00') mk4_nfc_2 = (118, 49, 15, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00')
@ -11,5 +17,27 @@ class Graphics:
mk4_nfc_4 = (102, 49, 13, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\x9f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\x8f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00') mk4_nfc_4 = (102, 49, 13, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xcf\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x03\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\x9f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\x8f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00')
mk5_nfc_1 = (126, 49, 16, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xf0\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff\xfe0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff\xfe0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xfe\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\xfe\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
mk5_nfc_2 = (118, 49, 15, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xf0\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\xe0\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\xe0\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\xe0\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe00\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00\xe0?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\xff\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00')
mk5_nfc_3 = (110, 49, 14, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xf0\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x00\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x00\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x00\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e\x000\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xff0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e\x000\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x000\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e\x000\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xff0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x000\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e\x00?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\xff\x0f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00\x00')
mk5_nfc_4 = (102, 49, 13, 0, b'\x00\x7f\xff\xff\xff\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xf0\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xf0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x0e\x03\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xe0\x0e\x07\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xe0\x0e\x1f\xff\xff\xff\xff\xff\xff\xff\xff\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 G\xe3\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xe0\x0e0\x000D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00(D\x04\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xff\xff\xb0\x00$G\xe4\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00"D\x04\x00\x00\x00xp\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00 \xc4\x04\x00\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x04\x10\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xff\xff\xb0\x00 D\x03\xe0\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e0\x00\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\xe0\x0e?\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\x9f\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xff\xff\x8f\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7f\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00?\xff\xff\xff\xf8\x00\x00\x00\x00\x00\x00\x00')
scroll = (3, 61, 1, 0, b'@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@\x00\x00@@\xe0@')
selected = (9, 12, 2, 0, b'\x00\x00\x00\x00\x00\x80\x01\x80\x01\x00\x03\x00\x82\x00\xc6\x00d\x00<\x00\x18\x00\x00\x00')
sm_box = (11, 17, 2, 0, b'\xe4\xe0\x80 \x80 \x80 \x00\x00\x00\x00\x80 \x00\x00\x00\x00\x00\x00\x80 \x00\x00\x00\x00\x80 \x80 \x80 \xe4\xe0')
space = (9, 2, 2, 0, b'\x80\x80\xff\x80')
spin = (13, 36, 2, 0, b'\x02\x00\x07\x00\x0f\x80\x1f\xc0\x00\x00\x00\x00\x00\x00\xf2x\x80\x08\x80\x08\x80\x08\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x00\x00\x80\x08\x00\x00\x00\x00\x80\x08\x80\x08\x80\x08\xf2x\x00\x00\x00\x00\x00\x00\x1f\xc0\x0f\x80\x07\x00\x02\x00\x00\x00')
wedge = (6, 11, 1, 0, b'\x00\x00\xc0\xe0p8\x1c8p\xe0\xc0')
xbox = (13, 21, 2, 0, b'?\xe0b0\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88\xa2(\x88\x88b0?\xe0')
# EOF # EOF

173
graphics/graphics_q1.py Normal file

File diff suppressed because one or more lines are too long

BIN
graphics/icon-samples.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,49 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx xxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxx xxx xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx xxx xxx yy nn n f c c yyyyyyyyyyy
xxx xxx xxx xxx yy nn n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxx xxx xxx xxx yy n n n f c yyyy yyy
xxx xxx xxx xxx yy n n n f c yyyy yyy
xxx xxx xxx xxx yy n nn f c yyyyyyyyyyy
xxx xxx xxx xxx yy n nn f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxx xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -0,0 +1,49 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx xxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxx xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx xxx yy nn n f c c yyyyyyyyyyy
xxx xxx xxx yy nn n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxx xxx xxx yy n n n f c yyyy yyy
xxx xxx xxx yy n n n f c yyyy yyy
xxx xxx xxx yy n nn f c yyyyyyyyyyy
xxx xxx xxx yy n nn f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx yy yyyyyyyyyyy
xxx xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -0,0 +1,49 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx yy nn n f c c yyyyyyyyyyy
xxx xxx yy nn n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n n f c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxx xxx yy n n n f c yyyy yyy
xxx xxx yy n n n f c yyyy yyy
xxx xxx yy n nn f c yyyyyyyyyyy
xxx xxx yy n nn f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -0,0 +1,49 @@
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx xxxx xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxx xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy yyyyyyyyyyy
xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx yy n n ffffff ccccc yyyyyyyyyyy
xxx xxx yy nn n f c c yyyyyyyyyyy
xxx xxx yy nn n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n n f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n n f c yyyy yyy
xxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxxxxxxxxxxxxxxxx yy n n n ffffff c yyyy yyy
xxx xxx yy n n n f c yyyy yyy
xxx xxx yy n n n f c yyyy yyy
xxx xxx yy n nn f c yyyyyyyyyyy
xxx xxx yy n nn f c yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n f c c yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxxxxxxxxxxxxxxxx yy n n f ccccc yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yy yyyyyyyyyyy
xxx xxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

View File

@ -0,0 +1,12 @@
X
XX
X
XX
X X
XX XX
XX X
XXXX
XX

View File

@ -1,12 +0,0 @@
xx
xx
xx
xx
xx xx
xx xx
xx xx
xxx
x

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

View File

@ -1,4 +1,3 @@
# Coldcard Hardware Details # Coldcard Hardware Details
This directory contains enough information for you to be able to This directory contains enough information for you to be able to
@ -6,9 +5,20 @@ build your own Coldcard from off-the-shelf parts.
We are sharing this information for the benefit of security We are sharing this information for the benefit of security
researchers who wish to analyse the Coldcard more completely. researchers who wish to analyse the Coldcard more completely.
# Schematic # Schematic
![](schematic-q1d.png)
`schematic-q1d.png`
This is the Q rev D schematic.
![](schematic-mark5f.png)
`schematic-mark5f.png`
This is the Mark4 rev F schematic.
![](schematic-mark4d.png) ![](schematic-mark4d.png)
`schematic-mark4d.png` `schematic-mark4d.png`
@ -24,11 +34,13 @@ This is the Mark3 rev B schematic.
# BOM - Bill of Materials # BOM - Bill of Materials
`bom-mark3b.xlsx` The parts used in the Coldcard are detailed in these spreadsheets.
Most of them could be bought on Digikey, but some are direct from suppliers.
The parts used in the Coldcard are detailed in this spreadsheet file. - BOM for Q rev D: `bom-q1d.xlsx`
All of them could be bought on Digikey, and where we know - BOM for Mk5 rev F: `bom-mark5f.xlsx`
it, we've included the Digikey SKU. - BOM for Mk4 rev D: `bom-mark4d.xlsx`
- BOM for Mk3 rev B: `bom-mark3b.xlsx`
Not included are these minor bits: Not included are these minor bits:
@ -36,14 +48,10 @@ Not included are these minor bits:
- the secure bag (with barcode serial number) - the secure bag (with barcode serial number)
- pin-recovery card - pin-recovery card
`bom-mark4d.xlsx`
- Same for Mk4 rev D.
# Important # Important
- No promises that these files are 100% current because we do make quality improvements. - No promises that these files are 100% current because we constantly make quality improvements.
- Copyright of these files, and all design elements of the Coldcard remain with Coinkite Inc. - Copyright of these files, and all design elements of the Coldcard remain with Coinkite Inc.
- This information is for research and testing purposes only&mdash;no warranties. - This information is for research and testing purposes only&mdash;no warranties.
- **Coinkite does not grant license of this information for comercial use.** - **Coinkite does NOT grant license of this information for comercial use.**

BIN
hardware/bom-mark5f.xlsx Normal file

Binary file not shown.

BIN
hardware/bom-q1d.xlsx Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

BIN
hardware/schematic-q1d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 KiB

View File

@ -1,26 +1,28 @@
diff --git a/mpy-cross/Makefile b/mpy-cross/Makefile diff --git a/mpy-cross/Makefile b/mpy-cross/Makefile
index 971f2f81a..b175c4dc7 100644 index 971f2f81a..0c25a11e0 100644
--- a/mpy-cross/Makefile --- a/mpy-cross/Makefile
+++ b/mpy-cross/Makefile +++ b/mpy-cross/Makefile
@@ -17,7 +17,7 @@ INC += -I$(BUILD) @@ -17,7 +17,8 @@ INC += -I$(BUILD)
INC += -I$(TOP) INC += -I$(TOP)
# compiler settings # compiler settings
-CWARN = -Wall -Werror -CWARN = -Wall -Werror
+CWARN = -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=array-bounds +CWARN = -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=array-bounds
+CWARN += -Wno-error=unknown-warning-option
CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith
CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
diff --git a/ports/unix/Makefile b/ports/unix/Makefile diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 6a936a242..6b4900561 100644 index 6a936a242..43e6bf02a 100644
--- a/ports/unix/Makefile --- a/ports/unix/Makefile
+++ b/ports/unix/Makefile +++ b/ports/unix/Makefile
@@ -38,7 +38,7 @@ INC += -I$(TOP) @@ -38,7 +38,8 @@ INC += -I$(TOP)
INC += -I$(BUILD) INC += -I$(BUILD)
# compiler settings # compiler settings
-CWARN = -Wall -Werror -CWARN = -Wall -Werror
+CWARN = -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=array-bounds +CWARN = -Wall -Werror -Wno-error=unused-but-set-variable -Wno-error=array-bounds
+CWARN += -Wno-error=unknown-warning-option -Wno-error=deprecated-non-prototype -Wno-error=bitwise-instead-of-logical
CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith -Wdouble-promotion -Wfloat-conversion CWARN += -Wextra -Wno-unused-parameter -Wpointer-arith -Wdouble-promotion -Wfloat-conversion
CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) -I$(VARIANT_DIR) $(CFLAGS_EXTRA) CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) -I$(VARIANT_DIR) $(CFLAGS_EXTRA)

View File

@ -9,7 +9,6 @@ font_files = {
} }
# test with: # test with:
#
# ./build.py build --portable && ./testit.py --msg "hello→world←\n↳this\n•Bullet\n•Text" -f small # ./build.py build --portable && ./testit.py --msg "hello→world←\n↳this\n•Bullet\n•Text" -f small
# #
special_chars = dict(small=[ special_chars = dict(small=[
@ -65,5 +64,19 @@ special_chars = dict(small=[
xxxxx xxxxx
'''), '''),
('', dict(y=0), '''\
x x x x x
'''),
# thin space
('\u2009', dict(y=0, w=5), '''\
'''),
]) ])

10
misc/gpu/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# build products, see Makefile:
gpu.lss
gpu.sym
gpu.bin.tmp
checksums.txt
version-full.txt
version.txt

184
misc/gpu/Makefile Normal file
View File

@ -0,0 +1,184 @@
# (c) Copyright 2023 by Coinkite Inc. This file is covered by license found in COPYING-CC.
#
# Makefile for Q1's GPU co-processor.
#
# Targets:
# all - make everything, look for dafu.elf inparticular
# clean - delete intermediates
# clobber - delete all build products
#
# Toolchain
TOOLCHAIN = arm-none-eabi-
CC = $(TOOLCHAIN)gcc
OBJDUMP = $(TOOLCHAIN)objdump
OBJCOPY = $(TOOLCHAIN)objcopy
NM = $(TOOLCHAIN)nm
SIZE = $(TOOLCHAIN)size
# Basename of all targets
TARGET_NAME = gpu
# Source files, listed here as the object files they will become.
OBJS += startup.o
OBJS += main.o lcd.o version.o interrupts.o
OBJS += stm32c0xx_ll_gpio.o stm32c0xx_ll_spi.o stm32c0xx_ll_i2c.o stm32c0xx_ll_utils.o
# Have to have copies of these because the DMA and interrupt stuff
# needs to be commented-out.
#OBJS += stm32l4xx_hal_gpio.o stm32l4xx_hal_spi.o
#OBJS += stm32l4xx_hal_rcc.o stm32l4xx_hal_rcc_ex.o
# Where we will end up in the memory map (at start of flash)
GPU_FLASH_BASE = 0x08000000
GPU_FLASH_SIZE = 0x4000
GPU_FLASH_LAST = 0x08004000
# Use all of 6k of SRAM...
GPU_SRAM_BASE = 0x20000000
GPU_SRAM_SIZE = 0x00001800
# Compiler flags.
CFLAGS = -I. -Wall --std=gnu99 -Os -g3 \
-mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=soft -mtune=cortex-m0 \
-ffunction-sections -fdata-sections \
-mcpu=cortex-m0 -DMCU_SERIES_C0 -DSTM32C011xx \
-DUSE_FULL_LL_DRIVER
#-DUSE_HAL_DRIVER
# Pass in the locations of stuff
CFLAGS += -D GPU_FLASH_BASE=$(GPU_FLASH_BASE) -D GPU_FLASH_SIZE=$(GPU_FLASH_SIZE)
CFLAGS += -D GPU_SRAM_BASE=$(GPU_SRAM_BASE) -D GPU_SRAM_SIZE=$(GPU_SRAM_SIZE)
# Header file search path
INC_PATHS = external/cmsis_device_c0/Include \
external/stm32c0xx_hal_driver/Inc \
../../external/micropython/lib/cmsis/inc
CFLAGS += $(foreach INC,$(INC_PATHS),-I$(INC))
# Specialized linker-script here. Not the standard one!
#
LINKER_SCRIPT = link-script.ld
LDFLAGS += -Wl,-T$(LINKER_SCRIPT)
LDFLAGS += -flto -Wl,--gc-sections --specs=nano.specs
LDFLAGS += -Wl,--defsym,GPU_FLASH_BASE=$(GPU_FLASH_BASE)
LDFLAGS += -Wl,--defsym,GPU_FLASH_SIZE=$(GPU_FLASH_SIZE)
LDFLAGS += -Wl,--defsym,GPU_SRAM_BASE=$(GPU_SRAM_BASE)
LDFLAGS += -Wl,--defsym,GPU_SRAM_SIZE=$(GPU_SRAM_SIZE)
LDFLAGS += -Wl,-Map=$(TARGET_NAME).map
ASFLAGS += -Wa,--defsym,GPU_FLASH_BASE=$(GPU_FLASH_BASE) -Wa,--defsym,GPU_FLASH_SIZE=$(GPU_FLASH_SIZE)
ASFLAGS += -Wa,--defsym,GPU_SRAM_BASE=$(GPU_SRAM_BASE) -Wa,--defsym,GPU_SRAM_SIZE=$(GPU_SRAM_SIZE)
TARGET_ELF = $(TARGET_NAME).elf
TARGETS = $(TARGET_NAME).lss $(TARGET_NAME).bin $(TARGET_NAME).sym gpu_binary.py
all: $(TARGETS)
# recompile on any Makefile change, because with a small project like this...
$(OBJS): Makefile
$(TARGETS): $(TARGET_ELF) Makefile
# link step
$(TARGET_ELF): $(OBJS) $(LINKER_SCRIPT) Makefile
$(CC) $(CFLAGS) -o $(TARGET_ELF) $(LDFLAGS) $(OBJS)
$(SIZE) -Ax $@
# detailed listing, very handy
%.lss: $(TARGET_ELF)
$(OBJDUMP) -h -S $< > $@
# symbol dump, meh
%.sym: $(TARGET_ELF)
$(NM) -n $< > $@
# raw binary, forced to right size, pad w/ 0xff
%.bin: $(TARGET_ELF)
$(OBJCOPY) -O binary --gap-fill 0xff $< $@
# assumes openocd running from current directory
up:
echo 'flash write_image $(TARGET_ELF)' | nc localhost 4444
# make a 'release' build
release: code-committed clean all capture
release: CFLAGS += -DRELEASE=1 -Werror
.PHONY: code-committed
code-committed:
@echo ""
@echo "Are all changes commited already?"
git diff --stat --exit-code .
@echo '... yes'
# these files are what we capture and store for each release.
DELIVERABLES = $(TARGET_NAME).bin $(TARGET_NAME).lss gpu_binary.py
# package the binary into a mpy file to be frozen/included into main micro code
gpu_binary.py: version.txt $(TARGET_NAME).bin repackage.py
./repackage.py `cat version.txt` $(TARGET_NAME).bin > $@
wc -c $(TARGET_NAME).bin
checksums.txt: $(DELIVERABLES)
shasum -a 256 $(DELIVERABLES) > $@
lcd.o: barcode.h
barcode.h: make_barcode.py Makefile
python3 make_barcode.py
# Track released versions
.PHONY: capture
capture: version.txt version-full.txt $(DELIVERABLES) checksums.txt
V=`cat version.txt` && cat checksums.txt > releases/$$V.txt && cat version-full.txt >> releases/$$V.txt && mkdir -p releases/$$V; cp $(DELIVERABLES) releases/$$V
@echo
@echo " Version: " `cat version.txt`
@echo
V=`cat version.txt` && git tag -am "Q1 GPU version $$V" "q1-gpu-"$$V
git add -f releases/*/gpu.* releases/*.txt releases/*/*.py
# Pull out the version string from binary object (already linked in) and
# construct a text file (version.txt) with those contents
version.txt version-full.txt: version.o Makefile
$(OBJCOPY) -O binary -j .rodata.version_string version.o version-tmp.txt
cat version-tmp.txt | sed -e 's/ .*//' | sed -e 's/ .*//' > version.txt
cat version-tmp.txt | tr '\0' '\n' > version-full.txt
@echo
@echo "Version string: " `cat version-full.txt`
@echo
$(RM) version-tmp.txt
# nice version numbers.
BUILD_TIME = $(shell date '+%Y%m%d.%H%M%S')
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
SHA_VERSION = $(shell git rev-parse --short HEAD)
GIT_HASH = "$(BRANCH)@$(SHA_VERSION)"
version.o: CFLAGS += -DBUILD_TIME='"$(BUILD_TIME)"' -DGIT_HASH='$(GIT_HASH)'
version.o main.o: Makefile version.h
clean:
$(RM) $(OBJS)
clobber: clean
$(RM) $(TARGETS)
# In another window:
#
# openocd-stm -s /usr/local/Cellar/open-ocd/0.12.0/share/openocd/scripts -f openocd-gpu.cfg
#
# Can do:
# - "load" which writes the flash (medium speed, lots of output on st-util)
# - "cont" starts/continues system
# - "br main" sets breakpoints
# - "mon reset" to reset micro
# - and so on
#
debug:
arm-none-eabi-gdb $(TARGET_ELF) -x gogo.gdb
tags:
ctags -f .tags *.[ch] -R $(INC_PATHS)
# EOF

97
misc/gpu/README.md Normal file
View File

@ -0,0 +1,97 @@
# GPU on Q1
The name is a joke. It's not a GPU, just a very simple and cheap micro that can
animate a progress bar. And that's all we want it to do.
It is field upgradable, but we will remove that and start locking it down in
production once it's features are stable.
## Hardware
It's a STM32C011F4:
- 16k bytes of Flash
- 6k bytes of RAM
- 4-48Mhz
- 18 GPIO
- 20 pins
- a newer part, so some challenges there
Of the two TagConnect spots, the GPU is the inboard one; other is for main micro.
## OpenOCD
Version 0.12.0 of OpenOCD, the latest release as of this writing, does not yet support this chip.
You'll need to compile from ST Micro's fork of OpenOCD. In particular we need
this diff:
<https://github.com/STMicroelectronics/OpenOCD/commit/21c81a2b2edf5402afbba8c22feaeda6f626554e>
I am using brew's install of normal 0.12.0 for config files, and
a compiled version named `openocd-stm`, so my command line is:
openocd-stm -s /usr/local/Cellar/open-ocd/0.12.0/share/openocd/scripts -f openocd-gpu.cfg
Useful commands:
flash erase_sector 0 0 last
Set EMPTY bit, so goes into BL:
> mdw 0x40022000
0x40022000: 00040600
> mmw 0x40022000 0x10000 0
> mdw 0x40022000
0x40022000: 00050600
## In-Circuit Programming
- AN4221 describes the protocol used to load the flash
- timing is sensitive, but more important is where the i2c start/stops fall:
## First Time Boot
- on a fresh device, there is an `EMPTY` bit set on power-up (only) if flash looks empty
- this causes bootmode to happen, regardless of subsequent flash contents, resets, and `BOOT0` line
- so must clear bit 16 of `FLASH_ACR` after loading image: @ `0x40022000`
- also, main micro has control over `BOOT0` (PE2) which stop main flash from running too
- and the reset line on E6
- we use this flag to get into boot mode from working code
## Getting BOOT0 to work
- default config in flash bit (option bytes) is to
- see `FLASH_OPTR` bit: `nBOOT_SEL` (bit 24) needs to be zero, default is one
- `NRST_MODE` should be 0b01 (input only) not default (0b11 = bidirectional)
- register `FLASH_OPTR` at 0x40022020 => found as 0xfffffeaa
- loads from 0x1FFF7800 at power up
- TODO XXX still need this!
## AN4221 / Bootloader Bugs
- command 0x00 - 'get' ... returns 19 bytes, but says v1.1 of protocol; clearly v1.2
- command 0x02 - 'getid' ... returns 1 byte, but math wrong on length part of response
- command 0x01 - 'getversion' ... return 1 byte, and doesn't include length prefix byte
- memory read only works from flash, some parts of SRAM... not IO registers
- undocumented need for N-1 as length in read/write commands
- flash writes need to be 256-aligned, or else they do nothing and don't fail
## Resource Sharing
- SPI bus to the display is shared by the GPU and main micro.
- Main micro configures its pins as pull-up, open-drain outputs (there is no input except TEAR).
- GPU does the same, but no pull-ups (so open drain).
- Later turns out we need push-pull I/O to get the SPI speeds involved (rise times too slow
with built-in resistors)
## Other References
- Ideas, not code: <https://github.com/rogerclarkmelbourne/Arduino_STM32/blob/341cd894516f747f14108de5da593dad99900ae0/tools/macosx/src/stm32flash_serial/src/stm32.c>

8
misc/gpu/barcode.h Normal file
View File

@ -0,0 +1,8 @@
// autogen file, see make_barcode.py
// in python: b'\x00\x00\x00\x00\x00\x00\x00?\x1c\x0e\x00\x1f\x8e\x00\xe0\x0f\xf8\xff\x8f\xc7\xe3\xfe?\xe3\xf1\xf8\xff\xf1\xf8\x03\xfe8\xfc\x00\x00\x00\x00\x00\x00\x00'
static const uint8_t test_barcode[40] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1c, 0x0e, 0x00, 0x1f, 0x8e, 0x00, 0xe0, 0x0f, 0xf8, 0xff, 0x8f, 0xc7, 0xe3, 0xfe, 0x3f, 0xe3, 0xf1, 0xf8, 0xff, 0xf1, 0xf8, 0x03, 0xfe, 0x38, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// EOF

62
misc/gpu/basics.h Normal file
View File

@ -0,0 +1,62 @@
/*
* (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
extern void fatal_error(const char *) __attribute__((noreturn));
// I don't like the ususal assert macro, so here is my replacement,
// and BTW: "assert()" is actually a macro, so it should
// always be capitalized.
//
#undef assert
#undef ASSERT
// this does have an impact, but probably doesn't matter.
#define __unlikely(x) __builtin_expect((x),0)
#define ASSERT(x) do { if(__unlikely(!(x))) { fatal_error("assert");} } while(0)
// Use anywhere. Will just crash on production, but useful in dev.
#ifndef RELEASE
#define BREAKPOINT asm("BKPT #0")
#else
#define BREAKPOINT #error
#endif
// An assertion that we will be checked at *compile* time. Useful GCC feature.
#define STATIC_ASSERT(cond) _Static_assert(cond, #cond)
// Similarly: for those times when you want to write ASSERT(False),
// use this instead to provide a msg and abort. Altho the msg isn't
// in the binary, it's still helpful when looking at source via debugger.
//
// CAUTION: some security checks end up here, so we want to always crash
// in those cases.
//
#define INCONSISTENT(x) fatal_error("incon")
// Wait for an interrupt which will never happen (ie. die)
#define LOCKUP_FOREVER() while(1) { __WFI(); }
// Like "sizeof()" but works on arrays, and returns the "numberof" elements.
//
#define numberof(x) (sizeof(x)/sizeof((x)[0]))
// This is an old favourite with dangerous programers...
//
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
#define msizeof(TYPE, MEMBER) sizeof(((TYPE *)0)->MEMBER)
// Handy macros.
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#define CLAMP(x,mn,mx) (((x)>(mx))?(mx):( ((x)<(mn)) ? (mn) : (x)))
#define SGN(x) (((x)<0)?-1:(((x)>0)?1:0))
#define ABS(x) (((x)<0)?-(x):(x))

1
misc/gpu/external/cmsis_device_c0 vendored Submodule

@ -0,0 +1 @@
Subproject commit 7e32bf9d8117ee4c8f6a1d138b814fc24bf4c906

@ -0,0 +1 @@
Subproject commit 4c5e3e45a8478a33decb1f45d663f485f89c459b

22
misc/gpu/gogo.gdb Normal file
View File

@ -0,0 +1,22 @@
add-symbol-file gpu.elf 0x08000000
# hex for all numbers
set output-radix 16
# kill X repeats N times, which interfere w/ cut-n-paste into python of dumps
set print repeats 128
# Use ST-Link (st-utils)
#target extended-remote :4242
# Connect to the OpenOCD gdb server (needs to be already running & connected)
target extended-remote :3333
define reset
mon reset init
end
define wipe_chip
mon flash erase_sector 0 0 last
mon reset halt
end

118
misc/gpu/gpu_binary.py Normal file
View File

@ -0,0 +1,118 @@
# (c) Copyright 2023 by Coinkite Inc. This file is covered by license found in COPYING-CC.
#
# Binary for Q1 GPU co-processor
#
# see misc/gpu for source
#
VERSION = '1.3.3'
LENGTH = const(3536) # bytes (after decompression)
# len(BINARY) = 2618
BINARY = (b"x\x9c\x8dW\x7fl\x13\xd7\x1d\xff\xbe\xbbsb;\x8188\xd08?\xcf~\t\x04\x9c\x10'"
b'GZ\ne\x1c>j\x12\x1f\xa4\x14J\x051\xdd\x9c\x1f\x853\xa1\xeb\xad\xe9*k\xfdc.'
b'\xa8]\xc76\xdabZ\xc0\x866\x90\xfeB\xedF\x16\xc9\x9b\xd6\x11\x95\xb5\xdb\xaa'
b'\xb5j\xeb#\xad\xc6\x08ZS\xe8duSWSM\xb5\x81\xc6\xb7\xef\x99P9\x12\x9af\xeb'
b'\xeb\xf7\xfd\xf5\xbe\xdf\xcf}\xef\xbd\xef{\x86J\xe0-\x04\xcc\xab,`^\x8d\x04'
b"\xff\xe3\xb3\xa6\xc0.!\x7f'\xd2\x16r]g\x8c7\xa3\xff\xc7v#\xe6\xcd\xfc"
b'o\xa6/\xc4dK\x14\xad\xa7ap\x17k&\x19\xdcL\x92\xeb\x84)x\x93P\xaa\xda\xc6\xd1'
b'\x917|\xfe8\x07\xcc\x9clK\x80\x9bM\xb2]\xd7=l\xe3g|\x86\xad\x14}\x0c{i'
b'\xe7\xe3>H\x1f\xbc\x02Nv\xca*\x07\xb6J\x1b\xb96K\xa7U\xf6V\xc6\xbc_OX\xfc'
b'\xcc\x14P{\x90k/\x96c\xde+\x13\x90\xfe\xd3\x95\\\n*\xf3\xf1\xf3d\x9e'
b'\xa1\xb5Hh\x81t\x824\xfet\xb4\xc2\x85\xf1^\x85\xf4\xb9\xe92y\xb8\xa1g'
b'\x90Y\xb4D\xea\xe9\x0f\x0c~fr\x8b$J\xe2\xab)s\x92\x87\xc8B&\xca'
b"\x1d\x82\xf4\x85k@\xbf&<0'\x99\xe7\xd8g\xb9CEQH\x9f\xbd\xf6r\x9fe4="
b'\x0e6F\xb4%\x98\x06^vv\xf5<\xf0\xe4\xa8U\xec\xb9\xbfg\x10\x9c\xae|'
b'\xbcR\x17\x15!\x8a\x99\xe2\x90>1}\x86\x92\xe8\x9b+\xb9(9i\x12\x16t'
b'\x16E\x99\x83\x90\xfe\xd5\xb5\x1a\xc4B\x10\xcb\x81\xe9y\xb2}=\x13'
b'}\x97\xf2\x80\x1e\x98\xa3m:B\xfb\x948g\x97\xfa\x83\x97\x949~\xbbx\t'
b'\xc7\xd2\xfcH\x95\x12\x1c)\x8e\xd6\xfch\x1e\xb5\xe5\xb1\xe8\x1f\xea:'
b'p\xb0\xd1\xce\xd9\x00\xee\x01\x91du]\xff1\x92\x9eA\x9a\xd6#\x94\xf5\x07\x98'
b'r\xa5D\xb2\x07\xd5uXk\x9e\x11\xcd4\x93\xe8_?\xe0?\x1erxm\xc9OC%R\xc4y\xa9w'
b'$\xd4\xc5\x94\x88\x0e\xe8\xac{lM\xb9\nn\xaam\xef*Q\r\xb2\x87\x8f\x87Ht\x9b\\'
b"\x1f\xde&\xd7\x86y\xea\xf0\xb6'/\x86\xec\xd2\xa5^\x12\x07w\xb3vO\xb7\xa0"
b"\xf6\xb7nK\x96\x9d\xebm\xbd?\xd9\xd7*'\xefm\xadHn\x947\xfa\xab\x82"
b'f\xea\x9d\xa2\xca]]%\x88\xf9|\xea\xe1\xd6\xef&\xfd\xf2#\xadBRm\xfd'
b'\xb7\xe6\xf7w\xa8\xe81\x05-\xdb\xb5\xce\xce\xb5re\x10\xd2e\xd3\xc4\xe3Q\t'
b'=\x81\xf1Gz\xc1\xc5\xd1r8\xea#\xfc\x0e\xdfHH\xf0n\xd0`1I\xde*\xd7\xab\xb0'
b'\x84$;\xe4ZU_\x04\x8d\xcc\xc2\xd3>\xa1sY\x17\x1b\xb6*\xe4\x05h]\xafA\x0bI'
b'\xb2\xaa5\x98\x19\x87\x96\xa5Z;\xe2(\xa2\x82:\x91\x82\x96E\x9a'
b"\x9e\xf9\xa1\xde*7\xf9\xedA\x96\xfe'\xc5\xb6\xd4iM\xfef\xb9<|D\xbd;\xfc7\xd5"
b'\xe4<\x10\xeeQ\xab\xc2\xfb\xa4*\xf5\xf7\xe8_\xa6\x11W\x83\xec\x08[Q\xbeO'
b'\x1dCM\x91\xc6:y\xd9\xf0(\x07\xc6\xf5Uj\x81\\\x8b\xf1-\xf4\x83T\xff'
b'\xae\xc91h-N\x16\xb7\xbcr\xce\xde\xbd\xabfh\xcb\xc7c\x0c\x1cO\xd5\x03'
b'\x81\xe7S;}\xaf\xf4\x9dJ\xbd\x12\xba\xcd{*\t\xeeLr~\x98\xac|\xa9'
b'\x8f\xb4\x93c\x93c#)\xe3\xdd-\xc55\xdb\x82\xd4\x80\xb4\x0c\xc9\x83\xb4\r\xf7'
b'\x84\xae\xe7\xf4F\xe4\x0f"\xbf\x11\xe9^\xa4;P\xee\xc31\xe2\xaa\x92\xe7\x99b'
b'\xc1\x88\xcb!o\x02\x87\x828\x91?\x8b\\\xb9\xf7\x9bd\x8fR\xd1U.\xa2L'
b'\xacRO\xb0J\x99\x97\x976\x11\xc3+\xa6\x94uY\xc5bg\x0c\xb9}R,\xb8\xdcuD'
b'1\x83M,\xf7^\xd5b\x8a\x05m\xb1\xa0E\xb6\xf8{\x82&\xd7\xe1`\x15\xae'
b'\x1e\xf8\x02w\xac\xb1\xe6"\xb8\xb4\xdeAJ#=\xa5\xeb\xb6)\x98\xfa\x04\xc1W'
b'\xcaC\t\xc7\xee\xca\xce\xe1\x06"9\x06\x1es\x92\x85U\xbb\xbbL\x8cH\x0e\x90'
b'\xd8y\xdckV\xe9|\xff\xe4`\t\xee\x10\x88\xeb\x99\xf6\x1c\xa4Og\xf5\xcc\xd6'
b'\\\xa9\x7fN\x97])\x11\xedA=\xf3\xeb\x1c\xc5\xf7|U\xe3\x1bi\xc8\xed\xfd'
b':\t\xe9\x17\xaf\x18\xdc\xe5\xa4\x9e\x19\xc9]I\x19\xf9\x89\xcd\xd8\xe9'
b'\x88\x03\xeb2Lm.\xb3s\xd2dK\xc4z\x8f\xf4\xc5\xfa\xce\xd0\x00\xa9\x01\xb3'
b'\xff\x19\xc5!\x1e\xf7^K\xda\x86\x90\xf3~\xa3\x19~\x93\xa6X\xafyE\xac7\xdfs<D'
b'\x1c\xa6\x9e\x04\xcen0\xf4G{q\xae\x0b\xa8e\xfd&r\xd8[|aD\xb1\x17\xcc\xf2\x8c'
b"\xbf\xa4\xcc\x17\x9f\xc5x\xefo'B\xe3\xd0\x17)c\xfePb.\xd4\x02Y\xb1w,VI^?0V"
b'm\xa5jP\xb5[\x97\xf0#\xeaE\x15\x9fEw\x02\xc7\xeb\x99\xf7t\xb2jll\x8b\xe3\x97'
b'c\xf3\xac.\xd5\xcd/\xb1\x9ePw\xa8\xff@\x8f\xe1\x19\x8f7\xf4f\xfc=\xa2'
b'\x0f\x8d\x0fSu6&\xfa\xc1\xd8\xa7"4\x94\xf8\x03d\x18q\xcd~\x1au\xfcY\xa5V<'
b'\x86\xb8\x16\x0c\xdd\xe0\xca\x87\xc8\xb2\xcf\xf3\xf8\xd4D\rp\xaf\xd5=Ia>\xe8'
b'\x99Wu\x1e\xda@\x91\xf4\xcc\xfb\xba:nK\xec\x1b\xad\x99\xe9\x8a'
b'\x1b\xae\x9d\xa1\xd5\x0cD\xf7\xd0\x00\x90\xe8\x14\x9d\x04&\x1a\xc1J\x84'
b'|ql\xaaFgz\xf9\xaaH]\x8a]\xa2AB9\x7fy\x18\xbb\x89j\x1d\xbdQGc-\xa6\x13\x8f'
b'\x8fV\x00\x1bu6\xddv\xc1\xb2\xb8\xe3\x82\xa5Q\x91^\xf7\xcd\xe9\xd8 \x95\xd1'
b'\xc50o\x91]\xfcsmY\xdb\xc5"\xf8h\xa7\x8f=\xdaWwp\r\xef\x1f\xf0V\x88\xf5'
b'\xfe\x17+\x19w\xbd\xb6\x02<@V\xc2A=\xf3\xa2\xbe\x18\x085\xe4\x866['
b'\x87\xa1\x89\xeb\x15\x94\xb8\x16\xa3\xc6\x90\x0e\xceHi\x07Yn\xc8?'
b'\xd7M\xd8\x97\x89\xdb\x94d\xddW\xb4\x05\x94s\xc1\xc1\xa2)\x16;\x93I3\xcb'
b'+\x00\xa2\x0b\xa8\x07\xfe\x99\x02\xc4\x01\xd17\xealmfO\x85p1u\xc6\xc7'
b'\xbe\x80\x1d2\x08\x90I\xd4\xca\x9b\x9cp\xea\xd8\xda\xef\xfb\xc0U\xd4'
b'P\xd5\xa9\xb7\xd9\x81\x8a\xf7y\x07\xd7Tn\x08xY1\xe0\xd8\x02\xa4}h\xf3'
b'>\xefW\x9a\x89\x0e\xbb\xfe\xe5\x04>\xe0\xdd\x84U\x9d\xce\x99\x1al'
b'\x1b\x86y\xb7\x12\x81G\x83e\xf4G\n\xb9\xe3HU\x17\xfc\xa0R\xcf|\x98\x83'
b'\xe6\xb4\xf6\xa8b\xf1\x13\xc1.r\x1f\xdb\\d\xe5&\xaf]"\xc2\xb8\xcf\x8d\xbd'
b'i\xeb\xb4\xae\xdf\xc0 b\r\xcb\x00"\xd9D\x85l \xd9\xed\x8b\xf0.\x00g'
b'\x11\x94\xcb\x81\xed\xacX\x0b\x83\x88&\xe0\xb5GDs\x85F\xda\x9a\x16\xdb\xb4a'
b'W\x98\x0e/4P\xbc\x91\x0b7\xfe\x06\x9cF\rW\xe9\x99h\x0eZ\xb2\xda\xb8'
b'/;\xee\x01\xa6\xfd\xef\xa9\x08\xe6\xd9\x8d\xbdBMD\xe8p\xe3\x13\xa3_\x98&'
b'I)\xbe\xfb\xd7z\x8d\xb7\xdf}\x95]XD\x99\x86\x90\xaf\t\xeb\xc3<G\xf0\x94\nd+'
b')DoYI\xa2@\r=\xf3\x1c\x17e\xa3\xc6J\xe8\xce:\xbb\x850\xf5r\xb8\x1fO\xea'
b'BxD\x12T!<YL>\xd63\x01\xfd\xa10,\xa9K:64+\xd0l\xd3\x84\xf0\xe5p\xa0x'
b'\xb2l4\xacg\xbe\xcc\x11\x97\x10\xdeV\xfc\x97\xb2}\x12\xe7<\x00?\x93\xec8'
b'\xd3\xe6\xef\xaf1*\xc3\x7f[\x19wp\xb8\xa1b\xe6\x84$W\xeb\xe8g\xa6\x90'
b'\x0f\x0fv\xcc\\\x9e\x8d\xd0I2\xd2W4\xaa\xe2\xba3\xd6\xdcr\xa4z\xacY'
b'.\x95K\xa9\xeb\x8co:\xf1\x93\xd1\x12\x85y\xa6\xdeE\x9c$j\x02r8`\x06w\x9d\xf6'
b'\xb4\xc8\x0b\xd0\xc4`7\xf9\xdd\x95\xb7\xc7\xd8(\x13gc\x01\x05O'
b'\xe6\xf8\x84\xb8@\xe3\xe2d%q\x9b\xcf\r*$F\x8eD%&vV\xf1#\xbe\xc1 \xf0'
b'\xc5\xb8\xb6j\xf0\xed\x94\x8a\xbcDV\x04\xcc\x7fM\x11\xca\xc6\xc8\xd1\xa8Hb5'
b'b\x95\x17\xb4\x89\xa9\x1df\x1e\x04\xa8w\xb5*\xe0V\x0br\xed5r\xb9\x02\x10'
b'\x13y8$\x19\x1e\xe0\xdeY`\x1fB;\x173\xec\\\xfc\x16\x89\xacl\r\x12w\xc39&'
b'\xceC\\\xa9w\x99\xa2\x02\x9c\xc2\x88[\nf\xf4\xdc$\xe2\xfa\x02'
b'\xbb\x1f\xed\xa6|\xc4[\xa4SA#Ru\xe8z\xa4/1\xd2w\n<;n\x12\xa9\xa3\xc0'
b'\xde\xf8m$\x03\xdb\x97A\xc6\xfd=m\xe6)\xa7\x88S\x04\x87h\xce\xd7\xe3\xf1'
b'T\xa1\xb4\x7f\x964<K:9K\xfa\xed,\xe9\xcc,\tOG\x8d\x89?-\x06B\\\xb4'
b'\x03\xb1|\x92-nj\xbb0\x93}\x17\xb8k\x0bpj\xd9\xb7\xc7\xca\\q\xc4YO\x0fI'
b'\xb0t\x01\xa2<,\xf2\xf4\xba\xf5\xad\xacQ\xe1x\xbe\x1e\xad}l\x9c\x080+'
b'\xd3\xb9\x14\xe1\x07\xc0#rX\xfdG\xcc\x9f\xa4\x16Z\x07\xac\x1e\xa0'
b'\x98\xe7A\xccS]\x90\xe7\xd8\xec<\xcd\x15\x9a\xa7 \xcf\xfe\x82<\x0f\xf6\xbd;'
b'+\xc7y\xcc\xf1\x08\xf0b\x11\xe6\x180\x7f\x8awRVa@M\x10>P\xd4\xfcQ\xb7R'
b'\xa2t\x86\x04\xe9\x03e\xbe"HsC\xa5\xbb\x04i\x7f\x88\x95P\x13\x82RA\xb2uS\xa9'
b'Ct\xe3\xedm\xb3\xf2\x0benw\x93$\x88\x95R\x84n\x0cV\x93c^\xeel\x84\xdf\xac'
b'\x88\x84\x956\x07#\x14\xf889\xeae4yW|\xcc\xde;\x11b\xf1\xd65\x81g\x84\x08'
b'\xba~-}\xfdJH\\\xac\xe2ID%6\xf8\x1e\xc6\xabf8\xc5-Ulh\x16)jd\xc5\xbe\x9e'
b'\xede\x959\xa1*\x89\t\xeeU\xf6\x85\xa8\xb8\x17\xc7%\xd2\xa4u\x92\xa9\x92\xf6'
b'\x04\xa1\x85KF\xe8\x1e\x9cg\x97\xf6\x06\x19\xc5,W\x89%\x8a\xe1-)~\xf4'
b'\xb6K\x12\xee\x19\x0f\xeeO}\xea\xc6=\xf4C\xbd\xc6Ih5w\xd8K&\xa0\xd4v{\xb5'
b'5\xcfY\xcd\xb7W[\xf2\x9c\x85\xbb\x9d9a\xdb.V\x1a\xf7S\x8ee\x18\x82'
b"\x9f\x1b\xff+X\xd8S\x19\xc5]\xa6\xaes\xa8D\xc0\xf3\x9f\xbe\x85'0,\xb9"
b'\xa6m\xad\xc3\x1b\td\x13g|\xd9\xd3\xe6\xd3\xcf\xfb\xd4u\x85|\xdbRa\xa9'
b'\x00w\xc9\xe0\xed\x1d\xe0\xfb\x1f\x18X\x9dgz\x1f\xda9\xb4\xfaF\xe8\xd55s'
b'\xa1~?L\x95e\xf5\xa7\xde\xb9\x94[}\xe9rV\xbf\x9ces\xcb\xbf\x99q'
b'\xc8\xc7\xe0\x1f\x0e=p\xff\xaavO\xfb2O[\xfb\xadK\xdb<\xc2\xad\xed\xed'
b'\xfc\xce\xd0\xc3\xab\xee\x16=\xfd;<}\xfd\x1e~\xed\x9d\xf7\xaej\xbb>\xe7s'
b'\x00\xf3\x1f\x90\xfe\x0bJ`i=')
# EOF

107
misc/gpu/interrupts.c Normal file
View File

@ -0,0 +1,107 @@
// from https://github.com/STMicroelectronics/STM32CubeC0/blob/main/Projects/STM32C0116-DK/Templates_LL/Src/stm32c0xx_it.c
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32c0xx_it.c
* @brief Interrupt Service Routines.
******************************************************************************
* @attention
*
* Copyright (c) 2022 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "interrupts.h"
/******************************************************************************/
/* Cortex Processor Interruption and Exception Handlers */
/******************************************************************************/
/**
* @brief This function handles Non maskable interrupt.
*/
void NMI_Handler(void)
{
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
/* USER CODE END NonMaskableInt_IRQn 0 */
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
/**
* @brief This function handles Hard fault interrupt.
*/
void HardFault_Handler(void)
{
/* USER CODE BEGIN HardFault_IRQn 0 */
/* USER CODE END HardFault_IRQn 0 */
while (1)
{
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
/* USER CODE END W1_HardFault_IRQn 0 */
}
}
/**
* @brief This function handles System service call via SWI instruction.
*/
void SVC_Handler(void)
{
/* USER CODE BEGIN SVC_IRQn 0 */
/* USER CODE END SVC_IRQn 0 */
/* USER CODE BEGIN SVC_IRQn 1 */
/* USER CODE END SVC_IRQn 1 */
}
/**
* @brief This function handles Pendable request for system service.
*/
void PendSV_Handler(void)
{
/* USER CODE BEGIN PendSV_IRQn 0 */
/* USER CODE END PendSV_IRQn 0 */
/* USER CODE BEGIN PendSV_IRQn 1 */
/* USER CODE END PendSV_IRQn 1 */
}
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */
/* USER CODE END SysTick_IRQn 0 */
/* USER CODE BEGIN SysTick_IRQn 1 */
/* USER CODE END SysTick_IRQn 1 */
}
/******************************************************************************/
/* STM32C0xx Peripheral Interrupt Handlers */
/* Add here the Interrupt Handlers for the used peripherals. */
/* For the available peripheral interrupt handler names, */
/* please refer to the startup file (startup_stm32c0xx.s). */
/******************************************************************************/
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */

9
misc/gpu/interrupts.h Normal file
View File

@ -0,0 +1,9 @@
#pragma once
void NMI_Handler(void);
void HardFault_Handler(void);
void SVC_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);

450
misc/gpu/lcd.c Normal file
View File

@ -0,0 +1,450 @@
/*
* (c) Copyright 2023 by Coinkite Inc. This file is covered by license found in COPYING-CC.
*
* Control the LCD.
*
* - see <external/stm32c0xx_hal_driver/Inc/stm32c0xx_ll_spi.h> for the API of the SPI
*
*/
#include "main.h"
#include "lcd.h"
#include <string.h>
#include "stm32c0xx_hal_gpio_ex.h"
#include "barcode.h"
lcd_state_t lcd_state;
const int LCD_WIDTH = 320;
const int LCD_HEIGHT = 240;
const int NUM_PIXELS = (LCD_WIDTH*LCD_HEIGHT);
// doing RGB565, but swab16
const uint16_t COL_BLACK = 0;
const uint16_t COL_WHITE = ~0;
const uint16_t COL_RED = 0x00f8; //SWAP16(0xf800);
const uint16_t COL_FOREGROUND = 0x60fd; //SWAB16(0xfd60); // brand orange
// progress bar specs
const uint16_t PROG_HEIGHT = 5;
const uint16_t PROG_Y = LCD_HEIGHT - PROG_HEIGHT;
static const int NUM_PHASES = 16;
#if 0
// memset2()
//
static inline void
memset2(uint16_t *dest, uint16_t value, uint16_t byte_len)
{
for(; byte_len; byte_len-=2, dest++) {
*dest = value;
}
}
static inline void wait_vsync(void) {
// PA5 is TEAR input: a positive pulse every 60Hz that
// corresponds to vertical blanking time
uint32_t timeout = 1000000;
for(; timeout; timeout--) {
if(LL_GPIO_IsInputPinSet(GPIOA, PIN_TEAR)) {
return;
}
}
//puts("TEAR timeout");
}
#endif
// write_byte()
//
static inline void
write_byte(uint8_t b)
{
while(LL_SPI_GetTxFIFOLevel(SPI1) == LL_SPI_TX_FIFO_FULL) {
// wait for space
}
LL_SPI_TransmitData8(SPI1, b);
while(LL_SPI_GetTxFIFOLevel(SPI1) != LL_SPI_TX_FIFO_EMPTY) {
// wait for FIFO to drain completely
}
}
// write_bytes()
//
static inline void
write_bytes(int len, const uint8_t *buf)
{
for(int n=0; n<len; n++, buf++) {
while(LL_SPI_GetTxFIFOLevel(SPI1) == LL_SPI_TX_FIFO_FULL) {
// wait for space
}
LL_SPI_TransmitData8(SPI1, *buf);
}
while(LL_SPI_GetTxFIFOLevel(SPI1) != LL_SPI_TX_FIFO_EMPTY) {
// wait for FIFO to drain completely
}
}
// write_uint16()
//
static inline void
write_uint16(int count, uint16_t val)
{
uint8_t a = val & 0xff;
uint8_t b = val >> 8;
for(int n=0; n<count; n++) {
while(LL_SPI_GetTxFIFOLevel(SPI1) == LL_SPI_TX_FIFO_FULL) {
// wait for space
}
LL_SPI_TransmitData8(SPI1, a);
while(LL_SPI_GetTxFIFOLevel(SPI1) == LL_SPI_TX_FIFO_FULL) {
// wait for space
}
LL_SPI_TransmitData8(SPI1, b);
}
while(LL_SPI_GetTxFIFOLevel(SPI1) != LL_SPI_TX_FIFO_EMPTY) {
// wait for FIFO to drain completely
}
}
// lcd_write_cmd()
//
static void
lcd_write_cmd(uint8_t cmd)
{
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
LL_GPIO_ResetOutputPin(GPIOA, PIN_DATA_CMD);
LL_GPIO_ResetOutputPin(GPIOA, PIN_CS);
write_byte(cmd);
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
LL_GPIO_SetOutputPin(GPIOA, PIN_DATA_CMD);
}
// lcd_write_data()
//
void
lcd_write_data(int len, const uint8_t *pixels)
{
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
LL_GPIO_SetOutputPin(GPIOA, PIN_DATA_CMD);
LL_GPIO_ResetOutputPin(GPIOA, PIN_CS);
write_bytes(len, pixels);
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
}
// lcd_write_constant()
//
void
lcd_write_constant(int len, const uint16_t pixel)
{
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
LL_GPIO_SetOutputPin(GPIOA, PIN_DATA_CMD);
LL_GPIO_ResetOutputPin(GPIOA, PIN_CS);
write_uint16(len, pixel);
LL_GPIO_SetOutputPin(GPIOA, PIN_CS);
}
// lcd_write_cmd4()
//
static void
lcd_write_cmd4(uint8_t cmd, uint16_t a, uint16_t b)
{
uint8_t d[4] = { (a>>8), a&0xff, (b>>8), b&0xff };
lcd_write_cmd(cmd);
lcd_write_data(4, d);
}
#if 0
// lcd_write_data1()
//
static void
lcd_write_data1(uint8_t data)
{
lcd_write_data(1, &data);
}
#endif
// lcd_spi_setup()
//
// Just setup SPI, do not reset display, etc.
//
void
lcd_setup(void)
{
LL_SPI_InitTypeDef init = { 0 };
// see SPI_InitTypeDef
init.TransferDirection = LL_SPI_HALF_DUPLEX_TX;
init.Mode = LL_SPI_MODE_MASTER;
init.DataWidth = LL_SPI_DATAWIDTH_8BIT;
init.ClockPolarity = LL_SPI_POLARITY_LOW;
init.ClockPhase = LL_SPI_PHASE_1EDGE;
init.NSS = LL_SPI_NSS_SOFT;
init.BaudRate = LL_SPI_BAUDRATEPRESCALER_DIV2; // measured: 6 Mhz
init.BitOrder = LL_SPI_MSB_FIRST;
init.CRCCalculation = LL_SPI_CRCCALCULATION_DISABLE;
LL_SPI_Init(SPI1, &init);
LL_SPI_Enable(SPI1);
// usually want the busy bar
lcd_state.activity_bar = true;
#if 0
// debug values
lcd_state.cursor_x = 9;
lcd_state.cursor_y = 2;
lcd_state.outline_cursor = true;
#endif
#if 0
lcd_state.dbl_wide = true;
lcd_state.cursor_x = 16;
lcd_state.cursor_y = 4;
lcd_state.solid_cursor = true;
//lcd_state.outline_cursor = true;
#endif
}
// take_control()
//
// Make the shared SPI bus ours. All push-pull, because we need the speed.
// - force PIN_G_CTRL low while we are in control, so CPU knows we are actively
// speaking to the LCD
//
static void
take_control(void)
{
LL_GPIO_SetOutputPin(GPIOA, PIN_GPU_BUSY);
LL_GPIO_InitTypeDef init = {0};
init.Pin = SPI_PINS;
init.Mode = LL_GPIO_MODE_ALTERNATE;
init.Speed = LL_GPIO_SPEED_FREQ_VERY_HIGH;
init.Pull = LL_GPIO_PULL_NO;
init.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
init.Alternate = GPIO_AF0_SPI1;
LL_GPIO_Init(GPIOA, &init);
init.Pin = SPI_CTRL_PINS;
init.Mode = LL_GPIO_MODE_OUTPUT;
init.Speed = LL_GPIO_SPEED_FREQ_VERY_HIGH;
init.Pull = LL_GPIO_PULL_NO;
init.OutputType = LL_GPIO_OUTPUT_PUSHPULL;
init.Alternate = 0;
LL_GPIO_Init(GPIOA, &init);
}
// release_control()
//
// Go back to being a listener only on SPI.
//
static void
release_control(void)
{
// make all inputs again
LL_GPIO_InitTypeDef init = {0};
init.Pin = SPI_PINS | SPI_CTRL_PINS;
init.Mode = LL_GPIO_MODE_INPUT;
init.Speed = LL_GPIO_SPEED_FREQ_LOW;
init.Pull = LL_GPIO_PULL_NO;
LL_GPIO_Init(GPIOA, &init);
LL_GPIO_ResetOutputPin(GPIOA, PIN_GPU_BUSY);
}
// send_window()
//
static void
send_window(int x, int y, int w, int h, const void *data)
{
// write inclusive range
// note, MADCTL MV/MX/MY setting causes row vs. col swap here
lcd_write_cmd4(0x2a, x, x+w-1); // CASET - Column address set range (x)
lcd_write_cmd4(0x2b, y, y+h-1); // RASET - Row address set range (y)
lcd_write_cmd(0x2c); // RAMWR - memory write
if(data) {
// follow with data write of 2*w*h bytes
lcd_write_data(2*w*h, (uint8_t *)data);
}
}
// send_solid()
//
static void
send_solid(int x, int y, int w, int h, uint16_t pixel)
{
send_window(x, y, w, h, NULL);
lcd_write_constant(w*h, pixel);
}
// cursor_draw()
//
void
cursor_draw(int char_x, int char_y, uint8_t ctype, bool phase)
{
// see shared/lcd.py and shared/font_iosevka.py
const int LEFT_MARGIN = 7;
const int TOP_MARGIN = 15;
const int CHARS_W = 34;
const int CHARS_H = 10;
const int CELL_W = 9;
const int CELL_H = 22;
// no error reporting.. but dont die either
if(char_x >= CHARS_W) return;
if(char_y >= CHARS_H) return;
bool dbl_wide = ctype & 0x10;
ctype &= 0xf;
// top left corner, just on edge of character cell
int x = LEFT_MARGIN + (char_x * CELL_W);
int y = TOP_MARGIN + (char_y * CELL_H);
int cell_w = CELL_W + (dbl_wide?CELL_W:0);
uint16_t colour = phase ? COL_BLACK : COL_FOREGROUND;
if(ctype == CURSOR_OUTLINE) {
// horz
send_solid(x,y, cell_w, 1, colour);
send_solid(x,y+CELL_H-1, cell_w, 1, colour);
// vert
send_solid(x, y+1, 1, CELL_H-2, colour);
send_solid(x+cell_w-1, y+1, 1, CELL_H-2, colour);
}
if(ctype == CURSOR_SOLID) {
if(!phase) {
// solid fill -- draw first time
send_solid(x,y, cell_w, CELL_H, COL_FOREGROUND);
} else {
// box shape, blank interior pixels
send_solid(x+1,y+1, cell_w-2, CELL_H-2, COL_BLACK);
}
}
if(ctype == CURSOR_MENU) {
// half-block
send_solid(x,y, 4, CELL_H, colour);
}
}
// lcd_fill_solid()
//
void
lcd_fill_solid(uint16_t pattern)
{
// whole screen
send_window(0, 0, LCD_WIDTH, LCD_HEIGHT, NULL);
lcd_write_constant(LCD_WIDTH*LCD_HEIGHT, pattern);
}
// lcd_draw_progress()
//
void
lcd_draw_progress(void)
{
static int phase = 0;
uint16_t row[LCD_WIDTH + NUM_PHASES + 1];
for(int i=0; i<numberof(row); i++) {
row[i] = ((i % 8) < 2) ? COL_BLACK : COL_FOREGROUND;
}
send_window(0, PROG_Y, LCD_WIDTH, PROG_Y-LCD_HEIGHT, NULL);
for(int y=0; y<PROG_HEIGHT; y++) {
lcd_write_data(LCD_WIDTH*2, (uint8_t *)(&row[NUM_PHASES - phase - 1]));
}
phase = (phase + 1) % NUM_PHASES;
}
// lcd_animate()
//
// Called at LCD frame rate, when we have control over LCD.
//
void
lcd_animate(void)
{
take_control();
if(lcd_state.test_pattern) {
lcd_test_pattern();
lcd_state.test_pattern = false;
}
if(lcd_state.activity_bar) {
lcd_draw_progress();
}
if(lcd_state.cursor_type != NO_CURSOR) {
static int cur_phase;
if(cur_phase == 0) {
cursor_draw(lcd_state.cursor_x, lcd_state.cursor_y,
lcd_state.cursor_type, lcd_state.cur_flash);
lcd_state.cur_flash = !lcd_state.cur_flash;
}
cur_phase = (cur_phase+1) % 32;
}
release_control();
}
// lcd_test_pattern()
//
void
lcd_test_pattern(void)
{
// NOTE: this is very limited so it cannot be abused to show arbitrary things
// - take packed pixels in (blk/white)
// - draw them centered w/ red side border
// - repeat same pattern bunch of times.
// - used for a linear barcode in selftest process
// - important: this cannot render a QR code, nor misleading text.
// - LATER: let's just make fully static instead.
STATIC_ASSERT(sizeof(test_barcode) == LCD_WIDTH/8);
uint16_t row[LCD_WIDTH];
for(int i=0, x=0; i<sizeof(test_barcode); i++) {
for(uint8_t m=0x80; m; m >>= 1) {
row[x++] = (test_barcode[i] & m) ? COL_BLACK : COL_WHITE;
}
}
const int y = 40, h = 120;
send_window(0, y, LCD_WIDTH, h, NULL);
for(int i=0; i<h; i++) {
lcd_write_data(sizeof(row), (uint8_t *)&row);
}
}
// EOF

30
misc/gpu/lcd.h Normal file
View File

@ -0,0 +1,30 @@
/*
* (c) Copyright 2018 by Coinkite Inc. This file is covered by license found in COPYING-CC.
*/
#pragma once
static const uint8_t NO_CURSOR = 0;
static const uint8_t CURSOR_SOLID = 0x01;
static const uint8_t CURSOR_OUTLINE = 0x02;
static const uint8_t CURSOR_MENU = 0x03;
static const uint8_t CURSOR_DW_OUTLINE = 0x11;
static const uint8_t CURSOR_DW_SOLID = 0x12;
typedef struct {
bool activity_bar:1;
bool test_pattern:1; // self clearing
bool cur_flash:1; // clear when changing pos/type/enable
uint8_t cursor_type;
uint8_t cursor_x, cursor_y;
} lcd_state_t;
extern lcd_state_t lcd_state;
void lcd_setup(void);
void lcd_animate(void);
void lcd_test_pattern(void);
// EOF

213
misc/gpu/link-script.ld Normal file
View File

@ -0,0 +1,213 @@
/**
*
* a specialized linker script:
* - limits itself to just part of the device
* - assumes only a small amount of ram is available.
* - reference: <https://sourceware.org/binutils/docs/ld/>
* - spaces actually matter in expressions in this file
*
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
SEARCH_DIR(.)
/* Memory Spaces Definitions */
MEMORY
{
FLASH (rx) : ORIGIN = GPU_FLASH_BASE, LENGTH = GPU_FLASH_SIZE
RAM (rwx) : ORIGIN = GPU_SRAM_BASE, LENGTH = GPU_SRAM_SIZE
}
/* from /Applications/ARM/share/gcc-arm-none-eabi/samples/ldscripts/gcc.ld */
/* Linker script to place sections and symbol values. Should be used together
* with other linker script that defines memory regions FLASH and RAM.
* It references following symbols, which must be defined in code:
* Reset_Handler : Entry of reset handler
*
* It defines following symbols, which code can use without definition:
* __exidx_start
* __exidx_end
* __copy_table_start__
* __copy_table_end__
* __zero_table_start__
* __zero_table_end__
* __etext
* __data_start__
* __preinit_array_start
* __preinit_array_end
* __init_array_start
* __init_array_end
* __fini_array_start
* __fini_array_end
* __data_end__
* __bss_start__
* __bss_end__
* __end__
* end
* __HeapLimit
* __StackLimit
* __StackTop
* __stack
*/
ENTRY(Reset_Handler)
SECTIONS
{
.text :
{
KEEP(*(.isr_vector))
*(.text*)
KEEP(*(.init))
KEEP(*(.fini))
/* .ctors */
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
/* .dtors */
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
*(.rodata*)
KEEP(*(.eh_frame*))
} > FLASH
.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
} > FLASH
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
/* To copy multiple ROM to RAM sections,
* uncomment .copy.table section and,
* define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
/*
.copy.table :
{
. = ALIGN(4);
__copy_table_start__ = .;
LONG (__etext)
LONG (__data_start__)
LONG (__data_end__ - __data_start__)
LONG (__etext2)
LONG (__data2_start__)
LONG (__data2_end__ - __data2_start__)
__copy_table_end__ = .;
} > FLASH
*/
/* To clear multiple BSS sections,
* uncomment .zero.table section and,
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
/*
.zero.table :
{
. = ALIGN(4);
__zero_table_start__ = .;
LONG (__bss_start__)
LONG (__bss_end__ - __bss_start__)
LONG (__bss2_start__)
LONG (__bss2_end__ - __bss2_start__)
__zero_table_end__ = .;
} > FLASH
*/
/* Location counter can end up 2byte aligned with narrow Thumb code but
__etext is assumed by startup code to be the LMA of a section in RAM
which must be 4byte aligned */
__etext = ALIGN (4);
.data : AT (__etext)
{
__data_start__ = .;
*(vtable)
*(.data*)
. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
__data_end__ = .;
} > RAM
.bss :
{
. = ALIGN(4);
__bss_start__ = .;
*(.bss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
} > RAM
.heap (COPY):
{
__end__ = .;
PROVIDE(end = .);
*(.heap*)
__HeapLimit = .;
} > RAM
/* .stack_dummy section doesn't contains any symbols. It is only
* used for linker to calculate size of stack sections, and assign
* values to stack symbols later */
.stack_dummy (COPY):
{
*(.stack*)
} > RAM
/* Set stack top to end of RAM, and stack limit move down by
* size of stack_dummy section */
__StackTop = ORIGIN(RAM) + LENGTH(RAM);
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
PROVIDE(__stack = __StackTop);
/* Check if data + heap + stack exceeds RAM limit */
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
/* my values for startup.S code inhirited */
PROVIDE(_estack = __StackTop);
PROVIDE(_sidata = __init_array_start); /* start address for the init values of the .data section. */
PROVIDE(_sdata = __data_start__); /* start address for the .data section. */
PROVIDE(_edata = __data_end__); /* end address for the .data section. */
PROVIDE(_sbss = __bss_start__); /* start address for the .bss section. */
PROVIDE(_ebss = __bss_end__); /* end address for the .bss section. */
}

Some files were not shown because too many files have changed in this diff Show More