Linux AES Driver for Zynq Ultrascale+ MPSoC
...
This Linux AES driver is written using symmetric key framework. However as ZynqMP supports AES-GCM mode, the driver is migrated to more appropriate AEAD framework in release 2019.2. The old symmetric key framework based AES driver will be deprecated in release 20212022.2 and removed in release 2023.1
Introduction
HW IP Features
- Supports Symmetric key algorithm.
Features supported in driver
- Supports Symmetric key algorithm.
Kernel Configuration
Cryptographic API -→
Code Block | ||
---|---|---|
| ||
< > User-space interface for hash algorithms <*> User-space interface for symmetric key cipher algorithms < > User-space interface for random number generator algorithms < > User-space interface for AEAD algorithms |
...
Code Block | ||
---|---|---|
| ||
xlnx_aes: zynqmp_aes { compatible = "xlnx,zynqmp-aes"; }; |
TC Execution: Cross compile the below example and Need to create the executable file to test the AES functionality.
AF ALG AES Encrypt example
...
Code Block | ||
---|---|---|
| ||
root@xilinx-zcu102-2019_1:/run/media/mmcblk0# ./Enc Data Out: edaae826b6b416bbd2815879692058f16df1133c7222d549141dcfef0faf01afd6433f9dc6bb7d3207d4a531cdf5e6ebf596bd4a0c3d430313ce88e2b9e16c086e633d24 GCM TAG: b52b80cd5117afb47b116d4a8f89cf75 Input: 1234567808f070b030d0509010e060a020c0408000a5de08d85898a5a5fedca10134abcdef12345678900987654321123487654124456679874309713627463801ad1056root@xilinx-zcu102-2019_1:/run/media/mmcblk0# ./Dec Data Out: 1234567808f070b030d0509010e060a020c0408000a5de08d85898a5a5fedca10134abcdef12345678900987654321123487654124456679874309713627463801ad1056 |
Please note as the data provided in user space will be located in virtual space, linux driver before handing off to ATF converts the data buffers to physical address.
Mainline status
- This driver is currently not available in mainline kernel.
Change Log
2018.3
Summary
- crypto: zynqmp-aes: Adds zynqmp-aes driver
Commits
Initial commit
- c7e7089 crypto: synqmp-aes: Adds zynqmp-aes driver
Bug fixes
- 6c6033a crypto: zynqmp-aes: Fix for segfault seen with large sets of data
- c1a602d crypto: zynqmp-aes: Adds an error code for zynqmp-aes driver
Related Links
https://github.com/Xilinx/linux-xlnx/blob/master/drivers/crypto/zynqmp-aes.c