public BigInteger step1(final String userID, final BigInteger s, final BigInteger v) {

    // Check arguments

    if (userID == null || userID.trim().isEmpty())
      throw new IllegalArgumentException("The user identity 'I' must not be null or empty");

    this.userID = userID;

    if (s == null) throw new IllegalArgumentException("The salt 's' must not be null");

    this.s = s;

    if (v == null) throw new IllegalArgumentException("The verifier 'v' must not be null");

    this.v = v;

    // Check current state
    if (state != State.INIT)
      throw new IllegalStateException("State violation: Session must be in INIT state");

    // Generate server private and public values
    k = SRP6Routines.computeK(digest, config.N, config.g);
    digest.reset();

    b = HomekitSRP6Routines.generatePrivateValue(config.N, random);
    digest.reset();

    B = SRP6Routines.computePublicServerValue(config.N, config.g, k, v, b);

    state = State.STEP_1;

    updateLastActivityTime();

    return B;
  }
public BigInteger step1 ( final String userID , final BigInteger s , final BigInteger v ) { if ( userID == null || userID . trim ( ) . isEmpty ( ) ) throw new IllegalArgumentException ( "The user identity 'I' must not be null or empty" ) ; this . userID = userID ; if ( s == null ) throw new IllegalArgumentException ( "The salt 's' must not be null" ) ; this . s = s ; if ( v == null ) throw new IllegalArgumentException ( "The verifier 'v' must not be null" ) ; this . v = v ; if ( state != State . INIT ) throw new IllegalStateException ( "State violation: Session must be in INIT state" ) ; k = SRP6Routines . computeK ( digest , config . N , config . g ) ; digest . reset ( ) ; b = HomekitSRP6Routines . generatePrivateValue ( config . N , random ) ; digest . reset ( ) ; B = SRP6Routines . computePublicServerValue ( config . N , config . g , k , v , b ) ; state = State . STEP_1 ; updateLastActivityTime ( ) ; return B ; }
Increments this SRP-6a authentication session to {@link State#STEP_1}.

<p>Argument origin:

<ul>
<li>From client: user identity 'I'.
<li>From server database: matching salt 's' and password verifier 'v' values.
</ul>

@param userID The identity 'I' of the authenticating user. Must not be {@code null} or empty.
@param s The password salt 's'. Must not be {@code null}.
@param v The password verifier 'v'. Must not be {@code null}.
@return The server public value 'B'.
@throws IllegalStateException If the mehod is invoked in a state other than {@link State#INIT}.