3.3 B6.ER3 Write Command Returns Bad Handle(0x85) Error When Run After an Interrupted Write
Issue Description
Interrupting a Write command, by means of a device reset such as a power loss, running within an AES 128 Auth session results in a Bad Handle (0x85) error for subsequent write operations to that handle.
- The
Read_Permattribute of the Shared Data Element handle being written is not set toAlways.Table 3-1. Read_PermAttribute Values for AES-128 GCMByte# Bit# Size Bits Name Description 6 5:4 2 Read_Perm `b00 (Never): This element can never be written with the Write command.
`b10 (Auth): Writes of this element must be run within an authorization session created with Write_Key.
`b11 (Claims): Write requires claims in Write_Key.
- The handle used to establish
the
Authsession in which the Write command executes is AES-GCM 128. The corresponding Key_Type and Alg_Mode values are provided below.Table 3-2. Key_Type and Alg_Mode Values for AES-128 GCM Key Type (Hex) Alg Mode Description 0xC 1 AES-128 GCM
Work Around
The following options are recommended to mitigate this issue:
- Avoid interrupting a Write command by using the Reset pin or performing a power cycle.
- Set the
Read_permhandle attribute toAlwaysif reading the contents of the handle is considered safe and does not involve any sensitive information.Table 3-3. Work Arounds with Various Write_PermandDelete_PermAttributesName Description of Affected Handle Attributes and Applicable Work Arounds Write_Perm b01 (Always): Always legal to write.Work arounds: - Write command can be used
outside of
Authsession (or) - Write command can be used within a CMAC- or HMAC-based Auth session.
b10 (Auth): Writes of this element must be run within an authorization session created with Write_Key.Work around: Use the Write command within a CMAC- or HMAC-based Auth session. b11 (Claims): Write requires claims in Write_Key.Work around: Use the Write command within a CMAC- or HMAC-based Auth session. Note: The Session_Use parameter determines the applicability of theCMACorHMACAuthsession work around.Delete_Perm b00 (Never): Element may not be deleted, only modified.Work around: If the Session_Use parameter is set to
mandatory(encrypted session), then it is required to Delete, Create and Write the handle again. This work around mandatesDelete_Permnot be set to Never.b01 (Always): Element can always be deleted.
b10 (Auth): Element can be deleted when authorized using a Write_Key.
b11 (Claims): Deletion requires Claims in Write_Key.
The following table provides the Session Use Field Coding values for the Symmetric Key class.Table 3-4. Session Use Field Coding Value Use for Auth Session Encrypted Session Details 1 Either Optional Can use CMAC / HMAC 2 Either Optional Can use CMAC / HMAC 3 Either Mandatory Can use only AES-GCM 4 Only Mandatory Can use only AES-GCM 5 Only Optional Can use CMAC / HMAC 6 Only Optional Can use CMAC / HMAC 7 Only Mandatory Can use only AES-GCM - Write command can be used
outside of
Corrective Actions
No corrective action is required for this issue. Please implement one of the recommended work around options.
