Feature notes: SSH implementation notes
function GetEncryptionKeyLengthC2S: Integer;
function GetEncryptionKeyLengthS2C: Integer;
function GetInitialIVLengthC2S: Integer;
function GetInitialIVLengthS2C: Integer;
function GetIntegrityKeyLengthC2S: Integer;
function GetIntegrityKeyLengthS2C: Integer;
function GetEncryptionKeyC2S: iSecretKey;
function GetEncryptionKeyS2C: iSecretKey;
function GetInitialIVC2S: iSecretKey;
function GetInitialIVS2C: iSecretKey;
function GetIntegrityKeyC2S: iSecretKey;
function GetIntegrityKeyS2C: iSecretKey;
procedure SetEncryptionKeyLengthC2S(const Value: Integer);
procedure SetEncryptionKeyLengthS2C(const Value: Integer);
procedure SetInitialIVLengthC2S(const Value: Integer);
procedure SetInitialIVLengthS2C(const Value: Integer);
procedure SetIntegrityKeyLengthC2S(const Value: Integer);
procedure SetIntegrityKeyLengthS2C(const Value: Integer);
procedure SetEncryptionKeyC2S(const Value: iSecretKey);
procedure SetEncryptionKeyS2C(const Value: iSecretKey);
procedure SetInitialIVC2S(const Value: iSecretKey);
procedure SetInitialIVS2C(const Value: iSecretKey);
procedure SetIntegrityKeyC2S(const Value: iSecretKey);
procedure SetIntegrityKeyS2C(const Value: iSecretKey);
property InitialIVLengthC2S: Integer read GetInitialIVLengthC2S write SetInitialIVLengthC2S;
property InitialIVLengthS2C: Integer read GetInitialIVLengthS2C write SetInitialIVLengthS2C;
property EncryptionKeyLengthC2S: Integer read GetEncryptionKeyLengthC2S write SetEncryptionKeyLengthC2S;
property EncryptionKeyLengthS2C: Integer read GetEncryptionKeyLengthS2C write SetEncryptionKeyLengthS2C;
property IntegrityKeyLengthC2S: Integer read GetIntegrityKeyLengthC2S write SetIntegrityKeyLengthC2S;
property IntegrityKeyLengthS2C: Integer read GetIntegrityKeyLengthS2C write SetIntegrityKeyLengthS2C;
property InitialIVC2S: iSecretKey read GetInitialIVC2S write SetInitialIVC2S;
property InitialIVS2C: iSecretKey read GetInitialIVS2C write SetInitialIVS2C;
property EncryptionKeyC2S: iSecretKey read GetEncryptionKeyC2S write SetEncryptionKeyC2S;
property EncryptionKeyS2C: iSecretKey read GetEncryptionKeyS2C write SetEncryptionKeyS2C;
property IntegrityKeyC2S: iSecretKey read GetIntegrityKeyC2S write SetIntegrityKeyC2S;
property IntegrityKeyS2C: iSecretKey read GetIntegrityKeyS2C write SetIntegrityKeyS2C;
inherits from iKeyExchange
function GetHostKeyEnc: tBytes;
function GetInitClient: tBytes;
function GetInitServer: tBytes;
function GetNewKeys: Boolean;
function GetSessionID: tBytes;
function GetVersionClient: string;
function GetVersionServer: string;
procedure SetHostKeyEnc(const Value: tBytes);
procedure SetInitClient(const Value: tBytes);
procedure SetInitServer(const Value: tBytes);
procedure SetSessionID(const Value: tBytes);
procedure SetVersionClient(const Value: string);
procedure SetVersionServer(const Value: string);
function Execute(const aTransport: iTransport; const aKey : iUnknown; const aMsg : tBytes; const aMsgOffs : Integer; const aMsgLen : Integer) : iSSHSymmetricKeys;
property VersionClient: string read GetVersionClient write SetVersionClient;
property VersionServer: string read GetVersionServer write SetVersionServer;
property InitClient: tBytes read GetInitClient write SetInitClient;
property InitServer: tBytes read GetInitServer write SetInitServer;
property HostKeyEnc: tBytes read GetHostKeyEnc write SetHostKeyEnc;
property SessionID: tBytes read GetSessionID write SetSessionID;
property NewKeys: Boolean read GetNewKeys;
inherits from tInterfacedObject
implements iSSHSymmetricKeys
(no public members)
inherits from tDSIKeyExchange
implements iSSHKeyExchange
constructor Create(aPool: iDSIDLArith); virtual;
destructor Destroy; override;
inherits from tInterfacedObject
implements iDiscreteLogField, iFFSystemParams
constructor Create(aPool: iDSIDLArith); virtual;
procedure Assign(const aSrc: iDiscreteLogField); overload;
procedure Assign(const aSrc: iFFSystemParams); overload;
function Clone: iFFSystemParams;
function Compare(const aParams: iDiscreteLogField): Boolean; overload;
function Compare(const aParams: iFFSystemParams): Boolean; overload;
procedure Generate(aBitSize: Cardinal; aQBitSize: Cardinal);
function Validate: Boolean;
function ScalarFixBitLength: Integer;
function FieldElementToBytes(const aElement: iGroupElement) : tBytes; overload;
function FieldElementToBytes(const aElement : iGroupElement; const aDst : tBytes; aDstOffset: Integer; var aDstCount : Integer) : Boolean; overload;
function BytesToFieldElement(const aSrc: tBytes): iGroupElement; overload;
function BytesToFieldElement(const aSrc: tBytes; aSrcOffset, aSrcCount: Integer) : iGroupElement; overload;
function IsNonTrivialFieldElement(const aElement: iGroupElement): Boolean;
function IsGroupElement(const aElement: iGroupElement): Boolean;
property Pool: iDSIDLArith read GetPool;
property P: iDSInteger read GetP write SetP;
property Q: iDSInteger read GetQ write SetQ;
property G: iDSInteger read GetG write SetG;
property J: iDSInteger read GetJ write SetJ;
function iDiscreteLogField.GetPrimeModulus = GetP;
function iDiscreteLogField.GetGroupOrder = GetQ;
function iDiscreteLogField.GetCoFactor = GetJ;
procedure iDiscreteLogField.SetPrimeModulus = SetP;
procedure iDiscreteLogField.SetGroupOrder = SetQ;
procedure iDiscreteLogField.SetCoFactor = SetJ;
inherits from iSSHKeyExchange
Diffie-Hellman with pre defined groups
function GetServerKey: iSignPublicKey;
procedure SetServerKey(const Value: iSignPublicKey);
function Pass1: tBytes;
function Pass2(const aKEXMsg: tBytes; const aKeys : iSSHSymmetricKeys) : Boolean;
property ServerKey: iSignPublicKey read GetServerKey write SetServerKey;
inherits from iSSHKeyExchange
function GetServerKey: iSignPrivateKey;
procedure SetServerKey(const Value: iSignPrivateKey);
function Pass1(const aKEXMsg: tBytes; const aKeys : iSSHSymmetricKeys) : tBytes;
property ServerKey: iSignPrivateKey read GetServerKey write SetServerKey;
inherits from tSSHGroup
(no public members)
inherits from tSSHGroup
(no public members)
inherits from tSSHGroup
(no public members)
inherits from tSSHGroup
(no public members)
inherits from tSSHGroup
(no public members)
inherits from tSSHKeyExchange
implements iSSHClientKeyExchange
destructor Destroy; override;
inherits from tSSHKeyExchange
implements iSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
curve25519-sha256 (RFC 8731): X25519 ECDH. Reuses the ECDH math of the DSI EC engine (MustGetDSIEC) over the X25519 curve; the ephemeral public keys are octet strings (EphemIsMPInt=False), the shared secret K is still mpint.
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
curve448-sha512 (RFC 8731): X448 ECDH. Same Montgomery shared-secret path as curve25519 (raw u-coordinate via GroupOpIteration), over the X448 curve with a SHA-512 exchange hash; the ephemeral public keys are octet strings.
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHClientKeyExchange
ecdh-sha2-nistp256/384/521 (RFC 5656): ECDH over the NIST prime curves. These are Weierstrass curves, so the inherited (KeyAgreementScheme_DH1) shared-secret path applies - IsMontgomeryGroup stays False. The ephemeral public key Q is an uncompressed octet-string point (EphemIsMPInt=False; FE2OSFormat=cUncompressed).
(no public members)
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHECDHNistClient
(no public members)
inherits from tSSHECDHNistServer
(no public members)
inherits from tSSHECDHNistClient
(no public members)
inherits from tSSHECDHNistServer
(no public members)
inherits from tSSHECDHNistClient
(no public members)
inherits from tSSHECDHNistServer
(no public members)
inherits from tSSHCurve25519Client
RFC 9941: sntrup761 + X25519 with SHA-512. The RFC name and the older @openssh.com alias share these engines. Q_C/Q_S are PQ-first strings; K = SHA-512(K_PQ || K_X25519) is a fixed 64-byte string, never an mpint.
destructor Destroy; override;
inherits from tSSHCurve25519Server
(no public members)
inherits from tSSHClientKeyExchange
Pure: draft-harrison-sshm-mlkem (mlkem512/768/1024-sha256/384) Hybrid: RFC 10042 (mlkem768x25519 / mlkem768nistp256 / mlkem1024nistp384). The 30/31 framing and the host-key sign/verify of tSSHClient/ServerKeyExchange are reused; only the INIT/REPLY payloads and the exchange-hash middle differ (IsKEM=True). The pure path calls the ML-KEM primitives (MustGetDSIML) directly; the hybrid path drives the composite ML-KEM pool (MustGetDSICK, StreamSec.DSI.CompositeKEM): the client offer C_INIT is the composite public key, the server reply S_REPLY is the composite ciphertext, and K is the SSH combiner output.
destructor Destroy; override;
inherits from tSSHServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from tSSHKemClientKeyExchange
(no public members)
inherits from tSSHKemServerKeyExchange
(no public members)
inherits from iSSHKeyExchange
Diffie Hellman with arbitrary groups
function GetServerKey: iSignPublicKey;
procedure SetServerKey(const Value: iSignPublicKey);
procedure Pass1(const aGroupSizeMsg: tBytes);
function Pass2(const aGEXMsg: tBytes): tBytes;
function Pass3(const aKEXMsg: tBytes; const aKeys : iSSHSymmetricKeys) : Boolean;
property ServerKey: iSignPublicKey read GetServerKey write SetServerKey;
inherits from iSSHKeyExchange
function GetServerKey: iSignPrivateKey;
procedure SetServerKey(const Value: iSignPrivateKey);
function Pass1(const aGroupSizeMsg: tBytes): tBytes;
function Pass2(const aKEXMsg: tBytes; const aKeys : iSSHSymmetricKeys) : tBytes;
property ServerKey: iSignPrivateKey read GetServerKey write SetServerKey;