Bl4omArchie / AES-Native-Instructions

Implementation and tutorial about AES Native Instructions (NI)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementing AES with Native Instructions (AES-NI)

AES is one of the most famous cipher block in the world. In real life software, you won't find AES code calling a SubBytes function, then a ShiftRows() function, and then a MixColumns() function because that would be inefficient. Instead, fast AES software uses special techniques called table-based implementations and native instructions.

Here we focused on native instructions (NI) which use dedicated assembly instructions within you processor to compute directly AES operations.

Instructions

This is a listing of every 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 decryption round key generation. Applies Inverse Mix Columns to round keys.

Find all the supported architectures here: link

Compilation

How to compile a program using AES-NI:

gcc aes-ni.c -o ./aes -maes

Sources:

About

Implementation and tutorial about AES Native Instructions (NI)


Languages

Language:C 83.9%Language:Assembly 16.1%