Class SrpServer

Hierarchy

  • SrpServer

Constructors

Properties

Methods

Constructors

  • Create an SRP server.

    This has two modes:

    • Using a password: creates the server using a salt, identity and password, optionally in an object
    • Using a verifier: creates the server using a salt, identity and verifier in an object

    Parameters

    • params: SrpParams

      Group parameters, with .N, .g, .hash

    • salt_buf: Buffer

      User salt (from server)

    • identity_buf: Buffer

      Identity/username

    • password_buf: Buffer

      Password

    • secret2_buf: Buffer

      Client private key {@see genKey}

    Returns SrpServer

  • Parameters

    • params: SrpParams
    • verifier_buf: Buffer
    • secret2_buf: Buffer

    Returns SrpServer

  • Parameters

    Returns SrpServer

Properties

_K?: Buffer

Session key

_M1?: Buffer
_M2?: Buffer
_S?: Buffer

Premaster secret

_u?: BigInteger

Random scrambling parameter

Methods

  • Checks the client was able to calculate M1.

    Parameters

    • M1: Buffer

      The client's M1 value

    Returns void

  • Returns the server's public key (B).

    Returns

    Returns Buffer

  • Returns the shared session key.

    Returns

    Returns Buffer

  • Gets the M2 value. This requires setting the client's public key {@see Server.setA}.

    Returns

    Returns Buffer

  • Sets the client's public key (A).

    Parameters

    • A: Buffer

      The client's public key

    Returns void