aes-internal-enc.c File Reference

AES (Rijndael) cipher - encrypt. More...

#include "includes.h"
#include "common.h"
#include "crypto.h"
#include "aes_i.h"
Include dependency graph for aes-internal-enc.c:

Go to the source code of this file.

Defines

#define ROUND(i, d, s)

Functions

void rijndaelEncrypt (const u32 rk[], const u8 pt[16], u8 ct[16])
void * aes_encrypt_init (const u8 *key, size_t len)
 Initialize AES for encryption.
void aes_encrypt (void *ctx, const u8 *plain, u8 *crypt)
 Encrypt one AES block.
void aes_encrypt_deinit (void *ctx)
 Deinitialize AES encryption.

Detailed Description

AES (Rijndael) cipher - encrypt.

Modifications to public domain implementation:

Copyright
Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Alternatively, this software may be distributed under the terms of BSD license.

See README and COPYING for more details.

Definition in file aes-internal-enc.c.


Define Documentation

#define ROUND ( i,
d,
 ) 
Value:
d##0 = TE0(s##0) ^ TE1(s##1) ^ TE2(s##2) ^ TE3(s##3) ^ rk[4 * i]; \
d##1 = TE0(s##1) ^ TE1(s##2) ^ TE2(s##3) ^ TE3(s##0) ^ rk[4 * i + 1]; \
d##2 = TE0(s##2) ^ TE1(s##3) ^ TE2(s##0) ^ TE3(s##1) ^ rk[4 * i + 2]; \
d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]

Function Documentation

void aes_encrypt ( void *  ctx,
const u8 *  plain,
u8 *  crypt 
)

Encrypt one AES block.

Parameters:
ctx Context pointer from aes_encrypt_init()
plain Plaintext data to be encrypted (16 bytes)
crypt Buffer for the encrypted data (16 bytes)

Definition at line 112 of file aes-internal-enc.c.

void aes_encrypt_deinit ( void *  ctx  ) 

Deinitialize AES encryption.

Parameters:
ctx Context pointer from aes_encrypt_init()

Definition at line 118 of file aes-internal-enc.c.

void* aes_encrypt_init ( const u8 *  key,
size_t  len 
)

Initialize AES for encryption.

Parameters:
key Encryption key
len Key length in bytes (usually 16, i.e., 128 bits)
Returns:
Pointer to context data or NULL on failure

Definition at line 99 of file aes-internal-enc.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:18:45 2009 for hostapd by  doxygen 1.6.1