Hierarchy

  • Ocra

Methods

Methods

  • OCRA: OATH Challenge-Response Algorithm

    Description

    It generates a challenge-response based on OCRA: OATH Challenge-Response Algorithm.

    Returns

    Returns a safety-critical parameter with the size entered in P.

    Throws

    If an invalid parameter is entered.

    Throws

    If hsm returns an error.

    Parameters

    • sk: string

      Cryptographic key shared by both parties.

    • q: string

      Challenge shared between the parties coded in hexadecimal.

    • suite: string

      String containing the value that represents the suite of operations to calculate an OCRA response.

    • len: null | number

      Output csp size, values must be in the range 6 to 8.

    • Optional c: null | bigint

      Synchronized counter between the parties.

    • Optional ph: null | string

      String containing a hash known between the parties during the execution of the algorithm.

    • Optional s: null | string

      Set of strings containing information about the session in ascii encoding.

    • Optional ts: null | bigint

      Number of time intervals (seconds, minutes, hours or days, depending on the granularity specified) since midnight UTC on January 1, 1970 [UT].

    Returns Promise<string>