Symmetric Cryptographic Intel FPGA Hard IP User Guide

ID 714305
Date 12/19/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

6.4. Generic XTS Profile (XTS)

This profile is a non-optimized generic XTS usage pattern. To select the XTS profile, you set tuser.pattern[2:0] to 3'd4.
You must specify the following inputs when using the XTS profile.
  • Key: Two keys, each either 256 bit or a 128 bit keys. The first key is used for XTS encryption or decryption. The second key is used to generate the XTS tweak value.
  • Data/Text: Contains the plaintext or ciphertext data requiring the encryption or decryption. The data size range is up to 220 AES blocks, each 128 bits in size.
  • Tweak: 128 bit tweak or a sector number or an address. Every XTS operation requires a tweak value.

The following output information is identified when using the XTS profile:
  • Data/Text: Contains the plaintext or ciphertext data which requires the encryption or decryption.
  • Key: The key size is for both, the tweak value and the data key:
    • 128 or 256 bit key for AES XTS mode
    • 128 bit key for SM4 XTS mode
  • The packet size supports a text size of any length.
  • Supports a new tweak every 256 bytes.
  • Supports CTS mode for XTS at a 256-byte granularity which is not more than 3 CTS requests every 20 clock cycles.
    Note: The Symmetric Cryptographic IP core implements counters to monitor the number of XTS tweaks, CTS within 20 cycles, and a decryption key cycle within 16 clock cycles. If any of these counters reaches the limit within the specified window, the soft IP injects a key cycle with an XTS profile using channel 1,023 into the AES/SM4 Inline Cryptographic Accelerator for 12 clock cycles. The limit value depends on the operation; use the limit value of 4 for tweak and decryption key and the limit value of 3 for the CTS mode.

    During this period, the AXI-ST tready signal is deasserted, and you cannot send any request into the Symmetric Cryptographic IP core. Once the key injection cycles are completed, the AXI-ST tready signal asserts, and you can resume the operation as usual.

    The XTS traffic must not exceed the limits within specified windows.

    Note: The CTS has a restriction in this pattern where the last two blocks should either be sent in the same clock or back-to-back clocks. If the last two blocks are not in the same clock cycle, you cannot interleave other pattern cycles in between. Both cycles should be sent back-to-back.
    Note: Due to the counter logic outlined above, the IP deasserts AXI-ST tready if the limits are reached. In this event, performance degradation is observed if interleaving the XTS profile and the XTS packet size sent is less than 256 bytes.
  • Supports multiple channels.
  • The keys must be streamed along with the data operating on those keys. Alternatively, you can use the concept shown in Generic XTS Profile Traffic Flow to preload the keys except in the case where you are interleaving an XTS profile with a GCM profile. In that situation, you must send in the key followed by at least one cycle of data.
    Note: The XTS mode only loads a decryption key once every 16 clock cycles. The decrypt key loading operation blocks the AXI-ST interface and prevents usage of the Symmetric Cryptographic IP core for other use cases for 16 AXI-ST clocks.
  • MACSec and XTS profile interleaving is not supported.
  • When "XTS protection" logic is enabled, XTS+Generic GCM channel interleaving is supported; When it is disabled, only the frame-based interleaving with minimum text size of 241 bytes can be supported.
The following example depicts the traffic flow for the generic XTS profile. The example depicts the usage of two channels for two XTS key operations. The example programs two keys followed by a tweak value and corresponding data.
Table 41.  Generic XTS Profile Traffic Flow
Clock Cycle 1 2 3 4 5 6
Channel ID 1 2 1 1 2 1
DATA
data[127:0] Key Key Tweak Text Tweak Text
data[255:128] Key Key Text Text Text Text
data[383:256] Key Key Text Text Text Text
data[511:384] Key Key Text Text Text Text