AES256GCM100G IP Demo Instruction

 

1      Environment Setup. 1

2      FPGA development board setup. 3

3      Serial Console. 4

4      Command detail and testing result 5

4.1      KeyIn Setting. 5

4.2      IvIn Setting. 5

4.3      Show Data Memory. 6

4.4      Fill AAD Memory. 7

4.5      Fill DataIn Memory. 8

4.6      Encrypt Data. 9

4.7      Decrypt Data. 10

4.8      Bypass Data. 11

4.9      Clone Memory. 12

4.10        Loop verification. 13

5      Revision History. 14

 

This document describes the instruction to demonstrate the operation of AES256GCM100GIP on ZCU106 Evaluation Board. In the demonstration, AES256GCM100GIP is used to encrypt/decrypt data between two memories in FPGA and provide authentication tag. User can fill memory with Additional Authenticated Data (AAD), DataIn patterns, set encryption/decryption key, Initialization Vector (IV), and control test operation via serial console.

 

1       Environment Setup

To operate AES256GCM100GIP demo, please prepare following test environment.

1)    FPGA development boards

­   KCU116 Evaluation Kit,

­   ZCU106 evaluation board

2)    Test PC.

3)    Micro USB cable for JTAG connection connecting between FPGA board and Test PC.

4)    Micro USB cable for UART connection connecting between FPGA board and Test PC.

5)    Vivado tool for programming FPGA installed on Test PC.

6)    Serial console software such as TeraTerm installed on PC. The setting on the console is

Baudrate=115,200, Data=8-bit, Non-parity and Stop=1.

7)    Demo configuration file. (To download these files, please visit our web site at www.design-gateway.com)

 

 

Figure 11 AES256GCM100GIP demo environment on KCU116 board

 

 

Figure 12 AES256GCM100GIP demo environment on ZCU106 board

 

2       FPGA development board setup

KCU116 board setup

1)    Make sure power switch is off and connect power supply to FPGA development board.

2)    Connect two USB cables between FPGA board and PC via micro USB ports.

3)    Power on system.

4)    Open Vivado tool to program FPGA by following step,

i)      Click open Hardware Manager.

ii)     Open target -> Auto Connect.

iii)   Select FPGA device to program bit file.

iv)   Click Program device.

v)    Click “…” to select program bit file.

vi)   Click Program button to start FPGA Programming.

 

 

Figure 2‑1 Example of programming FPGA board using Vivado tool

 

ZCU106 board setup

1)    Make sure power switch is off and connect power supply to FPGA development board.

2)    Connect two USB cables between FPGA board and PC via micro USB ports.

3)    Power on system.

4)    Download configuration file and firmware to FPGA board by following step,

i)      Open Vivado TCL shell.

ii)     Change current directory to download folder which includes demo configuration file.

iii)   Type “AES256GCM100GIPTest_ZCU106.bat”, as shown in Figure 2‑2.

 

 

Figure 2‑2 Example command script for download configuration file

 

3       Serial Console

User can fill RAMs with AAD, plain or cipher data patterns, set encryption/decryption key, IV and control test operation via serial console. When configuration is completed, AES256GCM100G demo command menu will be displayed as shown in Figure 3‑1. The detailed information of each menu is described in topic 4.

 

 

Figure 31 Serial console

 

4       Command detail and testing result

4.1      KeyIn Setting

Step to set key as follows

a)    Select “KeyIn Setting”.

b)    Current key will be displayed on serial console as shown in Figure 4‑1.

c)    Set new key: User is allowed to input new key in hex format or press “enter” to skip setting new key. Then the current key is printed again.

 

 

Figure 4‑1 KeyIn setting example

 

4.2      IvIn Setting

Step to set IV as follows

a)    Select “IvIn Setting”.

b)    Current IV will be displayed on serial console as shown in Figure 4‑2.

c)    Set new IV: User is allowed to input new IV in hex format or press “enter” to skip setting new IV. Then the current IV is printed again.

 

 

