AnCH Framework  0.1
Another C++ Hack Framework
Public Member Functions | List of all members
anch::crypto::AES< K, R > Class Template Reference

AES block cipher algorithm implementation. More...

#include <aes.hpp>

Inheritance diagram for anch::crypto::AES< K, R >:
Collaboration diagram for anch::crypto::AES< K, R >:

Public Member Functions

 AES (const uint8_t key[4 *K])
 
 AES (const AES &other)
 
virtual ~AES ()
 
void cipher (const std::array< uint8_t, 16 > &input, std::array< uint8_t, 16 > &output)
 
void decipher (const std::array< uint8_t, 16 > &input, std::array< uint8_t, 16 > &output)
 
- Public Member Functions inherited from anch::crypto::BlockCipher< 16 >
virtual void cipher (const std::array< uint8_t, B > &input, std::array< uint8_t, B > &output)=0
 
virtual void decipher (const std::array< uint8_t, B > &input, std::array< uint8_t, B > &output)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from anch::crypto::BlockCipher< 16 >
static constexpr std::size_t getBlockSize ()
 

Detailed Description

template<std::size_t K, std::size_t R>
class anch::crypto::AES< K, R >

AES block cipher algorithm implementation.

This class only implements the key management and the cipher/decipher of one block.
See standard specification for more details (http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf).

Since
0.1
Author
Vincent Lachenal

Constructor & Destructor Documentation

template<std::size_t K, std::size_t R>
anch::crypto::AES< K, R >::AES ( const uint8_t  key[4 *K])
inline

AES constructor

Parameters
keythe encryption key
template<std::size_t K, std::size_t R>
anch::crypto::AES< K, R >::AES ( const AES< K, R > &  other)
inline

AES copy constructor.
This constructor will copy the expanded key to avoid to compute it another time.

Parameters
otherthe AES to copy
template<std::size_t K, std::size_t R>
virtual anch::crypto::AES< K, R >::~AES ( )
inlinevirtual

AES destructor

Member Function Documentation

template<std::size_t K, std::size_t R>
void anch::crypto::AES< K, R >::cipher ( const std::array< uint8_t, 16 > &  input,
std::array< uint8_t, 16 > &  output 
)
inline

Cipher a block

Parameters
inputthe block to cipher
outputthe ciphered block
template<std::size_t K, std::size_t R>
void anch::crypto::AES< K, R >::decipher ( const std::array< uint8_t, 16 > &  input,
std::array< uint8_t, 16 > &  output 
)
inline

Decipher a block

Parameters
inputthe block to decipher
outputthe deciphered block

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