Symmetric Cryptographic Intel FPGA Hard IP User Guide

ID 714305
Date 10/02/2023
Public
Document Table of Contents

4.6. Error Handling

When the Symmetric Cryptographic IP core encounters an error, it does not hang. However, the incorrect inputs may cause the IP core enter an incorrect state. In this event, the IP core generates an error.
The Symmetric Cryptographic IP core sends the following signals to identify the error type and logs them in the IP cores log registers. The registers can log up to 8 unique errors.
  • tuser.error_status
  • tuser.internal_error: When set, indicates unrecoverable error. You must toggle the subsystem_cold_reset_n reset to recover the IP from this error.
  • tuser.err_code[4:0]: 5 bit signal indicating the error type. Asserting the tuser.error_clear signal clears the error for a selected profile.
  • tuser.auth_error: When set, the ICV detected a mismatch when comparing the received authentication tag with the calculated authentication tag on the decryption request. When set, you must discard the data.
Figure 7. Error Handling
Table 19.  Detected Errors by the Symmetric Cryptographic IP CoreThis table describes the errors.
Error Code [4:0] Name Description
Cryptographic Code Errors
0x00 IV/Tweak Core unavailable

Attempt to load IV or Tweak with first input word while IV/Tweak core is not available.

This error occurs in XTS mode when you try to send in more than 4 tweaks in 16 clocks.

0x01 Transfer without SOB.

Started the data transfer but did not receive the start of the block (SOB).

0x02 EOB without SOB. Received the end of the block (EOB) without the start of the block (SOB).
0x03 Reserved  
0x04 Key RAM uncorrectable error  
0x05 Invalid CTS request The IP received a CTS request when the CTS mode is disabled in hardware.
0x06 AES counter overflow

The AES counter rolled over AES GCM allowed limit.

0x07 Invalid XTS key request Loaded XTS key for decryption but no decrypt key scheduler core is available.
0x08 Invalid SM4 request The IP received a SM4 request when the SM4 mode is disabled in hardware.
0x09 Invalid CTS request The IP received a CTS request when no CTS core is available. You sent in more than 4 CTS requests per 16 blocks.
Mode Errors
0x12 Invalid SM4 request The IP received a SM4 request when the SM4 mode is disabled in hardware.
0x13 Invalid AES request The IP received an AES request when the AES mode is disabled in hardware.
0x14 Invalid XTS request The IP received an XTS request when the XTS is mode disabled in hardware.
Packet Processing Errors
0x17 No key. You tried to initiate the data authentication, encryption or decryption, without sending a key earlier.

Applicable to MACsec, IPsec, generic GCM, and generic XTS patterns.

0x18 No IV or tweak value. You did not send any IV or tweak value at the beginning of the packets.

Applicable for generic GCM and generic XTS patterns.

0x19 No IV or tweak value.

Applicable for the MACsec pattern.

You did not send any IV or tweak value at the beginning of the packets.
0x1A No data end of packet (EOP).

Applicable for IPsec, generic GCM, and generic XTS patterns.

You initiated encryption or decryption but did not toggle end of packet indicator. The transfer reached maximum length limit.
0x1B No data end of packet (EOP).

Applicable for MACsec.

You initiated encryption or decryption but did not toggle end of packet indicator. The transfer reached maximum length limit.
0x1C No data last indicator. You did not indicate the data_last_indicator for XTS and CTS modes.
0x1F Other errors Miscellaneous errors
Important:

The SM4 algorithm only supports 128 bit key size. If you specify a 256 bit key, the Symmetric Cryptographic IP core considers only 128 bits of a 256-bit key and completes the request without any error.

Follow these steps to record and report the received errors to the soft logic:
  1. Deassert the subsystem_cold_rst_n reset.
  2. Enable the recoverable error mask.
    • Enable the masks for the packet processing errors using the packer_ctrl1 and packer_ctrl2 registers to log the error in the ferr_log register.
    • Enable which errors are forwarded by writing to the err_code_ctrl1 and err_code_ctrl2 registers. These register values are forwarded to soft logic via AXI-ST tuser.error_code bits.
  3. Enable the internal error mask.
    • Enable the internal errors to log in the ferr_log file by writing the interr_ctrl register.
    • Enable with errors are forwarded by writing to the err_code_int register. The register value is forwarded to soft logic via AXI-ST tuser.error_code bits.
  4. Start streaming the new data into the Symmetric Cryptographic IP core.