![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
Cryptography namespace. More...
Classes | |
class | AES |
AES block cipher algorithm implementation. More... | |
class | ANSIX923 |
ANSI X.923 padding implementation. More... | |
class | Base64 |
Base64 algorithm implementation. More... | |
class | BlockCipher |
Block cipher interface. More... | |
class | BlockCipherModeOfOperation |
Block cipher mode of operation interface. More... | |
class | CBC |
Cipher-block chaining implementation. More... | |
class | CFB |
Cipher feedback implementation. More... | |
class | CTR |
Counter implementation. More... | |
class | ECB |
Electronic codebook implementation. More... | |
class | Hash |
Hash algorithm abstract class. More... | |
class | InvalidBlockException |
Exception on receiving an invalid block. More... | |
class | ISO7816_4Padding |
ISO/IEC 7816-4 padding implementation. More... | |
class | MD5 |
MD5 hash algorithm implementation. More... | |
class | OFB |
Output feedback implementation. More... | |
class | PCBC |
Propagating cipher-block chaining implementation. More... | |
class | PKCS5Padding |
PKCS5 padding implementation. More... | |
class | SHA1 |
SHA1 hash algorithm implementation. More... | |
class | SHA2 |
SHA2 abstract class. More... | |
class | SHA224_256 |
SHA2 224/256 implementation. More... | |
class | SHA384_512 |
SHA2 384/512 implementation. More... | |
class | ZeroPadding |
Zero padding implementation. More... | |
Typedefs | |
using | AES128 = AES< 4, 10 > |
using | AES192 = AES< 6, 12 > |
using | AES256 = AES< 8, 14 > |
using | SHA224 = SHA224_256< 28, SHA224_VALUES > |
using | SHA256 = SHA224_256< 32, SHA256_VALUES > |
using | SHA384 = SHA384_512< 48, SHA384_VALUES > |
using | SHA512 = SHA384_512< 64, SHA512_VALUES > |
Functions | |
template<typename H > | |
H | HMAC (const std::string &, const std::string &) |
template MD5 | HMAC< MD5 > (const std::string &, const std::string &) |
template SHA1 | HMAC< SHA1 > (const std::string &, const std::string &) |
template SHA224 | HMAC< SHA224 > (const std::string &, const std::string &) |
template SHA256 | HMAC< SHA256 > (const std::string &, const std::string &) |
template SHA384 | HMAC< SHA384 > (const std::string &, const std::string &) |
template SHA512 | HMAC< SHA512 > (const std::string &, const std::string &) |
template<class H > | |
H | HMAC (const char *const key, const char *const message) |
Variables | |
const uint8_t | ANCH_AES_CIPHER_SBOX [256] |
const uint8_t | ANCH_AES_DECIPHER_SBOX [256] |
const uint32_t | ANCH_AES_RCON [11] |
const uint8_t | ANCH_GALOIS_MULT2 [256] |
const uint8_t | ANCH_GALOIS_MULT3 [256] |
const uint8_t | ANCH_GALOIS_MULT9 [256] |
const uint8_t | ANCH_GALOIS_MULT11 [256] |
const uint8_t | ANCH_GALOIS_MULT13 [256] |
const uint8_t | ANCH_GALOIS_MULT14 [256] |
std::array< uint32_t, 8 > | SHA224_VALUES |
std::array< uint32_t, 8 > | SHA256_VALUES |
std::array< uint64_t, 8 > | SHA384_VALUES |
std::array< uint64_t, 8 > | SHA512_VALUES |
Cryptography namespace.
It contains classes for cryptography facilities:
using anch::crypto::AES128 = typedef AES<4,10> |
AES-128 defintion
using anch::crypto::AES192 = typedef AES<6,12> |
AES-192 defintion
using anch::crypto::AES256 = typedef AES<8,14> |
AES-256 defintion
using anch::crypto::SHA224 = typedef SHA224_256<28,SHA224_VALUES> |
SHA224 definition
using anch::crypto::SHA256 = typedef SHA224_256<32,SHA256_VALUES> |
SHA256 defintion
using anch::crypto::SHA384 = typedef SHA384_512<48,SHA384_VALUES> |
SHA384 defintion
using anch::crypto::SHA512 = typedef SHA384_512<64,SHA512_VALUES> |
SHA512 defintion
H anch::crypto::HMAC | ( | const std::string & | key, |
const std::string & | message | ||
) |
Compute HMAC according to hash algorithm, key and message.
This function uses C++ string for key and message.
key | the key to use |
message | the message to use |
H anch::crypto::HMAC | ( | const char *const | key, |
const char *const | message | ||
) |
Compute HMAC according to hash algorithm, key and message.
This function uses characters for key and message.
key | the key to use |
message | the message to use |
const uint8_t anch::crypto::ANCH_AES_CIPHER_SBOX |
Cipher subsitution box
const uint8_t anch::crypto::ANCH_AES_DECIPHER_SBOX |
Decipher subsitution box
const uint32_t anch::crypto::ANCH_AES_RCON |
Round constants
const uint8_t anch::crypto::ANCH_GALOIS_MULT11 |
Galois multiply by 11 lookup table
const uint8_t anch::crypto::ANCH_GALOIS_MULT13 |
Galois multiply by 13 lookup table
const uint8_t anch::crypto::ANCH_GALOIS_MULT14 |
Galois multiply by 14 lookup table
const uint8_t anch::crypto::ANCH_GALOIS_MULT2 |
Galois multiply by 2 lookup table
const uint8_t anch::crypto::ANCH_GALOIS_MULT3 |
Galois multiply by 3 lookup table
const uint8_t anch::crypto::ANCH_GALOIS_MULT9 |
Galois multiply by 9 lookup table
std::array< uint32_t, 8 > anch::crypto::SHA224_VALUES |
SHA224 initial values
std::array< uint32_t, 8 > anch::crypto::SHA256_VALUES |
SHA256 initial values
std::array< uint64_t, 8 > anch::crypto::SHA384_VALUES |
SHA384 initial values
std::array< uint64_t, 8 > anch::crypto::SHA512_VALUES |
SHA512 initial values