diff --git a/bip32.c b/bip32.c index d7d7baa14d..7a510f3b1f 100644 --- a/bip32.c +++ b/bip32.c @@ -893,6 +893,9 @@ const curve_info *get_curve_by_name(const char *curve_name) { if (strcmp(curve_name, SECP256K1_GROESTL_NAME) == 0) { return &secp256k1_groestl_info; } + if (strcmp(curve_name, SECP256K1_SMART_NAME) == 0) { + return &secp256k1_smart_info; + } if (strcmp(curve_name, NIST256P1_NAME) == 0) { return &nist256p1_info; } diff --git a/curves.c b/curves.c index 64244560b0..972339bdd7 100644 --- a/curves.c +++ b/curves.c @@ -25,6 +25,7 @@ const char SECP256K1_NAME[] = "secp256k1"; const char SECP256K1_DECRED_NAME[] = "secp256k1-decred"; const char SECP256K1_GROESTL_NAME[] = "secp256k1-groestl"; +const char SECP256K1_SMART_NAME[] = "secp256k1-smart"; const char NIST256P1_NAME[] = "nist256p1"; const char ED25519_NAME[] = "ed25519"; const char ED25519_CARDANO_NAME[] = "ed25519 cardano seed"; diff --git a/curves.h b/curves.h index 8fdd3c55dd..34b796eb0e 100644 --- a/curves.h +++ b/curves.h @@ -28,6 +28,7 @@ extern const char SECP256K1_NAME[]; extern const char SECP256K1_DECRED_NAME[]; extern const char SECP256K1_GROESTL_NAME[]; +extern const char SECP256K1_SMART_NAME[]; extern const char NIST256P1_NAME[]; extern const char ED25519_NAME[]; extern const char ED25519_CARDANO_NAME[]; diff --git a/secp256k1.c b/secp256k1.c index 95981eed32..e125806cb4 100644 --- a/secp256k1.c +++ b/secp256k1.c @@ -78,3 +78,11 @@ const curve_info secp256k1_groestl_info = { .hasher_sign = HASHER_SHA2, .hasher_pubkey = HASHER_SHA2_RIPEMD, }; + +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, +}; diff --git a/secp256k1.h b/secp256k1.h index a5442e50c8..234ca97a9e 100644 --- a/secp256k1.h +++ b/secp256k1.h @@ -33,5 +33,6 @@ extern const ecdsa_curve secp256k1; extern const curve_info secp256k1_info; extern const curve_info secp256k1_decred_info; extern const curve_info secp256k1_groestl_info; +extern const curve_info secp256k1_smart_info; #endif