Arduino Cryptography Library
|
Speck block cipher with a 128-bit block size. More...
#include <Speck.h>
Public Member Functions | |
Speck () | |
Constructs a Speck block cipher with no initial key. More... | |
size_t | blockSize () const |
Size of a single block processed by this cipher, in bytes. More... | |
size_t | keySize () const |
Default size of the key for this block cipher, in bytes. More... | |
bool | setKey (const uint8_t *key, size_t len) |
Sets the key to use for future encryption and decryption operations. More... | |
void | encryptBlock (uint8_t *output, const uint8_t *input) |
Encrypts a single block using this cipher. More... | |
void | decryptBlock (uint8_t *output, const uint8_t *input) |
Decrypts a single block using this cipher. More... | |
void | clear () |
Clears all security-sensitive state from this block cipher. More... | |
Public Member Functions inherited from BlockCipher | |
BlockCipher () | |
Constructs a block cipher. | |
virtual | ~BlockCipher () |
Destroys this block cipher object. More... | |
Speck block cipher with a 128-bit block size.
Speck is a family of lightweight block ciphers designed by the National Security Agency (NSA). The ciphers are highly optimized for software implementation on microcontrollers.
This class implements the Speck family that uses 128-bit block sizes with 128-bit, 192-bit, or 256-bit key sizes. Other Speck families support smaller block sizes of 32, 48, 64, or 96 bits but such block sizes are too small for use in modern cryptosystems.
The SpeckTiny and SpeckSmall classes provide alternative implementations that have reduced RAM and flash size requirements at the cost of some features and performance.
References: https://en.wikipedia.org/wiki/Speck_%28cipher%29, http://eprint.iacr.org/2013/404
Speck::Speck | ( | ) |
|
virtual |
Size of a single block processed by this cipher, in bytes.
Implements BlockCipher.
|
virtual |
Clears all security-sensitive state from this block cipher.
Security-sensitive information includes key schedules and any temporary state that is used by encryptBlock() or decryptBlock() which is stored in the object itself.
Implements BlockCipher.
|
virtual |
Decrypts a single block using this cipher.
output | The output buffer to put the plaintext into. Must be at least blockSize() bytes in length. |
input | The input buffer to read the ciphertext from which is allowed to overlap with output. Must be at least blockSize() bytes in length. |
Implements BlockCipher.
|
virtual |
Encrypts a single block using this cipher.
output | The output buffer to put the ciphertext into. Must be at least blockSize() bytes in length. |
input | The input buffer to read the plaintext from which is allowed to overlap with output. Must be at least blockSize() bytes in length. |
Implements BlockCipher.
|
virtual |
Default size of the key for this block cipher, in bytes.
This value indicates the default, or recommended, size for the key.
Implements BlockCipher.
|
virtual |
Sets the key to use for future encryption and decryption operations.
key | The key to use. |
len | The length of the key. |
Use clear() or the destructor to remove the key and any other sensitive data from the object once encryption or decryption is complete.
Implements BlockCipher.