Add basic AES-XTS client-side encryption support

This commit is contained in:
Vitaliy Filippov
2026-04-17 13:53:40 +03:00
parent 1a4d275616
commit 4fe2a0a3eb
20 changed files with 856 additions and 21 deletions
+10
View File
@@ -4,6 +4,7 @@
#pragma once
#include <set>
#include <memory>
#include "json11/json11.hpp"
#include "object_id.h"
@@ -75,6 +76,14 @@ struct pool_config_t
void *reshard_state = NULL;
};
struct inode_enc_t
{
int refs = 0;
std::vector<uint8_t> key;
// FIXME It may also contain snapshot chain and key information
uint32_t bitmap_granularity = 0;
};
struct inode_config_t
{
uint64_t num = 0;
@@ -83,6 +92,7 @@ struct inode_config_t
inode_t parent_id = 0;
bool readonly = false;
bool deleted = false;
std::shared_ptr<inode_enc_t> enc;
// Arbitrary metadata
json11::Json meta;
// Change revision of the metadata in etcd