IBR-DTNSuite  0.8
ibrcommon/ibrcommon/ssl/gcm/mode_hdr.h File Reference
#include <string.h>
#include <limits.h>
#include "brg_endian.h"
#include "brg_types.h"
#include "gcm_aes.h"
Include dependency graph for mode_hdr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BFR_UNIT   64
#define NEED_UINT_64T
#define mh_inline   static
#define ui8_ptr(x)   ptr_cast(x, 8)
#define ui16_ptr(x)   ptr_cast(x, 16)
#define ui32_ptr(x)   ptr_cast(x, 32)
#define ui64_ptr(x)   ptr_cast(x, 64)
#define unit_ptr(x)   ptr_cast(x, BFR_UNIT)
#define BUF_INC   (BFR_UNIT >> 3)
#define BUF_ADRMASK   ((BFR_UNIT >> 3) - 1)
#define uint_32t_to_le(x)
#define uint_64t_to_le(x)
#define uint_32t_to_be(x)   (x) = bswap_32((x))
#define uint_64t_to_be(x)   (x) = bswap_64((x))

Typedefs

typedef void(* xor_function )(void *, const void *q)

Functions

mh_inline uint_32t rotl32 (uint_32t x, int n)
mh_inline uint_32t rotr32 (uint_32t x, int n)
mh_inline uint_64t rotl64 (uint_64t x, int n)
mh_inline uint_64t rotr64 (uint_64t x, int n)
mh_inline uint_32t bswap_32 (uint_32t x)
mh_inline uint_64t bswap_64 (uint_64t x)
mh_inline void bswap32_block (void *d, const void *s, int n)
mh_inline void bswap64_block (void *d, const void *s, int n)
mh_inline void move_block (void *p, const void *q)
mh_inline void move_block_aligned (void *p, const void *q)
mh_inline void xor_block (void *p, const void *q)
mh_inline void xor_block_aligned (void *p, const void *q)

Define Documentation

#define BFR_UNIT   64

Definition at line 50 of file mode_hdr.h.

#define BUF_ADRMASK   ((BFR_UNIT >> 3) - 1)

Definition at line 116 of file mode_hdr.h.

Referenced by gcm_auth_data(), gcm_auth_header(), and gcm_crypt_data().

#define BUF_INC   (BFR_UNIT >> 3)

Definition at line 115 of file mode_hdr.h.

Referenced by gcm_auth_data(), gcm_auth_header(), and gcm_crypt_data().

#define mh_inline   static

Definition at line 101 of file mode_hdr.h.

#define NEED_UINT_64T

Definition at line 88 of file mode_hdr.h.

#define ui16_ptr (   x)    ptr_cast(x, 16)

Definition at line 110 of file mode_hdr.h.

#define ui32_ptr (   x)    ptr_cast(x, 32)

Definition at line 111 of file mode_hdr.h.

Referenced by gcm_compute_tag(), and gcm_init_message().

#define ui64_ptr (   x)    ptr_cast(x, 64)

Definition at line 112 of file mode_hdr.h.

#define uint_32t_to_be (   x)    (x) = bswap_32((x))

Definition at line 309 of file mode_hdr.h.

#define uint_32t_to_le (   x)

Definition at line 307 of file mode_hdr.h.

#define uint_64t_to_be (   x)    (x) = bswap_64((x))

Definition at line 310 of file mode_hdr.h.

#define uint_64t_to_le (   x)

Definition at line 308 of file mode_hdr.h.

#define unit_ptr (   x)    ptr_cast(x, BFR_UNIT)

Typedef Documentation

typedef void(* xor_function)(void *, const void *q)

Definition at line 120 of file mode_hdr.h.


Function Documentation

mh_inline void bswap32_block ( void *  d,
const void *  s,
int  n 
)

Definition at line 170 of file mode_hdr.h.

References bswap_32().

Here is the call graph for this function:

mh_inline void bswap64_block ( void *  d,
const void *  s,
int  n 
)

Definition at line 176 of file mode_hdr.h.

References bswap_64().

Here is the call graph for this function:

mh_inline uint_32t bswap_32 ( uint_32t  x)

Definition at line 157 of file mode_hdr.h.

References rotr32().

Referenced by bswap32_block(), and bswap_64().

Here is the call graph for this function:

mh_inline uint_64t bswap_64 ( uint_64t  x)

Definition at line 164 of file mode_hdr.h.

References bswap_32().

Referenced by bswap64_block().

Here is the call graph for this function:

mh_inline void move_block ( void *  p,
const void *  q 
)

Definition at line 220 of file mode_hdr.h.

Referenced by move_block_aligned().

mh_inline void move_block_aligned ( void *  p,
const void *  q 
)

Definition at line 225 of file mode_hdr.h.

References move_block(), and unit_ptr.

Referenced by gf_mul().

Here is the call graph for this function:

mh_inline uint_32t rotl32 ( uint_32t  x,
int  n 
)

Definition at line 127 of file mode_hdr.h.

mh_inline uint_64t rotl64 ( uint_64t  x,
int  n 
)

Definition at line 141 of file mode_hdr.h.

mh_inline uint_32t rotr32 ( uint_32t  x,
int  n 
)

Definition at line 134 of file mode_hdr.h.

Referenced by bswap_32().

mh_inline uint_64t rotr64 ( uint_64t  x,
int  n 
)

Definition at line 148 of file mode_hdr.h.

mh_inline void xor_block ( void *  p,
const void *  q 
)

Definition at line 237 of file mode_hdr.h.

References ui8_ptr.

Referenced by gcm_auth_data(), gcm_auth_header(), gcm_crypt_data(), and xor_block_aligned().

mh_inline void xor_block_aligned ( void *  p,
const void *  q 
)

Definition at line 249 of file mode_hdr.h.

References unit_ptr, and xor_block().

Referenced by gcm_auth_data(), gcm_auth_header(), gcm_crypt_data(), gcm_init_message(), and gf_mul().

Here is the call graph for this function: