mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
bip32, options: optionally exclude 25519 curves in BIP32 support
This commit is contained in:
parent
877998fa1a
commit
b0af159096
6
bip32.c
6
bip32.c
@ -421,6 +421,8 @@ void hdnode_fill_public_key(HDNode *node)
|
||||
{
|
||||
if (node->public_key[0] != 0)
|
||||
return;
|
||||
|
||||
#if USE_BIP32_25519_CURVES
|
||||
if (node->curve->params) {
|
||||
ecdsa_get_public_key33(node->curve->params, node->private_key, node->public_key);
|
||||
} else {
|
||||
@ -437,6 +439,10 @@ void hdnode_fill_public_key(HDNode *node)
|
||||
curve25519_scalarmult_basepoint(node->public_key + 1, node->private_key);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
ecdsa_get_public_key33(node->curve->params, node->private_key, node->public_key);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if USE_ETHEREUM
|
||||
|
Loading…
Reference in New Issue
Block a user