Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

stAES

Feature notes: TLS implementation notes (RFC map) · SSH implementation notes

Classes, interfaces and records

classtRijndael_ECB

inherits from tBlockCipher

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 caRijndael, see tCipherAlg.
class function AlgorithmName: string; override;
Always returns the string 'Rijdael'.
class function BlockVectorSize: Integer; override;
Always returns 0.
class function MaxKeySize: Integer; override;
Always returns 32.
class function MinKeySize: Integer; override;
Always returns 16.
class function OID(aKeySize: Integer): ObjectIdentifier; override; class function ConstantTime: Boolean; virtual;
False when the implementation's timing depends on key or plaintext. False here and in stAESBG (both index SBoxAES/IBoxAES with secret bytes); True in stAESNI and stAESCT. Ask the registered class rather than assuming - which implementation is registered depends on the CPU and on which of the sibling units the application happens to link.
procedure SetUp(const aKey; aCount: Integer); override;

classtRijndael_CBC

inherits from tRijndael_ECB

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

classtRijndael_CFB

inherits from tRijndael_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;

classtRijndael_OFB

inherits from tRijndael_CFB

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

classtRijndael_CTR

inherits from tRijndael_CFB

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

classtAES_Wrap

inherits from tRijndael_ECB

implements iKeyWrap

class function Mode: tCipherMode; override;
Returns the value of cmAESWrap.
class function BlockSize: Integer; override;
Always returns 8.
function Decrypt(var Buf; var Count: Integer): Boolean; override; function Encrypt(var Buf; var Count: Integer): Boolean; override;

classtRijndael_CCM

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

classtRijndael_EAX

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

classtRijndael_GCM

class function BlockVectorSize: Integer; override;
Always returns 2.
class function Mode: tCipherMode; override;
Returns cmGCM, see tCipherMode.
procedure SetUp(const aKey; aCount: Integer); override;

classtRijndael_SSH

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

classtRijndael_SSHCTR

SSH CTR (RFC 4344) AES cipher - the modern replacement for the deprecated stRijndael cmSSHCTR class. iSSHParameters makes it an offerable SSH cipher; the CTR keystream is driven by tBlockCipher.Encrypt_SSHCTR (no async keystream generator).

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

classtRijndael_SSHGCM

SSH AEAD (RFC 5647 aes-gcm / aes128-gcm@openssh.com / aes256-gcm@openssh.com): GCM crypto with the SSH binary-packet framing in bpmSSHGCM (tSSHGCMBlockPadding). iSSHParameters makes it an offerable SSH cipher; IVLength is 12 (the 96-bit GCM nonce derived by the KEX). BlockVectorSize=2 (the 2-block CTR vector, shared with the generic GCM cipher).

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

Types (enumerations, sets, aliases)

typeDWord

  DWord = UInt32;

typePDWord

  PDWord= ^DWord;

arraytRoundKey

  tRoundKey = array [0..3] of UInt32;

arrayTRK

  TRK = array[0..MAXROUNDS] of tRoundKey;

typePRK

  PRK = ^TRK;

Routines