NetBurner 3.5.0
PDF Version
 
AES - Advanced Encryption Standard

Classes

struct  aes_context
 AES context structure. More...
 

Functions

void aes_set_key (aes_context *ctx, const 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

#include< aes.h >

Function to implement the symetric block cyper AES

Function Documentation

◆ aes_cbc_decrypt()

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

#include <aes.h>

AES-CBC buffer decryption.

Parameters
ctxAES context
ivinitialization vector (modified after use)
inputbuffer holding the ciphertext
outputbuffer holding the plaintext
lenlength of the data to be decrypted

◆ aes_cbc_encrypt()

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

#include <aes.h>

AES-CBC buffer encryption.

Parameters
ctxAES context
ivinitialization vector (modified after use)
inputbuffer holding the plaintext
outputbuffer holding the ciphertext
lenlength of the data to be encrypted

◆ aes_decrypt()

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

#include <aes.h>

AES block decryption (ECB mode)

Parameters
ctxAES context
inputciphertext block
outputplaintext block

◆ aes_encrypt()

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

#include <aes.h>

AES block encryption (ECB mode)

Parameters
ctxAES context
inputplaintext block
outputciphertext block

◆ aes_self_test()

int aes_self_test ( int verbose)

#include <aes.h>

Checkup routine.

Returns
0 if successful, or 1 if the test failed

◆ aes_set_key()

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

#include <aes.h>

AES key schedule.

Parameters
ctxAES context to be initialized
keythe secret key
keysizemust be 128, 192 or 256