Class to compute CBC-MAC using the AES/Rijndael cipher.
More...
#include <RijndaelCBCMAC.h>
Class to compute CBC-MAC using the AES/Rijndael cipher.
Currently only supports 128-bit keys and block sizes.
| Enumerator |
|---|
| BLOCK_SIZE |
Number of bytes in one cipher block.
|
| RijndaelCBCMAC::RijndaelCBCMAC |
( |
| ) |
|
|
inline |
Default constructor.
The key and IV are both set to zero.
| RijndaelCBCMAC::RijndaelCBCMAC |
( |
const AESKey< 128 > & |
key, |
|
|
const uint8_t * |
iv = 0 |
|
) |
| |
Constructor.
- Parameters
-
| key | The key to use as the CBC-MAC secret. |
| iv | Initialization vector. Defaults to zero if not provided. |
| void RijndaelCBCMAC::finalize |
( |
| ) |
|
Signal that all data has been processed.
It appears that some forms of CBC-MAC encrypt the final output block again in order to protect against a plaintext attack. This method is a placeholder for such an operation, but it currently does nothing.
| void RijndaelCBCMAC::update |
( |
const uint8_t * |
data, |
|
|
unsigned |
length |
|
) |
| |
Process data.
- Parameters
-
| data | Pointer to data to process. |
| length | Number of bytes to process. Must be evenly divisible by BLOCK_SIZE. |
| void RijndaelCBCMAC::updateOneBlock |
( |
const uint8_t * |
data | ) |
|
|
protected |
On entry the current value of m_mac becomes the initialization vector for the CBC encryption of this block. The output of the encryption then becomes the new MAC, which is stored in m_mac.
The documentation for this class was generated from the following files: