diff --git a/lib/crypto_backend/crypto_backend.h b/lib/crypto_backend/crypto_backend.h index e316808d..abd99600 100644 --- a/lib/crypto_backend/crypto_backend.h +++ b/lib/crypto_backend/crypto_backend.h @@ -117,6 +117,8 @@ int crypt_storage_decrypt(struct crypt_storage *ctx, uint64_t iv_offset, int crypt_storage_encrypt(struct crypt_storage *ctx, uint64_t iv_offset, uint64_t length, char *buffer); +bool crypt_storage_kernel_only(struct crypt_storage *ctx); + /* Memzero helper (memset on stack can be optimized out) */ static inline void crypt_backend_memzero(void *s, size_t n) { diff --git a/lib/crypto_backend/crypto_storage.c b/lib/crypto_backend/crypto_storage.c index 363d55d1..25a9f56a 100644 --- a/lib/crypto_backend/crypto_storage.c +++ b/lib/crypto_backend/crypto_storage.c @@ -313,3 +313,8 @@ void crypt_storage_destroy(struct crypt_storage *ctx) memset(ctx, 0, sizeof(*ctx)); free(ctx); } + +bool crypt_storage_kernel_only(struct crypt_storage *ctx) +{ + return crypt_cipher_kernel_only(ctx->cipher); +}