gcm.h File Reference

#include "gcm_aes.h"
#include "gf128mul.h"

Go to the source code of this file.

Classes

struct  gcm_ctx

Defines

#define BFR_UNIT   64
#define RETURN_WARN   1
#define RETURN_OK   0
#define RETURN_ERROR   -1
#define GCM_BLOCK_SIZE   AES_BLOCK_SIZE

Typedefs

typedef int ret_type

Functions

 dec_unit_type (BFR_UNIT, buf_unit)
 dec_bufr_type (BFR_UNIT, AES_BLOCK_SIZE, buf_type)
ret_type gcm_init_and_key (const unsigned char key[], unsigned long key_len, gcm_ctx ctx[1])
ret_type gcm_end (gcm_ctx ctx[1])
ret_type gcm_encrypt_message (const unsigned char iv[], unsigned long iv_len, const unsigned char hdr[], unsigned long hdr_len, unsigned char msg[], unsigned long msg_len, unsigned char tag[], unsigned long tag_len, gcm_ctx ctx[1])
ret_type gcm_decrypt_message (const unsigned char iv[], unsigned long iv_len, const unsigned char hdr[], unsigned long hdr_len, unsigned char msg[], unsigned long msg_len, const unsigned char tag[], unsigned long tag_len, gcm_ctx ctx[1])
ret_type gcm_init_message (const unsigned char iv[], unsigned long iv_len, gcm_ctx ctx[1])
ret_type gcm_auth_header (const unsigned char hdr[], unsigned long hdr_len, gcm_ctx ctx[1])
ret_type gcm_encrypt (unsigned char data[], unsigned long data_len, gcm_ctx ctx[1])
ret_type gcm_decrypt (unsigned char data[], unsigned long data_len, gcm_ctx ctx[1])
ret_type gcm_compute_tag (unsigned char tag[], unsigned long tag_len, gcm_ctx ctx[1])
ret_type gcm_auth_data (const unsigned char data[], unsigned long data_len, gcm_ctx ctx[1])
ret_type gcm_crypt_data (unsigned char data[], unsigned long data_len, gcm_ctx ctx[1])


Define Documentation

#define BFR_UNIT   64

Definition at line 46 of file gcm.h.

#define GCM_BLOCK_SIZE   AES_BLOCK_SIZE

Definition at line 81 of file gcm.h.

#define RETURN_ERROR   -1

Definition at line 74 of file gcm.h.

#define RETURN_OK   0

Definition at line 73 of file gcm.h.

#define RETURN_WARN   1

Definition at line 72 of file gcm.h.


Typedef Documentation

typedef int ret_type

Definition at line 77 of file gcm.h.


Function Documentation

dec_bufr_type ( BFR_UNIT  ,
AES_BLOCK_SIZE  ,
buf_type   
)

dec_unit_type ( BFR_UNIT  ,
buf_unit   
)

ret_type gcm_auth_data ( const unsigned char  data[],
unsigned long  data_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_auth_header ( const unsigned char  hdr[],
unsigned long  hdr_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_compute_tag ( unsigned char  tag[],
unsigned long  tag_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_crypt_data ( unsigned char  data[],
unsigned long  data_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_decrypt ( unsigned char  data[],
unsigned long  data_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_decrypt_message ( const unsigned char  iv[],
unsigned long  iv_len,
const unsigned char  hdr[],
unsigned long  hdr_len,
unsigned char  msg[],
unsigned long  msg_len,
const unsigned char  tag[],
unsigned long  tag_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_encrypt ( unsigned char  data[],
unsigned long  data_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_encrypt_message ( const unsigned char  iv[],
unsigned long  iv_len,
const unsigned char  hdr[],
unsigned long  hdr_len,
unsigned char  msg[],
unsigned long  msg_len,
unsigned char  tag[],
unsigned long  tag_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_end ( gcm_ctx  ctx[1]  ) 

ret_type gcm_init_and_key ( const unsigned char  key[],
unsigned long  key_len,
gcm_ctx  ctx[1] 
)

ret_type gcm_init_message ( const unsigned char  iv[],
unsigned long  iv_len,
gcm_ctx  ctx[1] 
)


Generated on Fri Jan 30 09:43:11 2009 for DTN Reference Implementation by  doxygen 1.5.8