mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
add smartcash curve (#176)
This commit is contained in:
parent
bf1e1b13a6
commit
1863045da4
3
bip32.c
3
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;
|
||||
}
|
||||
|
1
curves.c
1
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";
|
||||
|
1
curves.h
1
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[];
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user