Implement secure key via KDF for transparent data encryption/decryption #60
BlockStorage/repertory/pipeline/head This commit looks good
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
@@ -281,6 +281,11 @@ encrypting_reader::encrypting_reader(
|
||||
error_return_(error_return),
|
||||
source_file_(utils::file::file::open_or_create_file(source_path, true)) {
|
||||
common_initialize_kdf_data(cfg, master_key);
|
||||
auto [path_key, path_cfg] = cfg.create_subkey(
|
||||
kdf_context::path, utils::generate_secure_random<std::uint64_t>(),
|
||||
master_key);
|
||||
keys_.second = std::move(path_key);
|
||||
kdf_headers_->second = path_cfg.to_header();
|
||||
common_initialize(true);
|
||||
create_encrypted_paths(file_name, relative_parent_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user