Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
RijndaelCTR Class Reference

Class to compute AES 128 CTR encryption/decryption. More...

#include <RijndaelCTR.h>

+ Collaboration diagram for RijndaelCTR:

Public Types

enum  { BLOCK_SIZE = 16 }
 
enum  { BLOCK_SIZE = 16 }
 
typedef uint8_t block_t[BLOCK_SIZE]
 The cipher block data type.
 
typedef uint8_t block_t[BLOCK_SIZE]
 The cipher block data type.
 

Public Member Functions

 RijndaelCTR (const AESKey< 128 > &key, const AESCounter< 128 > &counter)
 Constructor. More...
 
void encrypt (const uint8_t *data, unsigned length, uint8_t *dest)
 Encrypt data.
 
void decrypt (const uint8_t *data, unsigned length, uint8_t *dest)
 Encrypt data.
 
RijndaelCTRoperator= (const RijndaelCTR &other)
 Assignment operator.
 
 RijndaelCTR (const AESKey< 128 > &key, const AESCounter< 128 > &counter)
 Constructor.
 
void encrypt (const uint8_t *data, unsigned length, uint8_t *dest)
 Encrypt data.
 
void decrypt (const uint8_t *data, unsigned length, uint8_t *dest)
 Encrypt data.
 
RijndaelCTRoperator= (const RijndaelCTR &other)
 Assignment operator.
 

Protected Member Functions

void incrementCounter (AESCounter< 128 >::counter_t *counter)
 
void baseProcess (const uint8_t *data, unsigned length, uint8_t *dest)
 
void incrementCounter (AESCounter< 128 >::counter_t *counter)
 
void baseProcess (const uint8_t *data, unsigned length, uint8_t *dest)
 

Protected Attributes

AESKey< 128 > m_key
 128-bit key to use for encrypt/decrypt
 
AESCounter< 128 > m_counter
 Counter value for encrypt/decrypt.
 

Detailed Description

Class to compute AES 128 CTR encryption/decryption.

Currently only supports 128-bit keys and block sizes.

Member Enumeration Documentation

anonymous enum
Enumerator
BLOCK_SIZE 

Number of bytes in one cipher block.

anonymous enum
Enumerator
BLOCK_SIZE 

Number of bytes in one cipher block.

Constructor & Destructor Documentation

RijndaelCTR::RijndaelCTR ( const AESKey< 128 > &  key,
const AESCounter< 128 > &  counter 
)

Constructor.

Parameters
keyThe key to use
counterThe counter to use

The documentation for this class was generated from the following files: