To find out if AES-NI (Advanced Encryption Standard New Instructions) is enabled on a Linux system, you can use the grep
command to search for the aes
entry in the /proc/cpuinfo
file. The syntax is as follows:
grep -q aes /proc/cpuinfo && echo "AES-NI is enabled" || echo "AES-NI is not enabled"Source:www.lautturi.com
This will search the /proc/cpuinfo
file for the aes
entry and display a message indicating whether AES-NI is enabled or not.
For example, if AES-NI is enabled, the output might look something like this:
AES-NI is enabled
If AES-NI is not enabled, the output might look something like this:
AES-NI is not enabled
Alternatively, you can use the lscpu
command to display information about the CPU of your system, including whether AES-NI is supported or not. The syntax is as follows:
lscpu | grep -i aes
This will display a line with the AES
flag if AES-NI is supported by your CPU.
For example, if AES-NI is supported, the output might look something like this:
AES: AES-NI
If AES-NI is not supported, the output will be empty.
Keep in mind that AES-NI is an optional feature that may or may not be supported by your CPU, and it may require additional software or hardware support to be used. Consult your CPU documentation or check with your system administrator to find out more about AES-NI support on your system.