mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 16:00:57 +00:00
fix(core): fix build with FEATURE_FLAGS.SECP256K1_ZKP=False
[no changelog]
This commit is contained in:
parent
f0cc7f3327
commit
6052e71bbb
@ -10,7 +10,7 @@ UI2 = ARGUMENTS.get('UI2', '0') == '1' or TREZOR_MODEL == '1'
|
|||||||
|
|
||||||
FEATURE_FLAGS = {
|
FEATURE_FLAGS = {
|
||||||
"RDI": True,
|
"RDI": True,
|
||||||
"SECP256K1_ZKP": True,
|
"SECP256K1_ZKP": True, # required for trezor.crypto.curve.bip340 (BIP340/Taproot)
|
||||||
"SYSTEM_VIEW": False,
|
"SYSTEM_VIEW": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
|||||||
UI2 = ARGUMENTS.get('UI2', '0') == '1' or TREZOR_MODEL == '1'
|
UI2 = ARGUMENTS.get('UI2', '0') == '1' or TREZOR_MODEL == '1'
|
||||||
|
|
||||||
FEATURE_FLAGS = {
|
FEATURE_FLAGS = {
|
||||||
"SECP256K1_ZKP": True,
|
"SECP256K1_ZKP": True, # required for trezor.crypto.curve.bip340 (BIP340/Taproot)
|
||||||
}
|
}
|
||||||
|
|
||||||
CCFLAGS_MOD = ''
|
CCFLAGS_MOD = ''
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if USE_SECP256K1_ZKP
|
||||||
|
|
||||||
#include "py/objstr.h"
|
#include "py/objstr.h"
|
||||||
|
|
||||||
#include "rand.h"
|
#include "rand.h"
|
||||||
@ -261,3 +263,5 @@ STATIC const mp_obj_module_t mod_trezorcrypto_bip340_module = {
|
|||||||
.base = {&mp_type_module},
|
.base = {&mp_type_module},
|
||||||
.globals = (mp_obj_dict_t *)&mod_trezorcrypto_bip340_globals,
|
.globals = (mp_obj_dict_t *)&mod_trezorcrypto_bip340_globals,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -38,7 +38,9 @@ static void wrapped_ui_wait_callback(uint32_t current, uint32_t total) {
|
|||||||
|
|
||||||
#include "modtrezorcrypto-aes.h"
|
#include "modtrezorcrypto-aes.h"
|
||||||
#include "modtrezorcrypto-bip32.h"
|
#include "modtrezorcrypto-bip32.h"
|
||||||
|
#ifdef USE_SECP256K1_ZKP
|
||||||
#include "modtrezorcrypto-bip340.h"
|
#include "modtrezorcrypto-bip340.h"
|
||||||
|
#endif
|
||||||
#include "modtrezorcrypto-bip39.h"
|
#include "modtrezorcrypto-bip39.h"
|
||||||
#include "modtrezorcrypto-blake256.h"
|
#include "modtrezorcrypto-blake256.h"
|
||||||
#include "modtrezorcrypto-blake2b.h"
|
#include "modtrezorcrypto-blake2b.h"
|
||||||
@ -104,7 +106,9 @@ STATIC const mp_rom_map_elem_t mp_module_trezorcrypto_globals_table[] = {
|
|||||||
MP_ROM_PTR(&mod_trezorcrypto_Ripemd160_type)},
|
MP_ROM_PTR(&mod_trezorcrypto_Ripemd160_type)},
|
||||||
{MP_ROM_QSTR(MP_QSTR_secp256k1),
|
{MP_ROM_QSTR(MP_QSTR_secp256k1),
|
||||||
MP_ROM_PTR(&mod_trezorcrypto_secp256k1_module)},
|
MP_ROM_PTR(&mod_trezorcrypto_secp256k1_module)},
|
||||||
|
#if USE_SECP256K1_ZKP
|
||||||
{MP_ROM_QSTR(MP_QSTR_bip340), MP_ROM_PTR(&mod_trezorcrypto_bip340_module)},
|
{MP_ROM_QSTR(MP_QSTR_bip340), MP_ROM_PTR(&mod_trezorcrypto_bip340_module)},
|
||||||
|
#endif
|
||||||
{MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&mod_trezorcrypto_Sha1_type)},
|
{MP_ROM_QSTR(MP_QSTR_sha1), MP_ROM_PTR(&mod_trezorcrypto_Sha1_type)},
|
||||||
{MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&mod_trezorcrypto_Sha256_type)},
|
{MP_ROM_QSTR(MP_QSTR_sha256), MP_ROM_PTR(&mod_trezorcrypto_Sha256_type)},
|
||||||
{MP_ROM_QSTR(MP_QSTR_sha512), MP_ROM_PTR(&mod_trezorcrypto_Sha512_type)},
|
{MP_ROM_QSTR(MP_QSTR_sha512), MP_ROM_PTR(&mod_trezorcrypto_Sha512_type)},
|
||||||
|
Loading…
Reference in New Issue
Block a user