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

    Class DerivedPublicKey

    VetKD derived public key

    An unencrypted VetKey is a BLS signature generated with a canister-specific key. This type represents such keys.

    Index

    Methods

    • Perform second-stage derivation of a public key

      To create the derived public key in VetKD, a two step derivation is performed. The first step creates a key that is specific to the canister that is making VetKD requests to the management canister, sometimes called canister master key. The second step incorporates the "derivation context" value provided to the vetkd_public_key management canister interface.

      If vetkd_public_key is invoked with an empty derivation context, it simply returns the canister master key. Then the second derivation step can be done offline, using this function. This is useful if you wish to derive multiple keys without having to interact with the IC each time.

      If context is empty, then this simply returns the underlying key. This matches the behavior of vetkd_public_key

      Parameters

      • context: Uint8Array

      Returns DerivedPublicKey

    • Return the bytestring encoding of the derived public key

      Applications would not normally need to call this, unless they are using VetKD for creating a random beacon, in which case these bytes are used by anyone verifying the beacon.

      Returns Uint8Array

    • Read a DerivedPublicKey from the bytestring encoding

      Normally the bytes provided here will have been returned by the vetkd_public_key management canister interface.

      Parameters

      • bytes: Uint8Array

      Returns DerivedPublicKey