Skip to content

feat: EVM clear signing — EthBlindSigning policy + signed metadata - #61

Merged
BitHighlander merged 1 commit into
developfrom
feature/evm-clear-signing
Mar 18, 2026
Merged

feat: EVM clear signing — EthBlindSigning policy + signed metadata#61
BitHighlander merged 1 commit into
developfrom
feature/evm-clear-signing

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

Summary

  • EthBlindSigning policy: when disabled, device hard-rejects unknown contract data (not just a warning). Defaults to enabled = zero behavior change.
  • Signed metadata: host sends EthereumTxMetadata (msg 115) before EthereumSignTx. Device verifies secp256k1 signature against embedded pubkeys, validates contract/selector/chainId binding, shows rich OLED confirmation (method name, checksummed contract, decoded args).
  • Backwards compatible: old hosts never send metadata → existing flow unchanged.

Files

  • signed_metadata.c/h — binary parser, sig verifier, OLED display (370 lines)
  • policy.h — append EthBlindSigning
  • ethereum.c — metadata check + blind signing gate (+30 lines)
  • fsm_msg_ethereum.h — EthereumTxMetadata handler
  • messagemap.def — wire new msg types
  • CMakeLists.txt — add source

Dependencies

Test plan

  • ETH transfer — unchanged
  • ERC-20 transfer/approve — unchanged
  • THORChain/MakerDAO contract handlers — unchanged
  • Unknown contract + EthBlindSigning ON → warning + allow
  • Unknown contract + EthBlindSigning OFF → hard reject
  • Valid metadata → VERIFIED → rich display
  • Wrong key / tampered / truncated → MALFORMED → fallback
  • 19 test vectors in python-keepkey pass

@BitHighlander
BitHighlander force-pushed the feature/evm-clear-signing branch 7 times, most recently from c14cfc9 to 3dcadef Compare March 18, 2026 21:45
EthBlindSign policy: hard-rejects unknown contract data when disabled.
Defaults to enabled (no behavior change for existing users).

Signed metadata: host sends EthereumTxMetadata (msg 115) before
EthereumSignTx with cryptographically-signed blob. Device verifies
secp256k1 signature, validates contract/selector/chainId binding,
shows rich OLED confirmation with decoded args.

Key derived from BIP-39 mnemonic via SignIdentity(keepkey.com/insight).
Backwards compatible — old hosts unchanged, all existing tests pass.
@BitHighlander
BitHighlander force-pushed the feature/evm-clear-signing branch from 3dcadef to 82a56e3 Compare March 18, 2026 21:54
@BitHighlander
BitHighlander merged commit f35c338 into develop Mar 18, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant