llarp::PrivateKey

PrivateKey is similar to SecretKey except that it only stores the private key value and a hash, unlike SecretKey which stores the seed from which the private key and hash value are generated. More...

#include <types.hpp>

Public Functions

Name
~PrivateKey()
PrivateKey(const AlignedBuffer< SIZE > & key_and_hash)
constexpr const byte_t * signingHash() const
Returns a pointer to the beginning of the 32-byte hash which is used for pseudorandomness when signing with this private key.
constexpr byte_t * signingHash()
Returns a pointer to the beginning of the 32-byte hash which is used for pseudorandomness when signing with this private key.
std::string_view ToString() const
bool toPublic(PubKey & pubkey) const
Computes the public key.

Detailed Description

struct llarp::PrivateKey;

PrivateKey is similar to SecretKey except that it only stores the private key value and a hash, unlike SecretKey which stores the seed from which the private key and hash value are generated.

This is primarily intended for use with derived keys, where we can derive the private key but not the seed.

Public Functions Documentation

function ~PrivateKey

~PrivateKey()

function PrivateKey

explicit PrivateKey(
    const AlignedBuffer< SIZE > & key_and_hash
)

function signingHash

inline constexpr const byte_t * signingHash() const

Returns a pointer to the beginning of the 32-byte hash which is used for pseudorandomness when signing with this private key.

function signingHash

inline constexpr byte_t * signingHash()

Returns a pointer to the beginning of the 32-byte hash which is used for pseudorandomness when signing with this private key.

function ToString

inline std::string_view ToString() const

function toPublic

bool toPublic(
    PubKey & pubkey
) const

Computes the public key.


Updated on 2026-04-01 at 23:35:39 +0000