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

Go to the source code of this file.

Macros

#define aes_rc_T_p   ROMEM_TABLE_P(rc_tab)
 

Functions

void aes_init (const void *key, uint16_t keysize_b, aes_genctx_t *ctx)
 initialize the keyschedule More...
 
void aes128_init (const void *key, aes128_ctx_t *ctx)
 initialize the keyschedule for 128 bit key More...
 
void aes192_init (const void *key, aes192_ctx_t *ctx)
 initialize the keyschedule for 192 bit key More...
 
void aes256_init (const void *key, aes256_ctx_t *ctx)
 initialize the keyschedule for 256 bit key More...
 

Variables

const uint8_t rc_tab[] ROMEM
 

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_keyschedule.c.

Function Documentation

◆ aes128_init()

void aes128_init ( const void *  key,
aes128_ctx_t ctx 
)

initialize the keyschedule for 128 bit key

This function computes the keyschedule from a given 128 bit key and stores it in the context variable

Parameters
keypointer to the key material
ctxpointer to the context where the keyschedule should be stored

Definition at line 88 of file aes_keyschedule.c.

References aes_init().

Here is the call graph for this function:

◆ aes192_init()

void aes192_init ( const void *  key,
aes192_ctx_t ctx 
)

initialize the keyschedule for 192 bit key

This function computes the keyschedule from a given 192 bit key and stores it in the context variable

Parameters
keypointer to the key material
ctxpointer to the context where the keyschedule should be stored

Definition at line 93 of file aes_keyschedule.c.

References aes_init().

Here is the call graph for this function:

◆ aes256_init()

void aes256_init ( const void *  key,
aes256_ctx_t ctx 
)

initialize the keyschedule for 256 bit key

This function computes the keyschedule from a given 256 bit key and stores it in the context variable

Parameters
keypointer to the key material
ctxpointer to the context where the keyschedule should be stored

Definition at line 98 of file aes_keyschedule.c.

References aes_init().

Here is the call graph for this function:

◆ aes_init()

void aes_init ( const void *  key,
uint16_t  keysize_b,
aes_genctx_t ctx 
)

initialize the keyschedule

This function computes the keyschedule from a given key with a given length and stores it in the context variable

Parameters
keypointer to the key material
keysize_blength of the key in bits (valid are 128, 192 and 256)
ctxpointer to the context where the keyschedule should be stored

Definition at line 52 of file aes_keyschedule.c.

Referenced by aes128_init(), aes192_init(), and aes256_init().

Here is the caller graph for this function:

Variable Documentation

◆ ROMEM

const uint8_t rc_tab [] ROMEM
Initial value:
= { 0x01, 0x02, 0x04, 0x08,
0x10, 0x20, 0x40, 0x80,
0x1b, 0x36 }

Definition at line 48 of file aes_keyschedule.c.