ebs-cryptolib  0.2.0
Cryptography libraries repacked for convenience from AVR Crypto Lib
aes_enc.c File Reference
#include <stdint.h>
#include <string.h>
#include "aes.h"
#include "../gf256mul/gf256mul.h"
#include "aes_sbox.h"
#include "aes_enc.h"
Include dependency graph for aes_enc.c:

Go to the source code of this file.

Macros

#define GF256MUL_1(a)   (a)
 
#define GF256MUL_2(a)   (gf256mul(2, (a), 0x1b))
 
#define GF256MUL_3(a)   (gf256mul(3, (a), 0x1b))
 

Functions

void aes_encrypt_core (aes_cipher_state_t *state, const aes_genctx_t *ks, uint8_t rounds)
 
void aes128_enc (void *buffer, aes128_ctx_t *ctx)
 encrypt with 128 bit key. More...
 
void aes192_enc (void *buffer, aes192_ctx_t *ctx)
 encrypt with 192 bit key. More...
 
void aes256_enc (void *buffer, aes256_ctx_t *ctx)
 encrypt with 256 bit key. More...
 

Detailed Description

\email bg@ne.nosp@m.rile.nosp@m.x.org

Author
Daniel Otte
Date
2008-12-30 \license GPLv3 or later

Definition in file aes_enc.c.

Function Documentation

◆ aes128_enc()

void aes128_enc ( void *  buffer,
aes128_ctx_t ctx 
)

encrypt with 128 bit key.

This function encrypts one block with the AES algorithm under control of a keyschedule produced from a 128 bit key.

Parameters
bufferpointer to the block to encrypt
ctxpointer to the key schedule

Definition at line 126 of file aes_enc.c.

◆ aes192_enc()

void aes192_enc ( void *  buffer,
aes192_ctx_t ctx 
)

encrypt with 192 bit key.

This function encrypts one block with the AES algorithm under control of a keyschedule produced from a 192 bit key.

Parameters
bufferpointer to the block to encrypt
ctxpointer to the key schedule

Definition at line 131 of file aes_enc.c.

◆ aes256_enc()

void aes256_enc ( void *  buffer,
aes256_ctx_t ctx 
)

encrypt with 256 bit key.

This function encrypts one block with the AES algorithm under control of a keyschedule produced from a 256 bit key.

Parameters
bufferpointer to the block to encrypt
ctxpointer to the key schedule

Definition at line 136 of file aes_enc.c.