What changed, and why it matters
This commit simply removes a duplicate definition of a constant in one file because the same definition already exists in a header file. It is a routine cleanup with no security impact.
No action needed; this is a benign code-cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes a local #define SMALL_MONOTONIC_COUNTER_MAX_USE (MAX_UNLOCK_ATTEMPTS) from src/optiga/optiga.c because it is already declared in optiga.h. The constant governs how many wrong password attempts are allowed before password stretching fails. Removing the redefinition does not alter the compiled value, behavior, or security properties; it only avoids duplication and potential maintenance inconsistency.
Changed components
src/optiga/optiga.cInspect captured patch +0 / −6
diff --git a/src/optiga/optiga.c b/src/optiga/optiga.c
index f95e633..2771996 100644
--- a/src/optiga/optiga.c
+++ b/src/optiga/optiga.c
@@ -49,12 +49,6 @@
// indication of 600000 updates. See Solution Reference Manual Figure 32.
#define MONOTONIC_COUNTER_MAX_USE (590000)
-// Number of times the password can be entered incorrectly before further password stretching fails.
-// The counter is reset when the correct password is entered.
-// Must match MAX_UNLOCK_ATTEMPTS in bitbox02_smarteeprom.h and
-// MAX_UNLOCK_ATTEMPTS in rust keystore.rs.
-#define SMALL_MONOTONIC_COUNTER_MAX_USE (MAX_UNLOCK_ATTEMPTS)
-
// Maximum size of metadata. See "Metadata Update Identifier":
// https://github.com/Infineon/optiga-trust-m-overview/blob/98b2b9c178f0391b1ab26b52082899704dab688a/docs/OPTIGA%E2%84%A2%20Trust%20M%20Solution%20Reference%20Manual.md#linka946a953_def2_41cf_850a_74fb7899fe11
// Two extra bytes for the `0x20 <len>` header bytes.
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.