23 #ifndef TAO_CRYPT_AES_HPP
24 #define TAO_CRYPT_AES_HPP
30 #if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
39 enum { AES_BLOCK_SIZE = 16 };
45 enum { BLOCK_SIZE = AES_BLOCK_SIZE };
47 AES(CipherDir DIR, Mode MODE)
51 void Process(byte*,
const byte*, word32);
53 void SetKey(
const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
54 void SetIV(
const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
56 static const word32 rcon_[];
61 static const word32 Te[5][256];
62 static const word32 Td[5][256];
64 static const word32* Te0;
65 static const word32* Te1;
66 static const word32* Te2;
67 static const word32* Te3;
68 static const word32* Te4;
70 static const word32* Td0;
71 static const word32* Td1;
72 static const word32* Td2;
73 static const word32* Td3;
74 static const word32* Td4;
76 void encrypt(
const byte*,
const byte*, byte*)
const;
77 void AsmEncrypt(
const byte*, byte*,
void*)
const;
78 void decrypt(
const byte*,
const byte*, byte*)
const;
79 void AsmDecrypt(
const byte*, byte*,
void*)
const;
81 void ProcessAndXorBlock(
const byte*,
const byte*, byte*)
const;
84 AES& operator=(
const AES&);
97 #endif // TAO_CRYPT_AES_HPP