title: AES-NI intrinsics enabled by default?
body: <p>Oracle has this to say about Java 8 with regards to AES-NI:</p>
  
  <blockquote>
    <p>Hardware intrinsics were added to use Advanced Encryption Standard
    (AES). The UseAES and UseAESIntrinsics flags are available to enable
    the hardware-based AES intrinsics for Intel hardware. The hardware
    must be 2010 or newer Westmere hardware. For example, to enable
    hardware AES, use the following flags:</p>
  
  <pre><code>-XX:+UseAES -XX:+UseAESIntrinsics
  </code></pre>
    
    <p>To disable hardware AES use the following flags:</p>
  
  <pre><code>-XX:-UseAES -XX:-UseAESIntrinsics
  </code></pre>
  </blockquote>
  
  <p>But it does not indicate if AES intrinsics are enabled by default (for processors that support it). So the question is simple: if the processor supports AES-NI, are AES intrinsics used?</p>
  
  <p>Bonus question: is there any way to test if AES-NI is being used? I guess you can guess based on performance, but that's not an optimal or sure fire way of testing.</p>
  
  <hr>
  
  <p>For readerS that are not familiar with AES-NI intrinsics: it's replacing byte code with pre-compiled machine code, using the AES-NI instruction set. This happens by the JVM, so it does not show up in the API of the Java runtime or bytecode.</p>