optiga: rename FINAL_LCSO_STATE -> FINAL_LCSO_STATE_V0
What changed, and why it matters
This commit is a simple rename of a constant used in metadata definitions for the Optiga secure chip. The old name FINAL_LCSO_STATE is changed to FINAL_LCSO_STATE_V0 to make clear it applies only to the older V0 chip configuration. The actual value and behavior remain exactly the same. There is no security fix or vulnerability here.
No security action needed. Treat as routine refactoring/cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is a pure identifier rename in src/optiga/optiga.c. The macro FINAL_LCSO_STATE, defined as LCSO_STATE_OPERATIONAL, is renamed to FINAL_LCSO_STATE_V0, and all references in static metadata byte arrays are updated. No values, logic, access conditions, or LcsO lifecycle behavior change. The commit message explains the rename is preparatory for future V1 configuration metadata, which will need its own constant because V0 metadata is already finalized/operational.
Changed components
src/optiga/optiga.cInspect captured patch +10 / −10
diff --git a/src/optiga/optiga.c b/src/optiga/optiga.c
index a7e7e04..ac27727 100644
--- a/src/optiga/optiga.c
+++ b/src/optiga/optiga.c
@@ -77,7 +77,7 @@ static const securechip_interface_functions_t* _ifs = NULL;
// Set the object LcsO flag to Operational. After this, the metadata cannot be changed anymore.
// During development, set this to `LCSO_STATE_CREATION`.
-#define FINAL_LCSO_STATE LCSO_STATE_OPERATIONAL
+#define FINAL_LCSO_STATE_V0 LCSO_STATE_OPERATIONAL
#if FACTORYSETUP == 1 || FACTORY_DURING_PROD == 1 || VERIFY_METADATA == 1
static const uint8_t _platform_binding_metadata[] = {
@@ -88,7 +88,7 @@ static const uint8_t _platform_binding_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Change/Write access. This allows updating the binding secret when LcsO < op.
0xD0,
0x03,
@@ -117,7 +117,7 @@ static const uint8_t _aes_symkey_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Set key usage to "Enc".
// See Table "Metadata associated with data and key objects" -> 0xE1
// https://github.com/Infineon/optiga-trust-m-overview/blob/98b2b9c178f0391b1ab26b52082899704dab688a/docs/OPTIGA%E2%84%A2%20Trust%20M%20Solution%20Reference%20Manual.md#link8051b344_ff66_4d6b_bcfd_d21bb87d05d4
@@ -162,7 +162,7 @@ static const uint8_t _hmac_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Data object type: PRESSEC
// See table "Data Object Types":
// https://github.com/Infineon/optiga-trust-m-overview/blob/98b2b9c178f0391b1ab26b52082899704dab688a/docs/OPTIGA%E2%84%A2%20Trust%20M%20Solution%20Reference%20Manual.md#linkaf9aa284_1397_4161_8761_8c44fbbfa69d
@@ -197,7 +197,7 @@ static const uint8_t _arbitrary_data_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Data object type: BSTR.
// See table "Data Object Types":
// https://github.com/Infineon/optiga-trust-m-overview/blob/98b2b9c178f0391b1ab26b52082899704dab688a/docs/OPTIGA%E2%84%A2%20Trust%20M%20Solution%20Reference%20Manual.md#linkaf9aa284_1397_4161_8761_8c44fbbfa69d
@@ -230,7 +230,7 @@ static const uint8_t _attestation_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Key usage associated with key container: Sign
// See table "Metadata associated with data and key objects":
// https://github.com/Infineon/optiga-trust-m-overview/blob/98b2b9c178f0391b1ab26b52082899704dab688a/docs/OPTIGA%E2%84%A2%20Trust%20M%20Solution%20Reference%20Manual.md#link8051b344_ff66_4d6b_bcfd_d21bb87d05d4
@@ -268,7 +268,7 @@ static const uint8_t _counter_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Change/Write access. This allows updating the counter when LcsO < op.
0xD0,
0x03,
@@ -295,7 +295,7 @@ static const uint8_t _password_secret_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Allow writes, enforce shielded connection.
0xD0,
0x03,
@@ -333,7 +333,7 @@ static const uint8_t _password_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Allow writes, auth referencing 0xF1D2 (`OID_PASSWORD_SECRET`), enforce shielded connection.
0xD0,
0x07,
@@ -377,7 +377,7 @@ static const uint8_t _counter_password_metadata[] = {
// Set LcsO. Refer to macro to see the value or some more notes.
0xC0,
0x01,
- FINAL_LCSO_STATE,
+ FINAL_LCSO_STATE_V0,
// Allow writes, auth referencing 0xF1D2 (`OID_PASSWORD_SECRET`), enforce shielded connection.
0xD0,
0x07,
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.