CCF
Loading...
Searching...
No Matches
local_sealing.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include "ccf/ds/json.h"
6#include "ccf/entity_id.h"
8#include "ccf/service/map.h"
10#include "shares.h"
11
12#include <cstdint>
13#include <map>
14#include <vector>
15
16namespace ccf
17{
18 using EncryptedSealedSharesMap = std::map<NodeId, EncryptedShare>;
19
21 {
22 // Latest ledger wrapped with the ledger secret wrapping key
23 std::vector<uint8_t> wrapped_latest_ledger_secret;
24
25 // Encrypted ledger secret wrapping keys for each active node
27
28 // Version at which the previous ledger secret was written to the store
29 std::optional<ccf::kv::Version> previous_secret_stored_version =
30 std::nullopt;
31 };
32
35 SealedSharesInfo, wrapped_latest_ledger_secret, encrypted_wrapping_keys);
37 SealedSharesInfo, previous_secret_stored_version);
38
40
41 // Map from NodeId to SealedRecoveryKey for each node that supports local
42 // sealing
44
46
47 namespace Tables
48 {
49 static constexpr auto SEALED_SHARES = "public:ccf.internal.sealed_shares";
50 static constexpr auto SEALING_RECOVERY_NAMES =
51 "public:ccf.internal.sealing_recovery_names";
52 static constexpr auto SEALED_RECOVERY_KEYS =
53 "public:ccf.gov.nodes.sealed_recovery_keys";
54 }
55}
Definition map.h:30
Definition value.h:32
#define DECLARE_JSON_REQUIRED_FIELDS(TYPE,...)
Definition json.h:736
#define DECLARE_JSON_TYPE_WITH_OPTIONAL_FIELDS(TYPE)
Definition json.h:712
#define DECLARE_JSON_OPTIONAL_FIELDS(TYPE,...)
Definition json.h:811
Definition app_interface.h:13
std::map< NodeId, EncryptedShare > EncryptedSealedSharesMap
Definition local_sealing.h:18
Definition local_sealing.h:21
std::vector< uint8_t > wrapped_latest_ledger_secret
Definition local_sealing.h:23
std::optional< ccf::kv::Version > previous_secret_stored_version
Definition local_sealing.h:29
EncryptedSealedSharesMap encrypted_wrapping_keys
Definition local_sealing.h:26