Add basic AES-XTS client-side encryption support

This commit is contained in:
Vitaliy Filippov
2026-03-20 21:00:32 +03:00
parent 4c3c43f8ac
commit a2debfca68
20 changed files with 856 additions and 21 deletions
+3
View File
@@ -159,3 +159,6 @@ TEST_NAME=old_csum_4k OLD=1 OSD_ARGS="--data_csum_type crc32c" OFFSET_ARGS=
./test_nfs.sh
./test_nfs_unaligned_append.sh
./test_write_encrypted.sh
SCHEME=ec ./test_write_encrypted.sh
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash -ex
. `dirname $0`/run_3osds.sh
# Basic AES-XTS encryption test
$ETCDCTL put /vitastor/config/inode/1/1 '{"name":"testimg","size":'$((128*1024*1024))',"enc_key":"'$(openssl rand -hex 64)'"}'
$VITASTOR_FIO -bs=1M -direct=1 -iodepth=4 -mirror_file=./testdata/bin/mirror.bin -end_fsync=1 -rw=write -image=testimg
$VITASTOR_FIO -bs=4k -direct=1 -iodepth=16 -serialize_overlap=1 -mirror_file=./testdata/bin/mirror.bin -verify=md5 -end_fsync=1 -rw=randwrite -image=testimg -runtime=10
$VITASTOR_CLI dd iimg=testimg of=./testdata/bin/read.bin
diff ./testdata/bin/read.bin ./testdata/bin/mirror.bin
$VITASTOR_CLI dd iimg=testimg of=./testdata/bin/read.bin bs=4k iodepth=32
diff ./testdata/bin/read.bin ./testdata/bin/mirror.bin
format_green OK