Prf class

class cryptosyspki.Prf

Pseudorandom function (PRF) Functions.

class Alg

Key derivation function algorithms.

KMAC128 = 513

KMAC128 as per NIST SP 800-185

KMAC256 = 514

KMAC256 as per NIST SP 800-185

static bytes(numbytes, msg, key, prfalg, customstring='')

Generate output bytes using a pseudorandom function (PRF).

Parameters:
  • numbytes (int) -- Required number of output bytes.

  • msg (bytes) -- Input message data.

  • key (bytes) -- Key.

  • prfalg (Prf.Alg) -- PRF algorithm

  • customstring (str) -- Customization string (optional).

Returns:

Output data.

Return type:

bytes