cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Typedefs | Functions
aes.h File Reference
#include <stdlib.h>
#include "crypt/brg_types.h"

Go to the source code of this file.

Classes

union  aes_inf
 
struct  aes_encrypt_ctx
 
struct  aes_decrypt_ctx
 

Macros

#define AES_128   /* define if AES with 128 bit keys is needed */
 
#define AES_192   /* define if AES with 192 bit keys is needed */
 
#define AES_256   /* define if AES with 256 bit keys is needed */
 
#define AES_VAR   /* define if a variable key size is needed */
 
#define AES_MODES   /* define if support is needed for modes */
 
#define AES_ENCRYPT   /* if support for encryption is needed */
 
#define AES_DECRYPT   /* if support for decryption is needed */
 
#define AES_ERR_CHK   /* for parameter checks & error return codes */
 
#define AES_REV_DKS   /* define to reverse decryption key schedule */
 
#define AES_BLOCK_SIZE   16 /* the AES block size in bytes */
 
#define N_COLS   4 /* the number of columns in the state */
 
#define KS_LENGTH   60
 
#define AES_RETURN   INT_RETURN
 
#define aes_ofb_encrypt   aes_ofb_crypt
 
#define aes_ofb_decrypt   aes_ofb_crypt
 
#define aes_ctr_encrypt   aes_ctr_crypt
 
#define aes_ctr_decrypt   aes_ctr_crypt
 

Typedefs

typedef void cbuf_inc (unsigned char *cbuf)
 

Functions

AES_RETURN aes_init (void)
 
AES_RETURN aes_encrypt_key128 (const unsigned char *key, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_encrypt_key192 (const unsigned char *key, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_encrypt_key256 (const unsigned char *key, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_encrypt_key (const unsigned char *key, int key_len, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_encrypt (const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1])
 
AES_RETURN aes_decrypt_key128 (const unsigned char *key, aes_decrypt_ctx cx[1])
 
AES_RETURN aes_decrypt_key192 (const unsigned char *key, aes_decrypt_ctx cx[1])
 
AES_RETURN aes_decrypt_key256 (const unsigned char *key, aes_decrypt_ctx cx[1])
 
AES_RETURN aes_decrypt_key (const unsigned char *key, int key_len, aes_decrypt_ctx cx[1])
 
AES_RETURN aes_decrypt (const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1])
 
AES_RETURN aes_test_alignment_detection (unsigned int n)
 
AES_RETURN aes_ecb_encrypt (const unsigned char *ibuf, unsigned char *obuf, int len, const aes_encrypt_ctx cx[1])
 
AES_RETURN aes_ecb_decrypt (const unsigned char *ibuf, unsigned char *obuf, int len, const aes_decrypt_ctx cx[1])
 
AES_RETURN aes_cbc_encrypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *iv, const aes_encrypt_ctx cx[1])
 
AES_RETURN aes_cbc_decrypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *iv, const aes_decrypt_ctx cx[1])
 
AES_RETURN aes_mode_reset (aes_encrypt_ctx cx[1])
 
AES_RETURN aes_cfb_encrypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *iv, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_cfb_decrypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *iv, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_ofb_crypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *iv, aes_encrypt_ctx cx[1])
 
AES_RETURN aes_ctr_crypt (const unsigned char *ibuf, unsigned char *obuf, int len, unsigned char *cbuf, cbuf_inc ctr_inc, aes_encrypt_ctx cx[1])
 

Macro Definition Documentation

#define AES_128   /* define if AES with 128 bit keys is needed */

Definition at line 53 of file aes.h.

#define AES_192   /* define if AES with 192 bit keys is needed */

Definition at line 54 of file aes.h.

#define AES_256   /* define if AES with 256 bit keys is needed */

Definition at line 55 of file aes.h.

#define AES_BLOCK_SIZE   16 /* the AES block size in bytes */

Definition at line 66 of file aes.h.

#define aes_ctr_decrypt   aes_ctr_crypt

Definition at line 208 of file aes.h.

#define aes_ctr_encrypt   aes_ctr_crypt

Definition at line 207 of file aes.h.

#define AES_DECRYPT   /* if support for decryption is needed */

Definition at line 62 of file aes.h.

#define AES_ENCRYPT   /* if support for encryption is needed */

Definition at line 61 of file aes.h.

#define AES_ERR_CHK   /* for parameter checks & error return codes */

Definition at line 63 of file aes.h.

#define AES_MODES   /* define if support is needed for modes */

Definition at line 57 of file aes.h.

#define aes_ofb_decrypt   aes_ofb_crypt

Definition at line 200 of file aes.h.

#define aes_ofb_encrypt   aes_ofb_crypt

Definition at line 199 of file aes.h.

#define AES_RETURN   INT_RETURN

Definition at line 82 of file aes.h.

#define AES_REV_DKS   /* define to reverse decryption key schedule */

Definition at line 64 of file aes.h.

#define AES_VAR   /* define if a variable key size is needed */

Definition at line 56 of file aes.h.

#define KS_LENGTH   60

Definition at line 74 of file aes.h.

#define N_COLS   4 /* the number of columns in the state */

Definition at line 67 of file aes.h.

Typedef Documentation

typedef void cbuf_inc(unsigned char *cbuf)

Definition at line 205 of file aes.h.

Function Documentation

AES_RETURN aes_cbc_decrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  iv,
const aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_cbc_encrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  iv,
const aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_cfb_decrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  iv,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_cfb_encrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  iv,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_ctr_crypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  cbuf,
cbuf_inc  ctr_inc,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_decrypt ( const unsigned char *  in,
unsigned char *  out,
const aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_decrypt_key ( const unsigned char *  key,
int  key_len,
aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_decrypt_key128 ( const unsigned char *  key,
aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_decrypt_key192 ( const unsigned char *  key,
aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_decrypt_key256 ( const unsigned char *  key,
aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_ecb_decrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
const aes_decrypt_ctx  cx[1] 
)
AES_RETURN aes_ecb_encrypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
const aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_encrypt ( const unsigned char *  in,
unsigned char *  out,
const aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_encrypt_key ( const unsigned char *  key,
int  key_len,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_encrypt_key128 ( const unsigned char *  key,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_encrypt_key192 ( const unsigned char *  key,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_encrypt_key256 ( const unsigned char *  key,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_init ( void  )

Definition at line 272 of file aestab.c.

AES_RETURN aes_mode_reset ( aes_encrypt_ctx  cx[1])
AES_RETURN aes_ofb_crypt ( const unsigned char *  ibuf,
unsigned char *  obuf,
int  len,
unsigned char *  iv,
aes_encrypt_ctx  cx[1] 
)
AES_RETURN aes_test_alignment_detection ( unsigned int  n)