refactor(core): fix typo in constant name
What changed, and why it matters
This commit simply renames a constant from TROPIC_MAC_AND_DESTROY_SLOTS_COUNT to TROPIC_MAC_AND_DESTROY_SLOT_COUNT (singular) across three files. The numeric value stays the same (64), and no program behavior changes. It is a typo-fixing refactor with no security relevance.
No action required; this is a non-security refactoring change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure identifier rename in C source and header files. The constant value is unchanged, and all call sites are updated consistently. There is no functional, cryptographic, or security change.
Changed components
core/embed/sec/tropic/inc/sec/tropic.hcore/embed/sec/tropic/tropic.ccore/embed/projects/prodtest/cmd/prodtest_tropic.cInspect captured patch +6 / −6
diff --git a/core/embed/projects/prodtest/cmd/prodtest_tropic.c b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
index 2901d209f..32d550f39 100644
--- a/core/embed/projects/prodtest/cmd/prodtest_tropic.c
+++ b/core/embed/projects/prodtest/cmd/prodtest_tropic.c
@@ -1590,7 +1590,7 @@ static void prodtest_tropic_stress_test(cli_t* cli) {
}
uint32_t start_session_iterations = 10;
- uint32_t mac_and_destroy_slot_count = TROPIC_MAC_AND_DESTROY_SLOTS_COUNT;
+ uint32_t mac_and_destroy_slot_count = TROPIC_MAC_AND_DESTROY_SLOT_COUNT;
uint32_t mac_and_destroy_per_slot_iterations = 3;
uint32_t signing_iterations = 10;
@@ -1602,10 +1602,10 @@ static void prodtest_tropic_stress_test(cli_t* cli) {
}
if (!cli_arg_uint32(cli, "mac-and-destroy-slot-count",
&mac_and_destroy_slot_count) ||
- mac_and_destroy_slot_count > TROPIC_MAC_AND_DESTROY_SLOTS_COUNT) {
+ mac_and_destroy_slot_count > TROPIC_MAC_AND_DESTROY_SLOT_COUNT) {
cli_error_arg(cli,
"Expecting number of MAC-and-destroy slots in range 0-%d.",
- TROPIC_MAC_AND_DESTROY_SLOTS_COUNT);
+ TROPIC_MAC_AND_DESTROY_SLOT_COUNT);
return;
}
if (!cli_arg_uint32(cli, "mac-and-destroy-per-slot-iterations",
diff --git a/core/embed/sec/tropic/inc/sec/tropic.h b/core/embed/sec/tropic/inc/sec/tropic.h
index af765c850..709d44c9b 100644
--- a/core/embed/sec/tropic/inc/sec/tropic.h
+++ b/core/embed/sec/tropic/inc/sec/tropic.h
@@ -54,7 +54,7 @@
// Mac-and-destroy slots used in PIN verification
#define TROPIC_FIRST_MAC_AND_DESTROY_SLOT_PRIVILEGED 0
#define TROPIC_FIRST_MAC_AND_DESTROY_SLOT_UNPRIVILEGED 64
-#define TROPIC_MAC_AND_DESTROY_SLOTS_COUNT 64
+#define TROPIC_MAC_AND_DESTROY_SLOT_COUNT 64
#define TROPIC_MAC_AND_DESTROY_SIZE 32
diff --git a/core/embed/sec/tropic/tropic.c b/core/embed/sec/tropic/tropic.c
index 46d6baf71..7dfbfa3df 100644
--- a/core/embed/sec/tropic/tropic.c
+++ b/core/embed/sec/tropic/tropic.c
@@ -50,7 +50,7 @@
// The value by which the index of the first mac-and-destroy slot is shifted
// before every PIN change. The value is coprime to
-// TROPIC_MAC_AND_DESTROY_SLOTS_COUNT to ensure that
+// TROPIC_MAC_AND_DESTROY_SLOT_COUNT to ensure that
// `get_mac_and_destroy_slot(i, change_pin_counter)` achieves the maximum
// possible period in `change_pin_counter`.
#define TROPIC_MAC_AND_DESTROY_SHIFT 11
@@ -481,7 +481,7 @@ static lt_mac_and_destroy_slot_t get_mac_and_destroy_slot(
return first_slot_index +
(change_pin_counter * TROPIC_MAC_AND_DESTROY_SHIFT + pin_index) %
- TROPIC_MAC_AND_DESTROY_SLOTS_COUNT;
+ TROPIC_MAC_AND_DESTROY_SLOT_COUNT;
}
static uint16_t get_kek_masks_slot(tropic_driver_t *drv) {
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.