1
0
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:
leoreinaux 2018-08-30 07:02:42 -03:00 committed by Pavol Rusnak
parent bf1e1b13a6
commit 1863045da4
5 changed files with 14 additions and 0 deletions

View File

@ -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;
}

View File

@ -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";

View File

@ -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[];

View File

@ -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,
};

View File

@ -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