Symmetric Cryptographic Intel FPGA Hard IP User Guide

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

6.3. Generic GCM Profile (GCM)

This profile is a non-optimized generic GCM usage pattern. To select the GCM profile, you set tuser.pattern[2:0] to 3'd1.
You must specify the following inputs when using the GCM profile.
  • Key: Single 256 bit or a 128 bit key. The same key is used for GCM encryption, including the authentication, or decryption, including the authentication, operation.
  • Additional Authenticated Data (AAD): A GCM-specific additional authenticated data that requires the authentication only. The supported AAD length is a range of 0 to 264 bytes.
    Note: The AAD must be aligned to 16 bytes or padded with 0’s to align to 16 bytes in order to comply with the GCM specification.
  • Data/Text: Contains the plaintext or ciphertext data requiring the encryption or decryption. The data size range is between 0 to 239 bits.
  • Initialization Vector (IV): 128 bit IV required for all GCM operations. You must send IV along with the counter value of 32'h0000_0002 for standard GCM operation. The counter and the IV follows the little endian format.
    IV_final[127:0] = {counter[31:0] || IV[95:0]}
  • Bypass Data: Before the AAD, up to 64 KB of bypass data is supported.
    Note: The bypass data must be aligned to 16 bytes or padded with 0's for 16 byte alignment.

The following output information is identified when using the GCM profile:
  • Bypass Data: The output propagates the original entered input bypass data. The bypass data must be aligned to 16 bytes or padded with 0's for 16 byte alignment.
  • Additional Authenticated Data (AAD): A GCM-specific additional authenticated data that requires the authentication only. The output propagates the original entered input AAD value. The AAD must be aligned to 16 bytes or padded with 0's for 16 byte alignment.
  • Data/Text: Contains the plaintext or ciphertext data required for the encryption or decryption.
  • MAC: 128-bit long Ghash or GMAC authenticated tag calculated by the AES ICA Hard IP.
  • Key: The key size depends on the selected mode:
    • 128 or 256 bit key for AES GCM mode
    • 128 bit key for SM4 GCM mode
  • The packet size supports a text size of any length.
  • The bypass length and AAD length must be multiple of 16 bytes.
  • Optimized throughput for packets sizes greater than 256 bytes.
  • Supports multiple channels.
  • Supports bypass data before the AAD.
  • Supports streaming in the keys along with the data or allows you to preprogram the keys in the Symmetric Cryptographic IP core.
The following example depicts the traffic flow for the generic GCM profile. The example processes 2 packets. The first packet sends the bypass data, AAD, and data (plaintext or ciphertext). The second packet sends the AAD along with data (plaintext or ciphertext). The keys are streamed for each of these packets.
Table 39.  Generic GCM Profile Traffic Flow
Clock Cycle 1 2 3 4 5 6 7 8
DATA
data[127:0] Key Bypass Data AAD AAD Text Key Bypass Data Text
data[255:128] Key Bypass Data AAD AAD Text Key Bypass Data Text
data[383:256] IV Bypass Data AAD Text Text IV Bypass Data Text
data[511:384] Bypass Length +

AAD Length

AAD AAD Text Text Bypass Length +

AAD Length

AAD Text