prf::crypto namespace

Classes

class CryptoControlCommands
Control adapter for device identity and trusted-key management.
struct DeviceKeyPair
Device identity key pair used for control-interface signatures.
class DeviceKeyStore
Persistent device key store.
class DeviceRandomSource
Platform device random source backed by HAL entropy implementation.
class Ed25519
Ed25519 helper facade over Monocypher.
class IBootstrapService
Bootstrap-mode state published to crypto control commands.
class IKeyService
Crypto-backed key service used by control interface.
class IRandomSource
Entropy source abstraction used for key generation.
class KeyringStore
Persistent keyring store backed by config filesystem backend.
class KeyService
Default key service implementation used by control interface.
struct TrustedKeyRecord

Enums

enum class KeyFlags: uint32_t { NONE = 0u, TRUSTED = 1u << 0, ADMIN = 1u << 1, NPR_PEER = 1u << 2, ALL = TRUSTED | ADMIN | NPR_PEER }
Bitmask flags attached to one stored public key entry.

Typedefs

using Ed25519PublicKey = std::array<uint8_t, kEd25519PublicKeySize>
using Ed25519SecretKey = std::array<uint8_t, kEd25519SecretKeySize>
using Ed25519Seed = std::array<uint8_t, kEd25519SeedSize>
using Ed25519Signature = std::array<uint8_t, kEd25519SignatureSize>
using KeyId = std::array<uint8_t, kKeyIdSize>

Functions

auto has_flag(const KeyFlags value, const KeyFlags flag) -> bool constexpr
auto operator&(const KeyFlags lhs, const KeyFlags rhs) -> KeyFlags constexpr
auto operator&=(KeyFlags& lhs, const KeyFlags rhs) -> KeyFlags& constexpr
auto operator|(const KeyFlags lhs, const KeyFlags rhs) -> KeyFlags constexpr
auto operator|=(KeyFlags& lhs, const KeyFlags rhs) -> KeyFlags& constexpr
auto operator~(const KeyFlags value) -> KeyFlags constexpr

Variables

size_t kEd25519PublicKeySize constexpr
Ed25519 public key size in bytes.
size_t kEd25519SecretKeySize constexpr
Ed25519 expanded secret key size in bytes.
size_t kEd25519SeedSize constexpr
Ed25519 seed size in bytes.
size_t kEd25519SignatureSize constexpr
Ed25519 detached signature size in bytes.
size_t kKeyIdSize constexpr
BLAKE2b-128 key fingerprint size in bytes.

Enum documentation

enum class prf::crypto::KeyFlags: uint32_t

Bitmask flags attached to one stored public key entry.

Typedef documentation

using prf::crypto::Ed25519PublicKey = std::array<uint8_t, kEd25519PublicKeySize>

using prf::crypto::Ed25519SecretKey = std::array<uint8_t, kEd25519SecretKeySize>

using prf::crypto::Ed25519Seed = std::array<uint8_t, kEd25519SeedSize>

using prf::crypto::Ed25519Signature = std::array<uint8_t, kEd25519SignatureSize>

using prf::crypto::KeyId = std::array<uint8_t, kKeyIdSize>

Function documentation

bool prf::crypto::has_flag(const KeyFlags value, const KeyFlags flag) constexpr

KeyFlags prf::crypto::operator&(const KeyFlags lhs, const KeyFlags rhs) constexpr

KeyFlags& prf::crypto::operator&=(KeyFlags& lhs, const KeyFlags rhs) constexpr

KeyFlags prf::crypto::operator|(const KeyFlags lhs, const KeyFlags rhs) constexpr

KeyFlags& prf::crypto::operator|=(KeyFlags& lhs, const KeyFlags rhs) constexpr

KeyFlags prf::crypto::operator~(const KeyFlags value) constexpr

Variable documentation

size_t prf::crypto::kEd25519PublicKeySize constexpr

Ed25519 public key size in bytes.

size_t prf::crypto::kEd25519SecretKeySize constexpr

Ed25519 expanded secret key size in bytes.

size_t prf::crypto::kEd25519SeedSize constexpr

Ed25519 seed size in bytes.

size_t prf::crypto::kEd25519SignatureSize constexpr

Ed25519 detached signature size in bytes.

size_t prf::crypto::kKeyIdSize constexpr

BLAKE2b-128 key fingerprint size in bytes.