libosmogsm 1.13.1.1-afb4 Osmocom GSM library

Functions | Variables
aes-internal.c File Reference

AES (Rijndael) cipher. More...

`#include "includes.h"`
`#include "common.h"`
`#include "crypto.h"`
`#include "aes_i.h"`

## Functions
void | rijndaelKeySetupEnc (u32 rk[], const u8 cipherKey[])
| Expand the cipher key into the encryption key schedule. More...

## Variables
const u32 | Te0 [256]
const u32 | Td0 [256]
const u8 | Td4s [256]
const u8 | rcons []

## Detailed Description

AES (Rijndael) cipher.

Modifications to public domain implementation:

- support only 128-bit keys
- cleanup
- use C pre-processor to make it easier to change S table access
- added option (AES_SMALL_TABLES) for reducing code size by about 8 kB at cost of reduced throughput (quite small difference on Pentium 4, 10-25% when using -O1 or -O2 optimization)

## Function Documentation

## ◆ rijndaelKeySetupEnc()

void rijndaelKeySetupEnc | ( | u32 | rk[],
|  | const u8 | cipherKey[]
| ) |  |

Expand the cipher key into the encryption key schedule.

Returns
  the number of rounds for the given cipher key size.

References GETU32, RCON, TE414, TE421, TE432, and TE443.

Referenced by aes_encrypt_init().

## Variable Documentation

## ◆ rcons

const u8 rcons[]

Initial value:
= {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36
}

## ◆ Td0

const u32 Td0[256]

## ◆ Td4s

const u8 Td4s[256]

## ◆ Te0

const u32 Te0[256]