Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Functions
ctaes.c File Reference
#include "ctaes.h"
Include dependency graph for ctaes.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BIT_RANGE(from, to)   (((1 << ((to) - (from))) - 1) << (from))
 
#define BIT_RANGE_LEFT(x, from, to, shift)   (((x) & BIT_RANGE((from), (to))) << (shift))
 
#define BIT_RANGE_RIGHT(x, from, to, shift)   (((x) & BIT_RANGE((from), (to))) >> (shift))
 
#define ROT(x, b)   (((x) >> ((b) * 4)) | ((x) << ((4-(b)) * 4)))
 

Functions

void AES128_init (AES128_ctx *ctx, const unsigned char *key16)
 
void AES128_encrypt (const AES128_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
 
void AES128_decrypt (const AES128_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
 
void AES192_init (AES192_ctx *ctx, const unsigned char *key24)
 
void AES192_encrypt (const AES192_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
 
void AES192_decrypt (const AES192_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
 
void AES256_init (AES256_ctx *ctx, const unsigned char *key32)
 
void AES256_encrypt (const AES256_ctx *ctx, size_t blocks, unsigned char *cipher16, const unsigned char *plain16)
 
void AES256_decrypt (const AES256_ctx *ctx, size_t blocks, unsigned char *plain16, const unsigned char *cipher16)
 

Macro Definition Documentation

#define BIT_RANGE (   from,
  to 
)    (((1 << ((to) - (from))) - 1) << (from))

Definition at line 258 of file ctaes.c.

#define BIT_RANGE_LEFT (   x,
  from,
  to,
  shift 
)    (((x) & BIT_RANGE((from), (to))) << (shift))

Definition at line 260 of file ctaes.c.

#define BIT_RANGE_RIGHT (   x,
  from,
  to,
  shift 
)    (((x) & BIT_RANGE((from), (to))) >> (shift))

Definition at line 261 of file ctaes.c.

#define ROT (   x,
  b 
)    (((x) >> ((b) * 4)) | ((x) << ((4-(b)) * 4)))

Definition at line 287 of file ctaes.c.

Function Documentation

void AES128_decrypt ( const AES128_ctx ctx,
size_t  blocks,
unsigned char *  plain16,
const unsigned char *  cipher16 
)

Definition at line 509 of file ctaes.c.

Here is the caller graph for this function:

void AES128_encrypt ( const AES128_ctx ctx,
size_t  blocks,
unsigned char *  cipher16,
const unsigned char *  plain16 
)

Definition at line 501 of file ctaes.c.

Here is the caller graph for this function:

void AES128_init ( AES128_ctx ctx,
const unsigned char *  key16 
)

Definition at line 497 of file ctaes.c.

Here is the caller graph for this function:

void AES192_decrypt ( const AES192_ctx ctx,
size_t  blocks,
unsigned char *  plain16,
const unsigned char *  cipher16 
)

Definition at line 530 of file ctaes.c.

Here is the caller graph for this function:

void AES192_encrypt ( const AES192_ctx ctx,
size_t  blocks,
unsigned char *  cipher16,
const unsigned char *  plain16 
)

Definition at line 521 of file ctaes.c.

Here is the caller graph for this function:

void AES192_init ( AES192_ctx ctx,
const unsigned char *  key24 
)

Definition at line 517 of file ctaes.c.

Here is the caller graph for this function:

void AES256_decrypt ( const AES256_ctx ctx,
size_t  blocks,
unsigned char *  plain16,
const unsigned char *  cipher16 
)

Definition at line 550 of file ctaes.c.

Here is the caller graph for this function:

void AES256_encrypt ( const AES256_ctx ctx,
size_t  blocks,
unsigned char *  cipher16,
const unsigned char *  plain16 
)

Definition at line 542 of file ctaes.c.

Here is the caller graph for this function:

void AES256_init ( AES256_ctx ctx,
const unsigned char *  key32 
)

Definition at line 538 of file ctaes.c.

Here is the caller graph for this function: