Skip to content

Instantly share code, notes, and snippets.

@k3it
k3it / aes-ni.c
Created December 3, 2019 05:51 — forked from acapola/aes-ni.c
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <string.h> //for memcmp
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\