#include "ccf/crypto/symmetric_key.h"
#include "ccf/ds/json.h"
#include "ccf/ds/logger.h"
#include "ccf/kv/version.h"
#include "ccf/pal/attestation_sev_snp.h"
#include "ccf/pal/snp_ioctl.h"
#include "ds/ccf_assert.h"
#include "ds/files.h"
#include "node/ledger_secret.h"
#include "node/ledger_secrets.h"
#include <algorithm>
#include <filesystem>
#include <fmt/format.h>
#include <map>
#include <optional>
#include <ranges>
Go to the source code of this file.
|
std::string | ccf::get_sealing_filename (const kv::Version &version) |
|
std::optional< kv::Version > | ccf::version_of_filename (const std::string &path) |
|
crypto::GcmCipher | ccf::aes_gcm_sealing (std::span< const uint8_t > raw_key, std::span< const uint8_t > plaintext, const std::span< uint8_t > &aad) |
|
std::vector< uint8_t > | ccf::aes_gcm_unsealing (std::span< const uint8_t > raw_key, const std::vector< uint8_t > &sealed_text, const std::span< uint8_t > &aad) |
|
| ccf::DECLARE_JSON_TYPE_WITH_OPTIONAL_FIELDS (SealedLedgerSecretAAD) |
|
| ccf::DECLARE_JSON_REQUIRED_FIELDS (SealedLedgerSecretAAD) |
|
| ccf::DECLARE_JSON_TYPE (SealedLedgerSecret) |
|
| ccf::DECLARE_JSON_REQUIRED_FIELDS (SealedLedgerSecret, ciphertext, aad_text) |
|
void | ccf::seal_ledger_secret_to_disk (const std::string &sealed_secret_dir, const ccf::pal::snp::TcbVersionRaw &tcb_version, const kv::Version &version, const LedgerSecretPtr &ledger_secret) |
|
std::optional< LedgerSecretPtr > | ccf::unseal_ledger_secret_from_disk (ccf::kv::Version expected_version, const files::fs::path &ledger_secret_path) |
|
LedgerSecretPtr | ccf::find_and_unseal_ledger_secret_from_disk (const std::string &sealed_secret_dir, kv::Version max_version) |
|