LEGACY verifier-based login for the Snif remoting framework.
This unit provides the original, pre-quantum authentication classes:
Login - a bespoke verifier-based modular-exponentiation challenge-
response. The server stores V = P^S mod N (P = iterated
SHA3-256 password digest, S a secret exponent, N a composite
modulus of unknown factorization); the client proves knowledge
of P via R = P^C mod N and the server checks R^S = V^C (mod N).
It is augmented (file theft => offline dictionary, not direct
impersonation) and leans on the outer tunnel for confidentiality.
It only superficially resembles SRP.
LoginPlain - the opt-in plaintext-password path (password sent inside the
secure channel).
ChangePassword - re-provision the verifier after a challenge-response re-auth.
The post-quantum replacement (AkeLogin / AkeChangeAuth + the OTP login) lives in a
SEPARATE unit, StreamSec.Snif.AkeAuthentication; an application chooses its scheme by
including one unit or the other. If BOTH are linked, the AKE unit takes precedence
(see StreamSec.Snif.CustomAuthentication) and the classes here fail closed: every
remotable method returns its error sentinel so no client can use the weaker scheme.Feature notes: Snif remoting framework (concepts) · Tunnel Bound KAPA (Snif authentication)
class function CalcModulus: tBytes; static;
class procedure ClearModulus; static;
class function CalcPasswordDigest(const aUsername, aPassword: tBytes): tBytes; static;
class function CalcResponse(const aUsername, aPassword, aChallenge: tBytes): tBytes; static;
procedure InitData(const aAuthData: tBytes);
procedure InitPlain(const aUsername, aPassword: tBytes);
procedure InitDigest(const aDigest: tBytes);
procedure InitSecure(const aModulus, aExp, aVer: tBytes);
function Challenge: tBytes;
function VerifyPlain(const aUsername, aPassword: tBytes): Boolean;
function VerifyResponse(const aChallenge, aResponse: tBytes): Boolean;
function GetData: tBytes;
inherits from TsnifCustomAuthentication
(no public members)
inherits from TsnifCustomLogin
function GetChallenge(const aUserName: string): TSafeBytes;
function VerifyResponse(const aResponse: TSafeBytes): Boolean;
inherits from TsnifCustomLogin
procedure SetUsername(const aUserName: string);
function Verify(const aPassword: string): Boolean;
inherits from TsnifCustomLogin
function GetChallenge: TSafeBytes;
function Commit(const aResponse, aNewAuthData: TSafeBytes): Boolean;