Linux AES Driver for Zynq Ultrascale+ MPSoC
...
The Zynq UltraScale+ MPSoC includes an AES-GCM engine for symmetric key encryption and decryption. This block performs the modulus math based on Rivest-Shamir-Adelman (RSA)-4096 algorithm.
It is an symmetric algorithm.
This block uses AES-GCM algorithm to encrypt or decrypt the provided data. It requires a key of size 256 bits and initialization vector(IV) of size 96 bits.
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 | ||
|
Devicetree
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