-
Notifications
You must be signed in to change notification settings - Fork 2
[ Example ] Command Access Condition Provisioning
This example demonstrates how to configure command access conditions (AC) and encryption flags for STSAFE-A120 commands.
Command access conditions define the security level required to execute specific commands, while encryption flags control whether command and response frames must be encrypted when using a host secure session.
Access condition provisioning is a critical security configuration that determines which commands can be executed freely, which require host authentication (via host session), and which are forbidden.
This configuration is typically performed during device personalization and cannot be changed afterward once the change right is disabled.
The following flowchart illustrates the command AC provisioning process:
Upon execution, the host terminal displays the current and updated command access conditions:
-----------------------------------------------------------------------------------------------------------------
- STSAFE-A120 Command Access Condition Provisioning -
-----------------------------------------------------------------------------------------------------------------
- Initialize target STSAFE-A120
- Query current command AC records
HEADER | EXT-HEADER | AC | CMDEnc | RSPEnc
0x00 | - | FREE | NO | NO
0x02 | - | FREE | NO | NO
0x0E | - | HOST | YES | NO
0x0F | - | HOST | NO | YES
+--------------------------------------------------------------------------------------------------------------+
| |
| /!\ W A R N I N G /!\ |
| |
| This operation will permanently configure command access conditions. |
| Incorrect settings may lock device functions. |
| |
| Press any key to continue and provision access conditions: |
| |
+--------------------------------------------------------------------------------------------------------------+
- Provisioning command access conditions...
- Provisioning encryption flags...
- Query updated command AC records
HEADER | EXT-HEADER | AC | CMDEnc | RSPEnc
0x00 | - | FREE | NO | NO
0x02 | - | FREE | NO | NO
0x0E | - | HOST | YES | NO
0x0F | - | HOST | NO | YES
- Command AC provisioning completed successfully
The STSAFE-A120 supports several access condition levels:
- FREE (0x01): Command can be executed without any authentication. Suitable for read operations and non-sensitive commands.
- HOST (0x03): Command requires host authentication via a secure session (C-MAC). Protects sensitive operations.
- ADMIN: Command requires administrative password authentication. Used for critical configuration operations.
- NEVER: Command is permanently disabled and cannot be executed.
Encryption flags control data protection during command execution:
- ENCRYPT_NO (0x00): No encryption required for command or response.
- ENCRYPT_CMD (0x02): Command frame must be encrypted (C-ENC).
- ENCRYPT_RSP (0x01): Response frame must be encrypted (R-ENC).
- ENCRYPT_BOTH (0x03): Both command and response must be encrypted.
Command access condition provisioning is essential for:
- Production Device Personalization: Configure security policies during device manufacturing to enforce access controls.
- Security Hardening: Lock down sensitive commands to prevent unauthorized access in deployed devices.
- Compliance Requirements: Meet regulatory requirements by enforcing authentication for specific operations.
- Multi-Tenant Systems: Configure different access levels for different users or applications sharing the same device.
- Secure Communication: Enforce encryption for commands that handle sensitive data (e.g., key wrapping, unwrapping).
WARNING: This is a permanent operation. Once the change right is disabled, command access conditions cannot be modified. Carefully plan and test your AC configuration before deploying to production devices.
- STSAFE-A120 Secure Element
- STSAFE-A110 Secure Element
- Feature Description
- Standard Use-cases
- Product Perso Profile
- STSAFE-A120 : X-NUCLEO-ESE01A1
- STSAFE-A110 : X-NUCLEO-SAFEA1
- Software Package Architecture
- Getting Started with Software Package
-
Project examples list
- Project template
- Echo loop
- Random number generation
- NIST P-256 key pair generation
- NIST P-512 key pair generation
- BRAINPOOL P-512 Key Pair Generation
- Edwards-25519 Key Pair Generation
- Secure Data Storage Zone Access
- Secure data storage counter access
- Hash
- Device authentication
- Multi-step device authentication
- Host key provisioning
- Host key provisioning (Wrapped)
- Command Access Condition provisioning
- Secret or key wrapping
- ECDH
- Symmetric key provisioning Control Fields
- Symmetric key establishment AES-128 CMAC
- Symmetric key establishment AES-256 CCM
- Symmetric Key Management AES-128 CMAC
- Symmetric Key Management AES-256 CCM
- Wrapped Symmetric Key Provisioning - AES-128 CMAC
- Wrapped Symmetric Key Provisioning - AES-256 CCM*