|
Pol
Revision:cb584c9
|
#include <twofish.h>
Public Member Functions | |
| TwoFish () | |
| ~TwoFish () | |
| void | Decrypt (unsigned char *in, unsigned char *out, int len) |
| void | Init (unsigned char *gseed) |
Public Attributes | |
| unsigned char | subData3 [256] |
Protected Member Functions | |
| void | MakeKey (KeyInstance *key, unsigned char direction, int keyLen, char *keyMaterial) |
Static Protected Member Functions | |
| static void | BlockEncrypt (CipherInstance *cipher, KeyInstance *key, unsigned char *input, int inputLen, unsigned char *outBuffer) |
| static void | CipherInit (CipherInstance *cipher, unsigned char mode, char *IV) |
| static unsigned int | F32 (unsigned int x, unsigned int *k32, int keyLen) |
| static void | ReKey (KeyInstance *key) |
| static unsigned int | RS_MDS_Encode (unsigned int k0, unsigned int k1) |
Protected Attributes | |
| CipherInstance | ci |
| unsigned int | dwIndex |
| KeyInstance | ki |
| int | numRounds [4] |
| int | pos |
| unsigned int | seed |
| int | tabEnable |
| unsigned char | tabUsed [256] |
| Pol::Crypt::TwoFish::TwoFish | ( | ) |
| Pol::Crypt::TwoFish::~TwoFish | ( | ) |
Definition at line 59 of file twofish.cpp.
|
staticprotected |
Definition at line 214 of file twofish.cpp.
References Bswap, F32(), Pol::Crypt::tagcipherInstance::IV, Pol::Crypt::tagcipherInstance::iv32, Pol::Crypt::tagkeyInstance::keyLen, Pol::Crypt::tagcipherInstance::mode, Pol::Crypt::tagkeyInstance::numRounds, ROL, ROR, Pol::Crypt::tagkeyInstance::sboxKeys, and Pol::Crypt::tagkeyInstance::subKeys.
|
staticprotected |
Definition at line 185 of file twofish.cpp.
References Bswap, Pol::Crypt::tagcipherInstance::cipherSig, Pol::Crypt::tagcipherInstance::IV, Pol::Crypt::tagcipherInstance::iv32, and Pol::Crypt::tagcipherInstance::mode.
Referenced by Init().
| void Pol::Crypt::TwoFish::Decrypt | ( | unsigned char * | in, |
| unsigned char * | out, | ||
| int | len | ||
| ) |
Definition at line 94 of file twofish.cpp.
References BlockEncrypt(), ci, ki, pos, and subData3.
Referenced by Pol::Crypt::CCryptBlowfishTwofish::Decrypt(), and Pol::Crypt::CCryptTwofish::Decrypt().
|
staticprotected |
| void Pol::Crypt::TwoFish::Init | ( | unsigned char * | gseed | ) |
Definition at line 63 of file twofish.cpp.
References BlockEncrypt(), ci, CipherInit(), dwIndex, Pol::Crypt::tagkeyInstance::key32, ki, MakeKey(), numRounds, pos, ReKey(), seed, subData3, and tabEnable.
Referenced by Pol::Crypt::CCryptBlowfishTwofish::Init(), and Pol::Crypt::CCryptTwofish::Init().
|
protected |
Definition at line 198 of file twofish.cpp.
References Pol::Crypt::tagkeyInstance::direction, Pol::Crypt::tagkeyInstance::key32, Pol::Crypt::tagkeyInstance::keyLen, Pol::Crypt::tagkeyInstance::keyMaterial, Pol::Crypt::tagkeyInstance::keySig, Pol::Crypt::tagkeyInstance::numRounds, numRounds, and passert_r.
Referenced by Init().
|
staticprotected |
Definition at line 159 of file twofish.cpp.
References F32(), Pol::Crypt::tagkeyInstance::key32, Pol::Crypt::tagkeyInstance::keyLen, Pol::Crypt::tagkeyInstance::numRounds, ROL, RS_MDS_Encode(), Pol::Crypt::tagkeyInstance::sboxKeys, and Pol::Crypt::tagkeyInstance::subKeys.
Referenced by Init().
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| unsigned char Pol::Crypt::TwoFish::subData3[256] |
|
protected |
|
protected |