Symmetric Cryptographic Accelerator Hard IP User Guide
5.3.1. MAC Packing
| Profile | MACsec | MACsec | MACsec | MACsec | |||
|---|---|---|---|---|---|---|---|
| MAC_IV_tweak_en | 1 | 1 | 1 | 1 | |||
| data_en | 0 | 1 | 1 | 1 | |||
| next_packet_en | 1 | 1 | 1 | 0 | |||
| tlast | 1 | 1 | 1 | 1 | |||
| num_empty_bytes | 64 | 48 to 63 | 32 to 47 | 16 to 31 | |||
| TID[9:0] | Channel number | Channel number | Channel number | Channel number | |||
| DATA | |||||||
| data[127:0] | MAC | AAD/Text | AAD/Text | AAD/Text | |||
| data[255:128] | AAD/Text | MAC | AAD/Text/IDLE | AAD/Text/IDLE | |||
| data[391:256] | AAD/Text | AAD/Text | MAC | AAD/Text/IDLE | |||
| data[511:393] | AAD/Text | AAD/Text | AAD/Text | MAC | |||
When the packet leaves the ICA, it may contain empty bytes between the last byte of the AAD/text and the MAC tag. The soft logic block removes any empty bytes such that the 16 bytes of MAC follows immediately after the last byte of AAD/text.
The table displays the MAC packing as it leaves the Symmetric Cryptographic Accelerator Hard IP. The p_vld_data is a partial valid data and does not fully consume the entire 16 bytes. It contains some empty bytes within the 16 byte segment.
Since MAC must be 16 bytes aligned, it is followed by five bytes of partial data (p_vld_data) and 11 bytes of empty data is removed.
When the traffics using different profiles interleave, the output pattern for the profiles do not interleave between channels during the last cycle of the packet. For example, a 16 byte MAC always follows the last byte of a payload for the specific channel before interleaving with a request from a different channel. This behavior applies to all profiles except the MACsec profile.
| Profile | MACsec | GCM | GCM | GCM | GCM | MACsec |
|---|---|---|---|---|---|---|
| TID[15:0] (Stream) |
0 | N/A | N/A | N/A | N/A | 0 |
| TID[9:0] (Channel) |
1 | 67 | 67 | 68 | 68 | 1 |
| DATA | ||||||
| Data[127:0] | DATA (Pkt 0) | AAD | MAC | AAD | MAC | MAC |
| Data[255:128] | DATA (Pkt 0) | DATA | IDLE | DATA | IDLE | DATA |
| Data[383:256] | DATA (Pkt 0) | DATA | IDLE | DATA | IDLE | DATA |
| Data[511:384] | p_vld_data | p_vld_data | IDLE | p_vld_data | IDLE | DATA |
| Profile | MACsec | MACsec | MACsec |
|---|---|---|---|
| TID[15:0] (Stream) |
0 | N/A | N/A |
| TID[9:0] (Channel) |
1 | 1 | 1 |
| mac_iv_tweak_en | 1 | 1 | 0 |
| DATA | |||
| Data[127:0] | DATA (Pkt 0) | MAC, IDLE | DATA (Pkt 0) |
| Data[255:128] | DATA (Pkt 0) | IDLE | DATA (Pkt 0) |
| Data[383:256] | DATA (Pkt 0) | IDLE | DATA (Pkt 0) |
| Data[511:384] | p_vld_data, MAC | IDLE | DATA (Pkt 0) |