@dfinity/vetkeys - v0.4.0
    Preparing search index...

    VRF (Verifiable Random Function) Output

    VetKD can be used to construct a VRF, which is a public key version of a keyed hash. Like a standard keyed hash, it takes an input string and produces a output string which is indistinguishable from random. The difference between a VRF and a normal keyed hash is that a VRF can only be computed by someone with access to the VRF secret key, while the VRF output can be verified by any party with access to the public key.

    For some general background on VRFs consult RFC 9381

    Index

    Methods

    • Return the input that was used to create this VRF output

      Returns Uint8Array

    • Return the VRF output

      This is a random-looking value which was provably generated by some party with access to the VRF secret key.

      Returns Uint8Array

    • Serialize a VrfOutput to a byte string

      Returns Uint8Array

    • Deserialize and verify a VrfOutput

      Note this verifies the VrfOutput with respect to the derived public key and VRF input which are included in the struct. It is the responsibility of the application to examine the return value of publicKey and input and ensure these values make sense in the context where this VRF is being used.

      Parameters

      • bytes: Uint8Array

      Returns VrfOutput