refactor(core): rename feature noise to noise_kk1
What changed, and why it matters
This commit is a simple internal rename of a Rust build feature from 'noise' to 'noise_kk1' and removes one unused source file ('noise_xxpsk3.c') from the build. There is no change to how the device works, no bug fix, and no security-relevant behavior change visible in the diff.
No security action required. Treat as routine refactoring; verify downstream references to the old feature name are updated if any exist outside the diff.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch renames the Cargo feature flag ‘noise’ to ‘noise_kk1’ in three files and updates the corresponding build.rs helper from add_noise() to add_noise_kk1(). The new helper compiles only ‘noise_kk1.c’ instead of both ‘noise_kk1.c’ and ‘noise_xxpsk3.c’. This is a build-system refactor that drops an apparently unused Noise protocol implementation variant from compilation. No cryptographic logic is modified.
Changed components
core/embed/crypto/Cargo.tomlcore/embed/crypto/build.rscore/embed/projects/prodtest/Cargo.tomlInspect captured patch +7 / −11
### core/embed/crypto/Cargo.toml
@@ -35,7 +35,7 @@ emulator = ["models/emulator"]
aes_gcm = []
ed25519_no_precomp = []
mldsa = []
-noise = ["aes_gcm"]
+noise_kk1 = ["aes_gcm"]
secp256k1_zkp = []
sphincsplus = []
thp = ["dep:trezor-thp"]
@@ -47,7 +47,7 @@ test = [
"mldsa",
"models/mcu_stm32u5g",
"models/model_t3w1",
- "noise",
+ "noise_kk1",
"rtl/error_shims",
"secp256k1_zkp",
"sphincsplus",
### core/embed/crypto/build.rs
@@ -21,8 +21,8 @@ fn main() -> Result<()> {
add_aes_gcm(lib, &attrs)?;
}
- if cfg!(feature = "noise") {
- add_noise(lib, &attrs)?;
+ if cfg!(feature = "noise_kk1") {
+ add_noise_kk1(lib, &attrs)?;
}
if cfg!(feature = "secp256k1_zkp") {
@@ -249,12 +249,8 @@ fn add_aes_gcm(lib: &mut CLibrary, attrs: &CompileAttrs) -> Result<()> {
Ok(())
}
-fn add_noise(lib: &mut CLibrary, attrs: &CompileAttrs) -> Result<()> {
- lib.add_sources_in_dir_with_attrs(
- CRYPTO_PATH,
- ["noise_kk1.c", "noise_xxpsk3.c"],
- Some(attrs.clone()),
- );
+fn add_noise_kk1(lib: &mut CLibrary, attrs: &CompileAttrs) -> Result<()> {
+ lib.add_sources_in_dir_with_attrs(CRYPTO_PATH, ["noise_kk1.c"], Some(attrs.clone()));
Ok(())
}
### core/embed/projects/prodtest/Cargo.toml
@@ -123,7 +123,7 @@ default = [
"rtl/sprintf",
"crypto/aes_gcm",
"crypto/mldsa",
- "crypto/noise",
+ "crypto/noise_kk1",
"trezor_lib/crypto",
"trezor_lib/prodtest",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.