41

How can I check if my CPU supports the AES-NI instruction set under Linux/UNIX.

46

Look in /proc/cpuinfo. If you have the aes flag then your CPU has AES support.

You can use this command:

grep aes /proc/cpuinfo

If you have some output, which will be like

flags : a bunch of flags aes another bunch of flags

, then you have AES.

6
  • 2
    could someone test that having a cpu that has aes-ni? e.g.: what is the exact output? grep aes /proc/cpuinfo OR grep aes-ni /proc/cpuinfo ? thank you! – LanceBaynes May 31 '11 at 6:29
  • @Lance I'm not sure if AES and AES-NI are two different things. They look the same for me. Maybe you can see the other flags in /proc/cpuinfo. – phunehehe May 31 '11 at 7:21
  • 1
    @LanceBaynes Yes, I can confirm with a i5 cpu. Screenshot – daisy May 8 '12 at 12:28
  • 1
    Mind you, this only works on linux though. – WhyNotHugo Aug 21 '13 at 3:39
  • 2
    Official Intel documentation does not recommend this though - software.intel.com/sites/default/files/m/d/4/1/d/8/… – Novice User Jun 30 '16 at 18:50
13

There's also the cpuid utility available on a number of OS's.

cpuid | grep -i aes
  AES instruction                         = true
5
  • 1
    Not sure why this is not the accepted answer. Intel documentation recommends this too - software.intel.com/sites/default/files/m/d/4/1/d/8/… – Novice User Jun 30 '16 at 18:50
  • It's probably not the accepted answer because this answer was born much later than when the OP marked the current accepted answer. You can vote it up, though. If enough upvotes happen, this answer will bubble up towards the top. – Juan Jun 30 '16 at 22:51
  • cpuid isn't available on every platform, for example, Android. – Mygod Feb 2 '17 at 15:11
  • This worked for me on FreeBSD. – Brian Minton Jul 10 '18 at 3:32
  • Again, how to see the difference between AES and AES-NI (New Instructions)? – danger89 Sep 27 '20 at 13:25
9

Here's the list. There are 247 CPU models with that feature. With Linux, you can check by looking for the aes flag in /proc/cpuinfo. Or you can check what model you have against this list.

2
  • 2
    That list doesn't include processors from other vendors though, such as AMD, Via, etc. – Brian Minton Jul 10 '18 at 3:34
  • A list including other vendors would be most helpful. – BluE Feb 4 '19 at 12:33
3
 model name : Intel(R) Xeon(R) CPU           E5630  @ 2.53GHz

with AES-NI support from Intel ark list

$ grep aes /proc/cpuinfo
flags: ***** aes *****

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.