48 (1 + 64 + 64 + 1 + 4 + 20 + 32 + 4 + 64 + 1 + 4 +
49 64 + 4 + 64 + 64 + 1),
50 "gpg_recv_key_t layout drift");
101 const uint8_t* sig, uint8_t sig_len,
102 uint32_t sig_created_at,
106 GpgRecvStore() =
default;
107 GpgRecvStore(
const GpgRecvStore&) =
delete;
108 GpgRecvStore& operator=(
const GpgRecvStore&) =
delete;
111 static void deriveKeyName(
const uint8_t fp_v4[20],
char out[16]);
120 bool resolveKeyName(uint8_t index,
char out[16]);
bool addKey(const gpg_recv_key_t &key)
Persist a new key. Replaces an existing entry if the fingerprint matches.
bool deleteKey(uint8_t index)
Remove one key by sorted index. No-op if index is out of range.
bool getKey(uint8_t index, gpg_recv_key_t *out)
Load one key by sorted index (0..count()-1).
static GpgRecvStore & instance()
bool setSignature(uint8_t index, const uint8_t *sig, uint8_t sig_len, uint32_t sig_created_at, uint8_t flags)
Attach a cross-signature, its creation time and flag bits to an entry.
uint8_t listIndex(gpg_recv_index_entry_t *out, uint8_t max)
Build the sorted index (oldest first).
uint8_t count()
Number of stored keys.
static constexpr uint8_t kMaxKeys
Hard ceiling. Past this addKey rejects further inserts.
constexpr uint8_t kGpgRecvFlagVerified
Sort entry used to expose a stable ordered index over NVS keys.
One GPG public key received from another badge.
uint8_t fingerprint_v4[20]
uint8_t owner_self_sig[64]
uint8_t fingerprint_v5[32]
uint8_t dec_binding_sig[64]