Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

stTwoFish

Classes, interfaces and records

recordtLongRec

(no public members)

recordtBlock

A,B,C,D: tLongRec;

classtTwoFish_ECB

inherits from tBlockCipher

Deprecated - TwoFish, and every tTwoFish_ class below: use AES (caRijndael) for new data. It works as before on Win32 and Win64 and is kept so that existing data can still be read. The block functions are written only in x86 and x64 assembler; on a compiler without an inline assembler (every Delphi compiler but the Win32 and Win64 ones) every encryption and decryption raises eCipherError.

constructor Create(const aKey; aCount: Integer; aSetIV : Boolean = False; aRefCounted : Boolean = False); override; constructor CreateClone(aCipher: tCipher); override; class function BlockSize: Integer; override;
Always returns 16.
class function Mode: tCipherMode; override;
Returns cmECB, see tCipherMode.
class function Algorithm: tCipherAlg; override;
Returns caTwoFish, see tCipherAlg.
class function AlgorithmName: string; override;
Always returns the string 'TwoFish'.
class function BlockVectorSize: Integer; override;
Always returns 0.
class function MaxKeySize: Integer; override;
Always returns 32.
class function MinKeySize: Integer; override;
Always returns 16.
procedure SetUp(const aKey; aCount: Integer); override;

classtTwoFish_CFB

inherits from tTwoFish_ECB

constructor Create(const aKey; aCount: Integer; aSetIV: Boolean = False; aRefCounted: Boolean = False); override; class function Mode: tCipherMode; override;
Returns cmCFB, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 1.
property ModeRatio; class function OID(aKeySize: Integer): ObjectIdentifier; override;
Always returns an empty string.
class function KeyedIVOID(aKeySize: Integer): ObjectIdentifier; override;

classtTwoFish_OFB

inherits from tTwoFish_CFB

class function Mode: tCipherMode; override;
Returns cmOFB, see tCipherMode.
function Decrypt(var aBuf; var aCount: Integer): Boolean; override; function Encrypt(var aBuf; var aCount: Integer): Boolean; override; class function OID(aKeySize: Integer): ObjectIdentifier; override;
Always returns an empty string.
class function KeyedIVOID(aKeySize: Integer): ObjectIdentifier; override;

classtTwoFish_ABC

inherits from tTwoFish_ECB

class function Mode: tCipherMode; override;
Returns cmABC, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 2.
class function OID(aKeySize: Integer): ObjectIdentifier; override;
Always returns an empty string.
class function KeyedIVOID(aKeySize: Integer): ObjectIdentifier; override;

classtTwoFish_CTR

inherits from tTwoFish_ECB

class function Mode: tCipherMode; override;
Returns cmCTR, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 1.
function Decrypt(var aBuf; var aCount: Integer): Boolean; override; function Encrypt(var aBuf; var aCount: Integer): Boolean; override; class function OID(aKeySize: Integer): ObjectIdentifier; override;
Always returns an empty string.
class function KeyedIVOID(aKeySize: Integer): ObjectIdentifier; override;

classtTwoFish_CBC

inherits from tTwoFish_ECB

class function Mode: tCipherMode; override;
Returns cmCBC, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 1.
class function OID(aKeySize: Integer): ObjectIdentifier; override;
Always returns an empty string.
class function KeyedIVOID(aKeySize: Integer): ObjectIdentifier; override;

classtTwoFish_CCM

class function Mode: tCipherMode; override;
Returns cmCCM, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 2.

classtTwoFish_EAX

class function Mode: tCipherMode; override;
Returns cmEAX, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 3.

classtTwoFish_SSH

class function Mode: tCipherMode; override;
Returns cmSSH, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 1.

classtTwoFish_SSHCTR

class function Mode: tCipherMode; override;
Returns cmSSHCTR, see tCipherMode.
class function BlockVectorSize: Integer; override;
Always returns 1.

Types (enumerations, sets, aliases)

typepTwoFishBox

  pTwoFishBox = ^tTwoFishBox;

arraytTwofishBox

  tTwofishBox = array[0..3, 0..255] of UInt32;

typepBlock

  pBlock = ^tBlock;

typepIntArray

  pIntArray = ^IntArray;

arrayIntArray

  IntArray = array [0..(MaxInt div 4)-1] of UInt32;