aes-internal-dec.c File Reference

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

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

Go to the source code of this file.

Defines

#define ROUND(i, d, s)

Functions

void rijndaelKeySetupDec (u32 rk[], const u8 cipherKey[])
void * aes_decrypt_init (const u8 *key, size_t len)
 Initialize AES for decryption.
void aes_decrypt (void *ctx, const u8 *crypt, u8 *plain)
 Decrypt one AES block.
void aes_decrypt_deinit (void *ctx)
 Deinitialize AES decryption.

Detailed Description

AES (Rijndael) cipher - decrypt.

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


Define Documentation

#define ROUND ( i,
d,
 ) 
Value:
d##0 = TD0(s##0) ^ TD1(s##3) ^ TD2(s##2) ^ TD3(s##1) ^ rk[4 * i]; \
d##1 = TD0(s##1) ^ TD1(s##0) ^ TD2(s##3) ^ TD3(s##2) ^ rk[4 * i + 1]; \
d##2 = TD0(s##2) ^ TD1(s##1) ^ TD2(s##0) ^ TD3(s##3) ^ rk[4 * i + 2]; \
d##3 = TD0(s##3) ^ TD1(s##2) ^ TD2(s##1) ^ TD3(s##0) ^ rk[4 * i + 3]

Function Documentation

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

Decrypt one AES block.

Parameters:
ctx Context pointer from aes_encrypt_init()
crypt Encrypted data (16 bytes)
plain Buffer for the decrypted data (16 bytes)

Definition at line 142 of file aes-internal-dec.c.

void aes_decrypt_deinit ( void *  ctx  ) 

Deinitialize AES decryption.

Parameters:
ctx Context pointer from aes_encrypt_init()

Definition at line 148 of file aes-internal-dec.c.

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

Initialize AES for decryption.

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

Definition at line 63 of file aes-internal-dec.c.

void rijndaelKeySetupDec ( u32  rk[],
const u8  cipherKey[] 
)

Expand the cipher key into the decryption key schedule.

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

Definition at line 36 of file aes-internal-dec.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

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