Class SRP6.SRP6Base

java.lang.Object
br.net.dd.netherwingcore.common.cryptography.authentication.SRP6.SRP6Base
Direct Known Subclasses:
SRP6.SRP6Client
Enclosing class:
SRP6

public static class SRP6.SRP6Base extends Object
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 Details

  • 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

      public BigInteger verifyClientEvidence(BigInteger A, BigInteger clientM1)
      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

      protected BigInteger doVerifyClientEvidence(BigInteger A, BigInteger clientM1)