build(core+legacy+crypto): remove unused `ENABLE_MODULE_GENERATOR` flag
What changed, and why it matters
This commit removes an unused compiler flag called ENABLE_MODULE_GENERATOR from three build files. The flag was left over from an older version of a cryptographic library and no longer has any effect after Trezor switched to a different library version. There is no functional code change and no security risk.
No security action needed. This is a benign build cleanup. Normal code review and merge procedures apply.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes the -DENABLE_MODULE_GENERATOR macro definition from core/embed/crypto/build.rs, crypto/Makefile, and legacy/firmware/Makefile. The commit message explains this flag belonged to the BlockstreamResearch secp256k1-zkp fork and became unused after migrating to bitcoin-core/secp256k1. The change is purely a build cleanup with no runtime behavior change.
Changed components
core/embed/crypto/build.rscrypto/Makefilelegacy/firmware/MakefileInspect captured patch +0 / −3
### core/embed/crypto/build.rs
@@ -281,7 +281,6 @@ fn add_secp256k1_zkp(lib: &mut CLibrary, _attrs: &CompileAttrs) -> Result<()> {
("USE_SECP256K1_ZKP_ECDSA", None),
("USE_EXTERNAL_DEFAULT_CALLBACKS", None),
("ECMULT_WINDOW_SIZE", Some("2")),
- ("ENABLE_MODULE_GENERATOR", None),
("ENABLE_MODULE_RECOVERY", None),
("ENABLE_MODULE_SCHNORRSIG", None),
("ENABLE_MODULE_EXTRAKEYS", None),
### crypto/Makefile
@@ -67,7 +67,6 @@ endif
ZKP_CFLAGS = \
-DECMULT_WINDOW_SIZE=2 \
- -DENABLE_MODULE_GENERATOR \
-DENABLE_MODULE_RECOVERY \
-DENABLE_MODULE_SCHNORRSIG \
-DENABLE_MODULE_EXTRAKEYS \
### legacy/firmware/Makefile
@@ -21,7 +21,6 @@ ZKP_CFLAGS = \
-DUSE_EXTERNAL_ASM \
-DUSE_EXTERNAL_DEFAULT_CALLBACKS \
-DECMULT_WINDOW_SIZE=2 \
- -DENABLE_MODULE_GENERATOR \
-DENABLE_MODULE_RECOVERY \
-DENABLE_MODULE_SCHNORRSIG \
-DENABLE_MODULE_EXTRAKEYS \Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.