Symmetric Cryptographic Accelerator Hard IP User Guide
5.5. GCM Padding and Depadding
The Symmetric Cryptographic Accelerator Hard IP supports AAD/Bypass/Text data padding and depadding feature when using the Generic GCM profile. This feature allows the AAD and Bypass data sent by you in the Crypto ingress direction to be padded in non-16 byte alignment within the payload. In the Crypto egress direction, the AAD, Bypass, Text, and MAC from the Crypto ICA hard IP are aligned to 16 bytes. The GCM depadding logic unpacks these 16 byte-aligned fields in the Symmetric Cryptographic Accelerator Hard IP to non-16 byte alignment and then sends them to your application via the AXI-ST bus. You can turn on of off the padding at ingress or depadding at egress separately in the IP parameter editor. If you turn off a feature, the IP optimizes away all the padding or depadding logic.
The length in Bypass, AAD, or Text field is for the last segment without counting the possible leading segments of 16-byte data.