|
Botan
1.10.17
|
#include <salsa20.h>
Public Member Functions | |
| void | cipher (const byte in[], byte out[], size_t length) |
| void | cipher1 (byte buf[], size_t len) |
| void | clear () |
| StreamCipher * | clone () const |
| Key_Length_Specification | key_spec () const |
| size_t | maximum_keylength () const |
| size_t | minimum_keylength () const |
| std::string | name () const |
| Salsa20 () | |
| void | set_iv (const byte iv[], size_t iv_len) |
| void | set_key (const SymmetricKey &key) |
| void | set_key (const byte key[], size_t length) |
| bool | valid_iv_length (size_t iv_len) const |
| bool | valid_keylength (size_t length) const |
|
inline |
Encrypt or decrypt a message
| in | the plaintext |
| out | the byte array to hold the output, i.e. the ciphertext |
| len | the length of both in and out in bytes |
Implements Botan::StreamCipher.
Definition at line 104 of file salsa20.cpp.
References Botan::MemoryRegion< T >::size(), and Botan::xor_buf().
|
inlineinherited |
Encrypt or decrypt a message
| buf | the plaintext / ciphertext |
| len | the length of buf in bytes |
Definition at line 34 of file stream_cipher.h.
Referenced by Botan::Lion::decrypt_n(), and Botan::Lion::encrypt_n().
|
virtual |
Zeroize internal state
Implements Botan::Algorithm.
Definition at line 233 of file salsa20.cpp.
References Botan::zeroise().
|
inlinevirtual |
Get a new object representing the same algorithm as *this
Implements Botan::StreamCipher.
Definition at line 35 of file salsa20.h.
|
inlinevirtual |
Implements Botan::SymmetricAlgorithm.
|
inlineinherited |
Definition at line 33 of file sym_algo.h.
|
inlineinherited |
Definition at line 41 of file sym_algo.h.
|
virtual |
Implements Botan::Algorithm.
Definition at line 225 of file salsa20.cpp.
Referenced by set_iv().
|
virtual |
Resync the cipher using the IV
| iv | the initialization vector |
| iv_len | the length of the IV in bytes |
Reimplemented from Botan::StreamCipher.
Definition at line 177 of file salsa20.cpp.
References Botan::load_le< u32bit >(), name(), and valid_iv_length().
|
inlineinherited |
Set the symmetric key of this object.
| key | the SymmetricKey to be set. |
Definition at line 60 of file sym_algo.h.
References Botan::OctetString::begin(), and Botan::OctetString::length().
Referenced by Botan::aont_unpackage(), Botan::Lion::decrypt_n(), Botan::PKCS5_PBKDF2::derive_key(), Botan::ECB_Decryption::ECB_Decryption(), Botan::ECB_Encryption::ECB_Encryption(), Botan::Lion::encrypt_n(), Botan::HMAC_RNG::HMAC_RNG(), Botan::MAC_Filter::MAC_Filter(), Botan::HMAC_RNG::reseed(), Botan::XTS_Encryption::set_key(), Botan::EAX_Base::set_key(), Botan::XTS_Decryption::set_key(), Botan::Record_Writer::set_keys(), Botan::Record_Reader::set_keys(), and Botan::StreamCipher_Filter::StreamCipher_Filter().
|
inlineinherited |
Set the symmetric key of this object.
| key | the to be set as a byte array. |
| length | in bytes of key param |
Definition at line 68 of file sym_algo.h.
|
inlinevirtual |
| iv_len | the length of the IV in bytes |
Reimplemented from Botan::StreamCipher.
Definition at line 25 of file salsa20.h.
Referenced by set_iv().
|
inlineinherited |
Check whether a given key length is valid for this algorithm.
| length | the key length to be checked. |
Definition at line 51 of file sym_algo.h.
Referenced by Botan::aont_unpackage(), Botan::HMAC_RNG::HMAC_RNG(), and Botan::Lion::Lion().
1.8.14