Unofficial Trezor firmware fork that signs with the unified opt-in signature hash for the Bitcoin hardfork. Not audited, not affiliated with SatoshiLabs. https://trezor.io
  • C 45.1%
  • Python 31%
  • Rust 18.9%
  • HTML 3.4%
  • Mako 0.3%
  • Other 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-03 23:57:39 -04:00
.clusterfuzzlite Run fuzzer in CI 2023-07-12 10:13:17 +02:00
.github feat(core): detect PRNG presence in hw builds 2026-08-27 20:07:51 +02:00
ci fix(ci): dynamic wait for devices to boot in HW tests 2026-08-24 13:57:52 +02:00
common protocol: move Capability_UnifiedSigHash off 28 2026-09-03 22:33:58 -04:00
core protocol: move Capability_UnifiedSigHash off 28 2026-09-03 22:33:58 -04:00
crypto fix(crypto): adjust random_permute 2026-08-27 18:46:15 +02:00
docs feat(core,python): support definitions version 2 2026-08-29 18:12:07 +02:00
legacy fix: address review findings on the unified sighash 2026-09-02 21:25:06 -04:00
nordic fix(nordic): select correct hash algorithm for fw validation 2026-07-31 15:07:41 +02:00
python protocol: move Capability_UnifiedSigHash off 28 2026-09-03 22:33:58 -04:00
rust protocol: add TxInput.unified_sighash and Capability_UnifiedSigHash 2026-09-01 09:04:33 -04:00
storage fix(storage): make flash area bounds checks overflow-safe 2026-08-19 12:55:11 +02:00
tests fix: address review findings on the unified sighash 2026-09-02 21:25:06 -04:00
tools style: run make style 2026-08-29 16:41:19 +02:00
vendor chore(core/micropython): remove rendundant declarations 2026-08-27 10:34:04 +02:00
.clang-format fix(style): update C-style to be compliant with clang-format 21.1.8 2026-04-09 14:19:03 +02:00
.editorconfig refactor(core): refactor NFC driver to allow easier support for different ST chips 2026-04-21 09:08:34 +02:00
.gitattributes chore(core): remove unused all_modules.py 2025-04-08 17:48:15 +03:00
.gitignore chore(core): rename tf-tools to tbench 2026-08-18 19:23:13 +02:00
.gitmodules chore: remove libtropic's pin to develop branch 2026-08-12 14:10:52 +02:00
.pylintrc chore: tighten pylint 2025-11-19 18:31:26 +02:00
.yamllint.yml refactor(nordic): rename west to nordic 2025-02-10 17:22:57 +01:00
build-docker.sh feat(core): detect PRNG presence in hw builds 2026-08-27 20:07:51 +02:00
CODEOWNERS chore: update CODEOWNERS 2026-08-06 11:47:48 +02:00
COMMITS.md docs: introduce conventional-commits (#1234) 2020-09-15 16:11:39 +02:00
CONTRIBUTING.md docs: add PR workflow info; move CONTRIBUTING to docs 2020-04-30 14:49:47 +02:00
COPYING docs: clear up licensing information 2021-03-31 18:51:52 +02:00
create_monorepo.py chore: update branch name to main where its used 2023-10-18 10:40:05 +02:00
LICENSE.md docs: clear up licensing information 2021-03-31 18:51:52 +02:00
Makefile chore(core): remove last uses of Optional 2026-08-28 21:42:44 +02:00
pyproject.toml chore(core): remove last uses of Optional 2026-08-28 21:42:44 +02:00
pyrightconfig.json chore: make python 3.12 the pyright baseline 2026-07-09 22:43:14 +02:00
README.md readme: the fork covers every model, not just the Model One 2026-09-03 23:57:39 -04:00
SECURITY.md chore: add SECURITY.MD 2026-08-13 10:24:21 +02:00
setup.cfg chore(core): remove scons related files 2026-08-04 08:20:38 +02:00
shell.nix chore: use Ruff from Nix instead of PyPI 2026-08-28 15:33:33 +02:00
tbench.toml chore(core): rename tf-tools to tbench 2026-08-18 19:23:13 +02:00
uv.lock chore(deps): bump cryptography to v50.0.0 2026-08-31 14:10:10 +02:00

Trezor, with the unified opt-in signature hash

An unofficial fork of Trezor Firmware that signs with the unified opt-in signature hash defined by the Bitcoin hardfork, as Bitcoin Knots v29.4.1.knots20260508 specifies it in doc/unified-sighash.md. It is not affiliated with SatoshiLabs. SatoshiLabs has not adopted the fork, so use their firmware instead if that is what you want.

Not audited. Use at your own risk, and no warranty of any kind, see the LICENSE. Builds here are not signed by the vendor, so the device shows an unofficial-firmware warning and its fingerprint on every boot, permanently. Installing it erases the device, and so does going back to official firmware, so you need your recovery seed both times. Everything below the divider is SatoshiLabs' documentation and describes their firmware rather than this fork.

What differs from Trezor Firmware

A signature that opts in commits to every spent amount and scriptPubKey rather than only the input being signed, which closes CVE-2020-14199 at the consensus layer, and it does not verify under the pre-fork rules, so the transaction cannot be replayed onto a chain that has not adopted the change. Signing is byte-for-byte unchanged unless the host asks for it.

  • TxInput.unified_sighash (protobuf field 21) requests hash type 0x21 for that input, the way PSBT_IN_SIGHASH_TYPE carries it in a PSBT.
  • Capability_UnifiedSigHash (28) is reported in Features, and trezorlib refuses to request the opt-in from a device that does not report it rather than letting the field be ignored.
  • The digest itself, in core and in legacy, taken from the sub-hashes both already stream for BIP-341. Those are single SHA-256 where the BIP-143 digests from the same writers are double.
  • An approval screen naming the hash type, in the same register as the existing sighash warnings.
  • The opt-in is bound to what the confirmation screen reported, and a replacement transaction may add it but never remove it.

Script types covered are bare and P2SH, segwit v0 including P2SH-wrapped, and taproot key path. Only SIGHASH_ALL|SIGHASH_UNIFIED is implemented, because this firmware never signs SIGHASH_NONE, SIGHASH_SINGLE or SIGHASH_ANYONECANPAY and so has no legacy counterpart to give a unified form to. Tapscript is unreachable because there is no script-path taproot here.

Trezor Suite does not know about the field, so opting in needs a host that sets it. The Shrike fork does, through lark.

Releases carry Bitcoin-only builds for Model One, Model T, Safe 3, Safe 5 and Safe 7, each built twice in the same container and byte identical, with a reproducible build recipe, published hashes and a signed manifest. Only the Model One build has been run on real hardware; the rest are verified on the emulator.


Trezor Firmware

img

Repository Structure

  • ci: Ancillary files, data, and scripts for the CI pipeline
  • common/defs: JSON coin definitions and support tables
  • common/protob: Common protobuf definitions for the Trezor protocol
  • common/tools: Tools for managing coin definitions and related data
  • core: Trezor Core, a firmware implementation for Trezor T, Trezor Safe 3, Trezor Safe 5, and Trezor Safe 7
  • crypto: Stand-alone cryptography library used by both Trezor Core and the Trezor One firmware
  • docs: Assorted documentation
  • legacy: Trezor One firmware implementation
  • python: Python client library and the trezorctl command
  • storage: NORCOW storage implementation used by both Trezor Core and the Trezor One firmware
  • tests: Firmware unit test suite
  • tools: Miscellaneous build and helper scripts
  • vendor: Submodules for external dependencies

Contribute

See CONTRIBUTING.md.

Using Conventional Commits is strongly recommended and might be enforced in the future.

Also, please have a look at the docs, either in the docs folder or at docs.trezor.io before contributing. The misc chapter should be read in particular, as it contains useful assorted knowledge.

Security Vulnerability Disclosure

Please do NOT create publicly viewable issues for suspected security vulnerabilities. See the Security tab for reporting instructions.

Documentation

See the docs folder or visit docs.trezor.io.