/home/dko/projects/mobilec/trunk/src/security/xyssl-0.7/include/xyssl/aes.h File Reference

Go to the source code of this file.

Data Structures

struct  aes_context
 AES context structure. More...

Functions

void aes_set_key (aes_context *ctx, unsigned char *key, int keysize)
 AES key schedule.
void aes_encrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16])
 AES block encryption (ECB mode).
void aes_decrypt (aes_context *ctx, unsigned char input[16], unsigned char output[16])
 AES block decryption (ECB mode).
void aes_cbc_encrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
 AES-CBC buffer encryption.
void aes_cbc_decrypt (aes_context *ctx, unsigned char iv[16], unsigned char *input, unsigned char *output, int len)
 AES-CBC buffer decryption.
int aes_self_test (int verbose)
 Checkup routine.


Detailed Description

Definition in file aes.h.


Function Documentation

void aes_cbc_decrypt ( aes_context ctx,
unsigned char  iv[16],
unsigned char *  input,
unsigned char *  output,
int  len 
)

AES-CBC buffer decryption.

Parameters:
ctx AES context
iv initialization vector (modified after use)
input buffer holding the ciphertext
output buffer holding the plaintext
len length of the data to be decrypted

Definition at line 822 of file aes.c.

Referenced by ssl_decrypt_buf().

void aes_cbc_encrypt ( aes_context ctx,
unsigned char  iv[16],
unsigned char *  input,
unsigned char *  output,
int  len 
)

AES-CBC buffer encryption.

Parameters:
ctx AES context
iv initialization vector (modified after use)
input buffer holding the plaintext
output buffer holding the ciphertext
len length of the data to be encrypted

Definition at line 797 of file aes.c.

Referenced by main(), and ssl_encrypt_buf().

void aes_decrypt ( aes_context ctx,
unsigned char  input[16],
unsigned char  output[16] 
)

AES block decryption (ECB mode).

Parameters:
ctx AES context
input ciphertext block
output plaintext block

Definition at line 706 of file aes.c.

Referenced by main().

void aes_encrypt ( aes_context ctx,
unsigned char  input[16],
unsigned char  output[16] 
)

AES block encryption (ECB mode).

Parameters:
ctx AES context
input plaintext block
output ciphertext block
AES block encryption (ECB mode)

Definition at line 615 of file aes.c.

Referenced by main().

int aes_self_test ( int  verbose  ) 

Checkup routine.

Returns:
0 if successful, or 1 if the test failed

Definition at line 920 of file aes.c.

Referenced by main().

void aes_set_key ( aes_context ctx,
unsigned char *  key,
int  keysize 
)

AES key schedule.

Parameters:
ctx AES context to be initialized
key the secret key
keysize must be 128, 192 or 256

Referenced by main(), and ssl_derive_keys().


Generated on Fri May 16 14:49:56 2008 for Mobile-C by  doxygen 1.5.4