Class SRP6.SRP6Base
java.lang.Object
br.net.dd.netherwingcore.common.cryptography.authentication.SRP6.SRP6Base
- Direct Known Subclasses:
SRP6.SRP6Client
- Enclosing class:
SRP6
Base class for SRP6 computations. Handles the protocol's mathematical operations
with parameters such as prime modulus (N), generator (g), salt, and verifier.
Provides methods for private and public values and client evidence verification.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final BigIntegerprotected final BigIntegerprotected final BigIntegerprotected final BigIntegerprotected final BigIntegerprotected final SRP6.Saltprotected final BigInteger -
Constructor Summary
ConstructorsConstructorDescriptionSRP6Base(BigInteger i, SRP6.Salt salt, BigInteger verifier, BigInteger N, BigInteger g, BigInteger k) Constructs an SRP6Base instance with the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected BigIntegerdoVerifyClientEvidence(BigInteger A, BigInteger clientM1) verifyClientEvidence(BigInteger A, BigInteger clientM1) Verifies the client's evidence (M1) based on the SRP protocol.
-
Field Details
-
N
-
g
-
k
-
v
-
s
-
b
-
B
-
_used
protected boolean _used
-
-
Constructor Details
-
SRP6Base
public SRP6Base(BigInteger i, SRP6.Salt salt, BigInteger verifier, BigInteger N, BigInteger g, BigInteger k) Constructs an SRP6Base instance with the provided parameters.- Parameters:
i- An unused initialization parameter (hash of username may be passed here).salt- The salt used in SRP computation.verifier- The verifier generated during the registration phase.N- Prime modulus for SRP computations.g- Generator for SRP computations.k- Multiplier parameter.
-
-
Method Details
-
verifyClientEvidence
Verifies the client's evidence (M1) based on the SRP protocol.- Parameters:
A- Public value sent by the client.clientM1- Client's proof of knowledge of the shared key.- Returns:
- The session key (K) if verification succeeds; null otherwise.
- Throws:
IllegalStateException- if the object is reused.
-
doVerifyClientEvidence
-