Skip to content

Instantly share code, notes, and snippets.

View canertol's full-sized avatar

Caner Tol canertol

View GitHub Profile
@canertol
canertol / aes-ni.c
Created January 18, 2022 05:43 — 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{\