latest.ipv8.keyvault.public.libnaclkey

Module Contents

Classes

LibNaCLPK

A LibNaCL implementation of a public key.

class latest.ipv8.keyvault.public.libnaclkey.LibNaCLPK(binarykey: bytes = b'', pk: bytes | None = None, hex_vk: bytes | None = None)

Bases: latest.ipv8.keyvault.keys.PublicKey

A LibNaCL implementation of a public key.

verify(signature: bytes, msg: bytes) bool

Verify whether a given signature is correct for a message.

Parameters:
  • signature – the given signature

  • msg – the given message

key_to_bin() bytes

Get the string representation of this key.

get_signature_length() int

Returns the length, in bytes, of each signature made using EC.