Questions tagged [aes-ni]

Intel's Advanced Encryption Standard (AES) New Instructions (AES-NI) is an extension to the x86 instruction set architecture for microprocessors from Intel and AMD proposed by Intel in March 2008.

The purpose of the instruction set is to improve the speed of applications performing encryption and decryption using the Advanced Encryption Standard (AES).

New instructions

Instruction      Description
AESENC           Perform one round of an AES encryption flow
AESENCLAST       Perform the last round of an AES encryption flow
AESDEC           Perform one round of an AES decryption flow
AESDECLAST       Perform the last round of an AES decryption flow
AESKEYGENASSIST  Assist in AES round key generation
AESIMC           Assist in AES Inverse Mix Columns
PCLMULQDQ        Carryless multiply (CLMUL).
32 questions
8
votes
1 answer

how to implement AES128 encryption/decryption using AES-NI instructions and GCC

I would like to accelerate my application by using AES-NI, by I am struggling to find any example that works with GCC or the assembler that comes with it. I am not interested in using SSL or any other library.
acapola
  • 1,078
  • 1
  • 12
  • 23
8
votes
2 answers

How do I enable AES-NI (hardware acceleration) for Node.js crypto on Linux?

I wrote a basic function to test the speed of the AES-256-CBC mode of the Node.js built-in crypto functions. These functions use OpenSSL, so they should support AES-NI, but when I correctly enable AES-NI and do a command-line test of OpenSSL the…
Philberg
  • 620
  • 7
  • 14
7
votes
1 answer

Wrong result from decryption using AES New Instruction Set

I try to make encryption / descryption in C language using Intel's AES New Instruction Set, to be more specific I try to do 256 bit AES with CBC mode. I found C code at Intel's white paper here:…
tomsk
  • 967
  • 2
  • 13
  • 29
5
votes
1 answer

Python support for AES-NI

Is there a way to make use of AES-NI in Python? I do want to make HMAC faster by making use of my hardware support for AES-NI. Thanks.
Hamza
  • 51
  • 3
4
votes
1 answer

Use of AES-NI in C#

I have a question,and I hope that I am correct here. I want to use the AES-NI acceleration in a C# program. I did not find any good source about that and wanted to ask if this is possible and if there is any good source for information about…
Simon Rühle
  • 229
  • 3
  • 12
4
votes
2 answers

Java SSL provider with AES-NI support

Is there Java security provider which can handle SSL connections and does support AES-NI instructions? I have tried to use SunPKCS11 with Mozilla NSS, but it doesn't work for SSL connections that use AES encryption. According to Java PKCS#11…
Peter Štibraný
  • 32,463
  • 16
  • 90
  • 116
3
votes
1 answer

Correct way of AES NI encryption in C++

I am attempting to make AES 256 bit (CBC mode) encrypt function using special instruction set (AES-NI) from Intel. This is my code so far: int Nb = 4; int Nk = 8; int Nr = 14; unsigned int BLOCK_SIZE = 16; void block_encryption_special(unsigned…
tomsk
  • 967
  • 2
  • 13
  • 29
3
votes
2 answers

How to check aes-ni are supported by CPU?

I searching for solution, how to check aes-ni are available on CPU. I need to put this information in my application, so i'm not looking for any CPU-Z, bash commands or something. I know that it is seen as aes flag. I have no idea how to check it in…
s3ven
  • 85
  • 2
  • 6
3
votes
2 answers

Does Java use AES-NI when available?

I just heard of the instruction set extension AES-NI. Does Java's JIT compiler compile the application to use AES-NI if it is available to enhance performance? And if yes, does it also do so if it is not sure that AES will be used (like when using…
MinecraftShamrock
  • 3,504
  • 2
  • 25
  • 44
2
votes
0 answers

Using _mm_aeskeygenassist_si128 to match reference values

I am trying to get EAX working using Intel SI. Using the paper at https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197.pdf, I have an input key of: Cipher Key = 2b 7e 15 16 28 ae d2 a6 ab f7 15 88 09 cf 4f 3c And am trying to match the second…
David
  • 123
  • 7
2
votes
3 answers

Does compiled Crypto++ library code that uses AES/GCM encryption utilize Intel's AES-NI instructions?

I'm implementing AES256/GCM encryption and authentication using Crypto++ library. My code is compiled using Visual Studio 2008 as a C++/MFC project. This is a somewhat older project that uses a previous version of the library, Cryptopp562. I'm…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
2
votes
1 answer

Are BouncyCastle's AES engines hardware accelerated?

I wonder if anyone knows if BouncyCastle's AES engines support hardware acceleration, e.g., make use of AES-NI. My understanding is that some "native code" need to be invoked in order to be accelerated, but I couldn't find any. Are BC's AES engines…
Kar
  • 6,063
  • 7
  • 53
  • 82
2
votes
1 answer

How to config openssl engine aes-ni in nginx

I use engine AES-NI increase performance of openssl speed (hardware acceleration) with my chip is supported engine AES-NI (Intel(R) Xeon(R) CPU E5620 @ 2.40GHz). I try install openssl version 1.0.2-chacha and 1.0.1l Version 1.0.2 chacha…
user3171689
  • 303
  • 1
  • 5
  • 15
2
votes
1 answer

Temporarily disable AES-NI hw.optional.aes setting via sysctl

For testing reasons I would like to temporarily disable the hw.optional.aes setting on my OS X MacBook (10.10). Since I couldn't change the value directly via "sysctl -w hw.optional.aes=0" I tried to create a sysctl.conf in /etc/ and wrote the line…
user1683766
  • 189
  • 1
  • 11
2
votes
0 answers

Decryption with rfc3686(ctr(aes)) not using AES-NI instructions in linux kernel

I am trying to figure out the difference AES-NI brings to AES crytpo opertaions. After trying with AES-CBC it seems it makes none, as is stated by Intel. However for AES-CTR and AES-GCM modes, Intel promises a great performance improvement. I am…
CodeQ
  • 319
  • 1
  • 3
  • 13
1
2 3