Figure 4‑2 IvIn setting example

 

4.3      Show Data Memory

To show data in memory, user can select “Show Data Memory”. User can input the desired length of data in byte to show. The data length will be aligned to 512 bits. DataIn and DataOut will be displayed in table-form as shown in Figure 4‑3. User can press “enter” to use 128 bytes as default value.

 

 

Figure 4‑3 Displayed data when input the desired length of data

 

4.4      Fill AAD Memory

Step to set AAD as follows

a)    Select “Fill AAD Memory”.

b)    Input the desired length of AAD in byte. In case of zero-length AAD operation, user can input “0” or press “enter” then end process of this menu. In case of non-zero-length AAD, user can select AAD pattern as shown in Figure 4‑4.

c)    There are four pattern to fill AAD memory.

a.    zero pattern

b.    8-bit counter

c.     16-bit counter

d.    32-bit counter

d)    AAD memory will be filled with selected pattern by the number of AAD and zero-padding to become 128-bit padded data.

 

 

Figure 4‑4 Displayed data when set AAD pattern

 

4.5      Fill DataIn Memory

Step to fill DataIn in memory as follows

a)    Select “Fill DataIn Memory”.

b)    Input the desired length of data in byte. In case of zero-length DataIn operation, user can input “0” or press “enter” on keyboard then end process of this menu. In case of non-zero-length DataIn, user can select data pattern.

c)    There are four pattern to fill memory.

a.    zero pattern

b.    8-bit counter

c.     16-bit counter

d.    32-bit counter

d)    Whole DataIn memory is filled with selected pattern after AAD according to the number of input data length as displayed in Figure 4‑5.

 

 

 

Figure 4‑5 Displayed data when set DataIn length and data pattern

 

4.6      Encrypt Data

Select “Encrypt Data” to encrypt DataIn in memory. Current length of AAD and length of DataIn are printed on serial console. When the encryption process is finished, both DataIn and DataOut will be displayed in table-form and 128-bit encryption tag will be printed as shown in Figure 4‑6.

 

 

 

Figure 4‑6 Serial console after finished encryption process

 

4.7      Decrypt Data

Select “Decrypt Data” to decrypt DataIn in memory. Current length of AAD and length of DataIn are printed on serial console. When the decryption process is finished, both DataIn and DataOut will be displayed in table-form and 128-bit decryption tag will be printed as shown in Figure 4‑7.

 

 

 

Figure 4‑7 Serial console after finished decryption process

 

4.8      Bypass Data

Select “Bypass Data” to Bypass DataIn in memory. Current length of AAD and length of DataIn are printed on serial console. When the Bypass process is finished, both DataIn and DataOut will be displayed in table-form as shown in Figure 4‑8.

 

 

 

Figure 4‑8 Serial console after finished Bypass process

 

4.9      Clone Memory

Select “Clone Memory” for copy DataOut memory to DataIn memory. When the process is finished, both DataIn and DataOut will be displayed in table-form as shown in Figure 4‑9.

 

 

 

Figure 4‑9 Serial console after finished Clone Memory process

 

4.10   Loop verification

Select “Loop verification”, to check both encryption and decryption. In this menu, DataIn in memory will be encrypted/decrypted with all current parameters (key, IV, AAD and data in DataIn memory).

The function begins by read and store data from the DataIn memory as an original data and clear the DataOut memory before encryption, then start encryption process. After the encryption is completed, the data from the DataOut memory is cloned to the DataIn memory and decryption process is performed. Once the decryption is completed, the decrypted data is compared with the original data, and the encryption tag is compared with the decryption tag.

If the decrypted data and decryption tag match with original data and encryption tag, respectively, “Loop verification succeeded.” is printed to serial console as shown in Figure 4‑10.

 

 

Figure 4‑10 Serial console after loop verification is succeeded

 

5       Revision History

Revision

Date

Description

1.00

24-Jan-2023

Initial version release

1.01

20-Oct-2023

Revise information