What changed, and why it matters
This commit removes support for a cryptocurrency called SmartCash from Trezor hardware wallets. It deletes coin definitions, support entries, and a custom cryptographic curve used only by SmartCash. There is no security vulnerability being fixed here; it is simply cleanup of an unused or unsupported coin.
No security action required. Treat as routine maintenance. Users holding SmartCash should be aware that Trezor support for this coin is being removed and they may need to migrate funds or use alternative wallet software.
Security signals we found
No security-relevant signals detected
Pure feature removal / code cleanup
Evidence from the diff
The commit drops SmartCash (SMART, tSMART) coin definitions and support entries across Trezor firmware, and removes the secp256k1-smart curve from the crypto library, core coininfo, and cointool. The changes are purely subtractive: deletion of JSON coin definitions, removal of SmartCash entries from support.json, removal of secp256k1-smart handling in coininfo.py and its Mako template, deletion of the secp256k1_smart_info curve_info struct and related constants in crypto/secp256k1.c/h, crypto/curves.c/h, crypto/bip32.c, and removal of the HASHER_SHA3K fuzzer path in crypto/fuzzer/fuzzer.c. No bug fix, bounds check, or cryptographic hardening is introduced.
Changed components
common/defs/bitcoin/smartcash.jsoncommon/defs/bitcoin/smartcash_testnet.jsoncommon/defs/support.jsoncommon/tools/coin_info.pycore/src/apps/common/coininfo.pycore/src/apps/common/coininfo.py.makocrypto/bip32.ccrypto/curves.ccrypto/curves.hcrypto/fuzzer/fuzzer.ccrypto/secp256k1.ccrypto/secp256k1.hInspect captured patch +5 / −529
### common/defs/bitcoin/smartcash.json
@@ -1,46 +0,0 @@
-{
- "coin_name": "SmartCash",
- "coin_shortcut": "SMART",
- "coin_label": "SmartCash",
- "website": "https://smartcash.cc",
- "github": "https://github.com/SmartCash/Core-Smart",
- "maintainer": "Leandro Reinaux <leoreinaux@gmail.com>",
- "curve_name": "secp256k1_smart",
- "decimals": 8,
- "address_type": 63,
- "address_type_p2sh": 18,
- "maxfee_kb": 780000000000,
- "minfee_kb": 0,
- "signed_message_header": "SmartCash Signed Message:\n",
- "hash_genesis_block": "000007acc6970b812948d14ea5a0a13db0fdd07d5047c7e69101fa8b361e05a4",
- "xprv_magic": 76066276,
- "xpub_magic": 76067358,
- "xpub_magic_segwit_p2sh": null,
- "xpub_magic_segwit_native": null,
- "xpub_magic_multisig_segwit_p2sh": null,
- "xpub_magic_multisig_segwit_native": null,
- "bech32_prefix": null,
- "cashaddr_prefix": null,
- "slip44": 224,
- "segwit": false,
- "taproot": false,
- "decred": false,
- "fork_id": null,
- "force_bip143": false,
- "default_fee_b": {
- "Low": 1,
- "Economy": 10,
- "Normal": 100,
- "High": 200
- },
- "dust_limit": 546,
- "blocktime_seconds": 55,
- "uri_prefix": "smart",
- "min_address_length": 27,
- "max_address_length": 34,
- "negative_fee": false,
- "cooldown": 100,
- "overwintered": false,
- "extra_data": false,
- "timestamp": false
-}
### common/defs/bitcoin/smartcash.png
[binary or diff unavailable]
### common/defs/bitcoin/smartcash_testnet.json
@@ -1,46 +0,0 @@
-{
- "coin_name": "SmartCash Testnet",
- "coin_shortcut": "tSMART",
- "coin_label": "SmartCash Testnet",
- "website": "https://smartcash.cc",
- "github": "https://github.com/SmartCash/Core-Smart",
- "maintainer": "Leandro Reinaux <leoreinaux@gmail.com>",
- "curve_name": "secp256k1_smart",
- "decimals": 8,
- "address_type": 65,
- "address_type_p2sh": 21,
- "maxfee_kb": 1000000,
- "minfee_kb": 0,
- "signed_message_header": "SmartCash Signed Message:\n",
- "hash_genesis_block": "0000027235b5679bcd28c90d03d4bf1a9ba4c07c4efcc1c87d6c68cce25e6e5d",
- "xprv_magic": 70615956,
- "xpub_magic": 70617039,
- "xpub_magic_segwit_p2sh": null,
- "xpub_magic_segwit_native": null,
- "xpub_magic_multisig_segwit_p2sh": null,
- "xpub_magic_multisig_segwit_native": null,
- "bech32_prefix": null,
- "cashaddr_prefix": null,
- "slip44": 1,
- "segwit": false,
- "taproot": false,
- "decred": false,
- "fork_id": null,
- "force_bip143": false,
- "default_fee_b": {
- "Low": 1,
- "Economy": 10,
- "Normal": 100,
- "High": 200
- },
- "dust_limit": 546,
- "blocktime_seconds": 55,
- "uri_prefix": "testsmart",
- "min_address_length": 27,
- "max_address_length": 35,
- "negative_fee": false,
- "cooldown": 100,
- "overwintered": false,
- "extra_data": false,
- "timestamp": false
-}
### common/defs/bitcoin/smartcash_testnet.png
[binary or diff unavailable]
### common/defs/support.json
@@ -30,7 +30,6 @@
"bitcoin:RITO": "1.8.2",
"bitcoin:RVN": "1.7.2",
"bitcoin:SIGNET": "1.14.2",
- "bitcoin:SMART": "1.7.1",
"bitcoin:SYS": "1.8.4",
"bitcoin:TAZ": "1.8.1",
"bitcoin:TBCH": "1.6.2",
@@ -54,7 +53,6 @@
"bitcoin:tPPC": "1.8.4",
"bitcoin:tQTUM": "1.8.1",
"bitcoin:tRVN": "1.10.0",
- "bitcoin:tSMART": "1.7.1",
"erc20:bnb:ATOM": "1.11.3",
"erc20:eth:AAVE": "1.10.4",
"erc20:eth:APE": "1.11.3",
@@ -135,7 +133,6 @@
"bitcoin:RITO": "2.6.1",
"bitcoin:RVN": "2.6.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.6.1",
"bitcoin:SYS": "2.6.1",
"bitcoin:TAZ": "2.6.1",
"bitcoin:TBCH": "2.6.1",
@@ -155,7 +152,6 @@
"bitcoin:tPPC": "2.6.1",
"bitcoin:tQTUM": "2.6.1",
"bitcoin:tRVN": "2.6.1",
- "bitcoin:tSMART": "2.6.1",
"erc20:bnb:ATOM": "2.6.1",
"erc20:eth:AAVE": "2.6.1",
"erc20:eth:APE": "2.6.1",
@@ -250,7 +246,6 @@
"bitcoin:RITO": "2.1.1",
"bitcoin:RVN": "2.0.10",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.0.8",
"bitcoin:SYS": "2.1.8",
"bitcoin:TAZ": "2.1.1",
"bitcoin:TBCH": "2.0.7",
@@ -274,7 +269,6 @@
"bitcoin:tPPC": "2.1.9",
"bitcoin:tQTUM": "2.1.1",
"bitcoin:tRVN": "2.4.0",
- "bitcoin:tSMART": "2.0.8",
"erc20:bnb:ATOM": "2.5.3",
"erc20:eth:AAVE": "2.4.3",
"erc20:eth:APE": "2.5.3",
@@ -355,7 +349,6 @@
"bitcoin:RITO": "2.8.1",
"bitcoin:RVN": "2.8.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.8.1",
"bitcoin:SYS": "2.8.1",
"bitcoin:TAZ": "2.8.1",
"bitcoin:TBCH": "2.8.1",
@@ -375,7 +368,6 @@
"bitcoin:tPPC": "2.8.1",
"bitcoin:tQTUM": "2.8.1",
"bitcoin:tRVN": "2.8.1",
- "bitcoin:tSMART": "2.8.1",
"erc20:bnb:ATOM": "2.8.1",
"erc20:eth:AAVE": "2.8.1",
"erc20:eth:APE": "2.8.1",
@@ -465,7 +457,6 @@
"bitcoin:RITO": "2.6.1",
"bitcoin:RVN": "2.6.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.6.1",
"bitcoin:SYS": "2.6.1",
"bitcoin:TAZ": "2.6.1",
"bitcoin:TBCH": "2.6.1",
@@ -485,7 +476,6 @@
"bitcoin:tPPC": "2.6.1",
"bitcoin:tQTUM": "2.6.1",
"bitcoin:tRVN": "2.6.1",
- "bitcoin:tSMART": "2.6.1",
"erc20:bnb:ATOM": "2.6.1",
"erc20:eth:AAVE": "2.6.1",
"erc20:eth:APE": "2.6.1",
@@ -575,7 +565,6 @@
"bitcoin:RITO": "2.6.1",
"bitcoin:RVN": "2.6.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.6.1",
"bitcoin:SYS": "2.6.1",
"bitcoin:TAZ": "2.6.1",
"bitcoin:TBCH": "2.6.1",
@@ -595,7 +584,6 @@
"bitcoin:tPPC": "2.6.1",
"bitcoin:tQTUM": "2.6.1",
"bitcoin:tRVN": "2.6.1",
- "bitcoin:tSMART": "2.6.1",
"erc20:bnb:ATOM": "2.6.1",
"erc20:eth:AAVE": "2.6.1",
"erc20:eth:APE": "2.6.1",
@@ -686,7 +674,6 @@
"bitcoin:RITO": "2.6.1",
"bitcoin:RVN": "2.6.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.6.1",
"bitcoin:SYS": "2.6.1",
"bitcoin:TAZ": "2.6.1",
"bitcoin:TBCH": "2.6.1",
@@ -706,7 +693,6 @@
"bitcoin:tPPC": "2.6.1",
"bitcoin:tQTUM": "2.6.1",
"bitcoin:tRVN": "2.6.1",
- "bitcoin:tSMART": "2.6.1",
"erc20:bnb:ATOM": "2.6.1",
"erc20:eth:AAVE": "2.6.1",
"erc20:eth:APE": "2.6.1",
@@ -797,7 +783,6 @@
"bitcoin:RITO": "2.6.1",
"bitcoin:RVN": "2.6.1",
"bitcoin:SIGNET": "2.12.1",
- "bitcoin:SMART": "2.6.1",
"bitcoin:SYS": "2.6.1",
"bitcoin:TAZ": "2.6.1",
"bitcoin:TBCH": "2.6.1",
@@ -817,7 +802,6 @@
"bitcoin:tPPC": "2.6.1",
"bitcoin:tQTUM": "2.6.1",
"bitcoin:tRVN": "2.6.1",
- "bitcoin:tSMART": "2.6.1",
"erc20:bnb:ATOM": "2.6.1",
"erc20:eth:AAVE": "2.6.1",
"erc20:eth:APE": "2.6.1",
### common/tools/coin_info.py
@@ -235,7 +235,6 @@ def do_check(coin: Coin) -> None:
choice=[
"secp256k1",
"secp256k1_decred",
- "secp256k1_smart",
],
),
check_key("address_type", int),
### core/.changelog.d/8295.removed
@@ -0,0 +1 @@
+Remove SmartCash support.
### core/src/apps/common/coininfo.py
@@ -7,7 +7,7 @@
from typing import Any
from trezor import utils
-from trezor.crypto.base58 import blake256d_32, keccak_32, sha256d_32
+from trezor.crypto.base58 import blake256d_32, sha256d_32
from trezor.crypto.scripts import blake256_ripemd160, sha256_ripemd160
# flake8: noqa
@@ -71,10 +71,6 @@ def __init__(
self.b58_hash = blake256d_32
self.sign_hash_double = False
self.script_hash: type[utils.HashContextInitable] = blake256_ripemd160
- elif curve_name == "secp256k1-smart":
- self.b58_hash = keccak_32
- self.sign_hash_double = False
- self.script_hash = sha256_ripemd160
else:
self.b58_hash = sha256d_32
self.sign_hash_double = True
@@ -986,62 +982,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -2473,62 +2413,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -3764,62 +3648,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -5027,62 +4855,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -6290,62 +6062,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -7553,62 +7269,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
@@ -8816,62 +8476,6 @@ def by_name(name: str) -> CoinInfo:
False, # timestamp
False, # overwintered
)
- if name == "SmartCash":
- return CoinInfo(
- name, # coin_name
- "SMART", # coin_shortcut
- 8, # decimals
- 63, # address_type
- 18, # address_type_p2sh
- 780000000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x0488b21e, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 224, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
- if name == "SmartCash Testnet":
- return CoinInfo(
- name, # coin_name
- "tSMART", # coin_shortcut
- 8, # decimals
- 65, # address_type
- 21, # address_type_p2sh
- 1000000, # maxfee_kb
- "SmartCash Signed Message:\n", # signed_message_header
- 0x043587cf, # xpub_magic
- None, # xpub_magic_segwit_p2sh
- None, # xpub_magic_segwit_native
- None, # xpub_magic_multisig_segwit_p2sh
- None, # xpub_magic_multisig_segwit_native
- None, # bech32_prefix
- None, # cashaddr_prefix
- 1, # slip44
- False, # segwit
- False, # taproot
- None, # fork_id
- False, # force_bip143
- False, # decred
- False, # negative_fee
- 'secp256k1-smart', # curve_name
- False, # extra_data
- False, # timestamp
- False, # overwintered
- )
if name == "Stakenet":
return CoinInfo(
name, # coin_name
### core/src/apps/common/coininfo.py.mako
@@ -7,7 +7,7 @@
from typing import Any
from trezor import utils
-from trezor.crypto.base58 import blake256d_32, keccak_32, sha256d_32
+from trezor.crypto.base58 import blake256d_32, sha256d_32
from trezor.crypto.scripts import blake256_ripemd160, sha256_ripemd160
# flake8: noqa
@@ -71,10 +71,6 @@ class CoinInfo:
self.b58_hash = blake256d_32
self.sign_hash_double = False
self.script_hash: type[utils.HashContextInitable] = blake256_ripemd160
- elif curve_name == "secp256k1-smart":
- self.b58_hash = keccak_32
- self.sign_hash_double = False
- self.script_hash = sha256_ripemd160
else:
self.b58_hash = sha256d_32
self.sign_hash_double = True
### crypto/bip32.c
@@ -694,9 +694,6 @@ const curve_info *get_curve_by_name(const char *curve_name) {
if (strcmp(curve_name, SECP256K1_DECRED_NAME) == 0) {
return &secp256k1_decred_info;
}
- if (strcmp(curve_name, SECP256K1_SMART_NAME) == 0) {
- return &secp256k1_smart_info;
- }
if (strcmp(curve_name, NIST256P1_NAME) == 0) {
return &nist256p1_info;
}
### crypto/curves.c
@@ -24,7 +24,6 @@
const char SECP256K1_NAME[] = "secp256k1";
const char SECP256K1_DECRED_NAME[] = "secp256k1-decred";
-const char SECP256K1_SMART_NAME[] = "secp256k1-smart";
const char NIST256P1_NAME[] = "nist256p1";
const char ED25519_NAME[] = "ed25519";
const char ED25519_SEED_NAME[] = "ed25519 seed";
### crypto/curves.h
@@ -27,7 +27,6 @@
extern const char SECP256K1_NAME[];
extern const char SECP256K1_DECRED_NAME[];
-extern const char SECP256K1_SMART_NAME[];
extern const char NIST256P1_NAME[];
extern const char ED25519_NAME[];
extern const char ED25519_SEED_NAME[];
### crypto/fuzzer/fuzzer.c
@@ -344,8 +344,7 @@ int fuzz_base58_encode_check(void) {
size_t ret = 0;
// run multiple hasher variants for the same input
base58_encode_check(in_buffer, raw_inlen, HASHER_SHA2D, out_buffer, outlen);
- base58_encode_check(in_buffer, raw_inlen, HASHER_BLAKED, out_buffer, outlen);
- ret = base58_encode_check(in_buffer, raw_inlen, HASHER_SHA3K, out_buffer,
+ ret = base58_encode_check(in_buffer, raw_inlen, HASHER_BLAKED, out_buffer,
outlen);
// check one of the encode results
@@ -380,7 +379,6 @@ int fuzz_base58_decode_check(void) {
// run multiple hasher variants for the same input
base58_decode_check(in_char, HASHER_SHA2D, out_buffer, MAX_ADDR_RAW_SIZE);
base58_decode_check(in_char, HASHER_BLAKED, out_buffer, MAX_ADDR_RAW_SIZE);
- base58_decode_check(in_char, HASHER_SHA3K, out_buffer, MAX_ADDR_RAW_SIZE);
check_msan(out_buffer, MAX_ADDR_RAW_SIZE);
### crypto/secp256k1.c
@@ -74,12 +74,3 @@ const curve_info secp256k1_decred_info = {
.hasher_pubkey = HASHER_BLAKE_RIPEMD,
.hasher_script = HASHER_BLAKE,
};
-
-const curve_info secp256k1_smart_info = {
- .bip32_name = "Bitcoin seed",
- .params = &secp256k1,
- .hasher_base58 = HASHER_SHA3K,
- .hasher_sign = HASHER_SHA2,
- .hasher_pubkey = HASHER_SHA2_RIPEMD,
- .hasher_script = HASHER_SHA2,
-};
### crypto/secp256k1.h
@@ -32,6 +32,5 @@
extern const ecdsa_curve secp256k1;
extern const curve_info secp256k1_info;
extern const curve_info secp256k1_decred_info;
-extern const curve_info secp256k1_smart_info;
#endif
### legacy/firmware/.changelog.d/8295.removed
@@ -0,0 +1 @@
+Remove SmartCash support.Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.