pub struct VRF { /* private fields */ }

Implementations

Associated function to initialize a VRF structure with an initialized context for the given cipher suite.

Arguments:
  • suite: Identifying ciphersuite
Returns:
  • a VRF struct if successful

RSASP1 signature primitive defined in Section 5.2.1 of [RFC8017]

Arguments:
  • secret_key: Rsa private key
  • message: BigNum message representation
Returns:
  • a signature representative

RSAVP1 verification primitive defined in Section 5.2.2 of [RFC8017]

Arguments:
  • public_key: Rsa public key
  • signature: signed message to extract
Returns:
  • a BigNum representing the message extracted from the signature

MGF1 mask generation function based on the hash function hash as defined in Section B.2.1 of [RFC8017]

Arguments:
  • mgf_seed: seed from which mask is generated, an octet string
  • mask_len: intended length in octets of the mask; max length 2 ^ 32
Returns:
  • an octet string of length mask_len

Trait Implementations

RSA-FDH-VRF prooving algorithm as defined in Section 4.1 of VRF-draft-05

Arguments:
  • secret_key: RSA private key
  • alpha_string: VRF hash input, an octet string
Returns:
  • pi_string: proof, an octet string of length k

RSA-FDH-VRF proof to hash algorithm as defined in Section 4.2 of VRF-draft-05

Arguments:
  • pi_string: proof, an octet string of length k
Returns:
  • beta_string: VRF hash output, an octet string of length hLen

RSA-FDH-VRF verifying algorithm as defined in Section 4.3 of VRF-draft-05

Arguments:
  • public_key: RSA public key
  • alpha_string: VRF hash input, an octet string
  • pi_string: proof to be verified, an octet string of length n
Returns:
  • beta_string: VRF hash output, an octet string of length hLen

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.