Class SRP

Hierarchy

  • SRP

Constructors

Properties

Methods

Constructors

Properties

params: { 1024: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 1536: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 2048: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 3072: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 4096: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 6244: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; 8192: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }; hap: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string } } = srpParams

Type declaration

  • 1024: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 1536: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 2048: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 3072: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 4096: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 6244: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • 8192: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string
  • hap: { N: BigInteger; N_length_bits: number; g: BigInteger; hash: string }
    • N: BigInteger
    • N_length_bits: number
    • g: BigInteger
    • hash: string

Methods

  • The verifier is calculated as described in Section 3 of [SRP-RFC]. We give the algorithm here for convenience.

    The verifier (v) is computed based on the salt (s), user name (I), password (P), and group parameters (N, g).

        x = H(s | H(I | ":" | P))
    v = g^x % N

    Returns

    Parameters

    • params: SrpParams

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

    • salt: Buffer
    • I: Buffer

      User identity

    • P: Buffer

      User password

    Returns Buffer

  • Generate a random key with a length of 32 bytes

    Returns

    Parameters

    Returns void

  • Generate a random key.

    Returns

    Parameters

    Returns void

  • Generate a random key.

    Returns

    Parameters

    • Optional bytes: number

      Length of key. Defaults to 32.

    Returns Promise<Buffer>