]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: add data encryptor/decryptor using openssl 37083/head
authorOr Ozeri <oro@il.ibm.com>
Thu, 10 Sep 2020 08:51:56 +0000 (11:51 +0300)
committerOr Ozeri <oro@il.ibm.com>
Sun, 20 Sep 2020 18:23:45 +0000 (21:23 +0300)
commit2f4c769e67b895b2d56a5899e892c8b64893b78e
tree9cfba0e531c1ea19a4125a5e4d1989456d3dd02b
parent576528d08a43dd4d3b9530eeba663a1faaacc733
librbd: add data encryptor/decryptor using openssl

This commit adds the first CryptoInterface implementation
which translates bufferlist encryption to the standard api of crypto libraries,
i.e. using block ciphers operating on C-style arrays.

It defines an abstract DataCryptor interface to allow different crypto libraries implementations.
With this commit, we add an OpenSSL based implementation.
Lastly, we implement a context-pool wrapper implementation to optimize performance.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
17 files changed:
src/librbd/CMakeLists.txt
src/librbd/crypto/BlockCrypto.cc [new file with mode: 0644]
src/librbd/crypto/BlockCrypto.h [new file with mode: 0644]
src/librbd/crypto/CryptoContextPool.cc [new file with mode: 0644]
src/librbd/crypto/CryptoContextPool.h [new file with mode: 0644]
src/librbd/crypto/CryptoInterface.h
src/librbd/crypto/CryptoObjectDispatch.cc
src/librbd/crypto/DataCryptor.h [new file with mode: 0644]
src/librbd/crypto/Types.h [new file with mode: 0644]
src/librbd/crypto/openssl/DataCryptor.cc [new file with mode: 0644]
src/librbd/crypto/openssl/DataCryptor.h [new file with mode: 0644]
src/test/librbd/CMakeLists.txt
src/test/librbd/crypto/openssl/test_DataCryptor.cc [new file with mode: 0644]
src/test/librbd/crypto/test_mock_BlockCrypto.cc [new file with mode: 0644]
src/test/librbd/crypto/test_mock_CryptoContextPool.cc [new file with mode: 0644]
src/test/librbd/mock/crypto/MockCryptoInterface.h
src/test/librbd/mock/crypto/MockDataCryptor.h [new file with mode: 0644]