Arduino Cryptography Library
|
Concrete base class to assist with implementing single-key XTS mode for 128-bit block ciphers. More...
#include <XTS.h>
Public Member Functions | |
virtual | ~XTSSingleKeyCommon () |
Clears all sensitive information and destroys this object. | |
size_t | keySize () const |
Gets the size of the key for single-pkey XTS mode. More... | |
bool | setKey (const uint8_t *key, size_t len) |
Sets the key to use for single-keyh XTS mode. More... | |
Public Member Functions inherited from XTSCommon | |
virtual | ~XTSCommon () |
Clears all sensitive information and destroys this object. | |
size_t | tweakSize () const |
Gets the maximum supported size for the tweak. More... | |
size_t | sectorSize () const |
Gets the size of sectors encrypted or decrypted by this class. More... | |
bool | setSectorSize (size_t size) |
Sets the size of sectors encrypted or decrypted by this class. More... | |
bool | setTweak (const uint8_t *tweak, size_t len) |
Sets the tweak value for the current sector to encrypt or decrypt. More... | |
void | encryptSector (uint8_t *output, const uint8_t *input) |
Encrypts an entire sector of data. More... | |
void | decryptSector (uint8_t *output, const uint8_t *input) |
Decrypts an entire sector of data. More... | |
void | clear () |
Clears all security-sensitive state from this XTS object. | |
Protected Member Functions | |
XTSSingleKeyCommon () | |
Constructs an XTS object with a default sector size of 512 bytes. | |
Protected Member Functions inherited from XTSCommon | |
XTSCommon () | |
Constructs an XTS object with a default sector size of 512 bytes. | |
void | setBlockCiphers (BlockCipher *cipher1, BlockCipher *cipher2) |
Sets the two block ciphers to use for XTS mode. More... | |
Concrete base class to assist with implementing single-key XTS mode for 128-bit block ciphers.
References: IEEE Std. 1619-2007, NIST SP 800-38E, a href="http://web.cs.ucdavis.edu/~rogaway/papers/offsets.pdf">XEX.
|
virtual |
|
virtual |
Sets the key to use for single-keyh XTS mode.
key | Points to the key. |
len | The size of the key in bytes which must be same as the size of the underlying block cipher. |
This function should be followed by a call to setTweak() to specify the sector-specific tweak.
Reimplemented from XTSCommon.