MPHELL  5.0.0
Functions
mphell-aes-ni-256.h File Reference

Declaration of aes 256 functions using AES NI instructions. More...

#include <string.h>
#include <stdint.h>
Include dependency graph for mphell-aes-ni-256.h:

Go to the source code of this file.

Functions

void aes_256_ni_key_expansion (const uint8_t *key, __m128i *key_schedule)
 Calculate the round keys from a user key. More...
 
void aes256_enc (__m128i *key_schedule, const uint8_t *plaintext, uint8_t *ciphertext)
 256 bits AES cipher using AES NI instructions More...
 
void aes_256_ni_cipher (uint8_t *encrypted_data, const uint8_t *key, const uint8_t *data_in)
 256 bits AES cipher using AES NI instructions More...
 

Detailed Description

Declaration of aes 256 functions using AES NI instructions.

Definition in file mphell-aes-ni-256.h.

Function Documentation

◆ aes256_enc()

void aes256_enc ( __m128i *  key_schedule,
const uint8_t *  plaintext,
uint8_t *  ciphertext 
)

256 bits AES cipher using AES NI instructions

Parameters
key_scheduleRound keys for AES256, use aes_256_ni_key_expansion to get it.
plaintextSource plaintext 128 bits
ciphertextDestination ciphertext

◆ aes_256_ni_cipher()

void aes_256_ni_cipher ( uint8_t *  encrypted_data,
const uint8_t *  key,
const uint8_t *  data_in 
)

256 bits AES cipher using AES NI instructions

Parameters
encrypted_dataResulting data (cipher text)
keyCipher key 256 bits
data_inSource plaintext 128 bits

◆ aes_256_ni_key_expansion()

void aes_256_ni_key_expansion ( const uint8_t *  key,
__m128i *  key_schedule 
)

Calculate the round keys from a user key.

Parameters
keySource user key
key_scheduleDestination round keys for AES256