From 7f0c5e47547bb6fbdc10ed77edcb401f88ca9dec Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Mon, 3 Dec 2018 11:23:19 -0800 Subject: [PATCH] cryptfs: Add Adiantum support Adiantum is a crypto method Android is supporting for devices which don't have AES CPU instructions. See the paper "Adiantum: length-preserving encryption for entry-level processors" (https://eprint.iacr.org/2018/720.pdf) for more details. We add Adiantum to our list of supported crypto types. Bug: 112010205 Test: Tested on a device Change-Id: Ic190a9b90fc8bc077fdc7d60c9d5ae8d8f555025 Merged-In: Ic190a9b90fc8bc077fdc7d60c9d5ae8d8f555025 (cherry picked from commit 18824ec6cc9cd0f16530de2e034a7fe5b8fd17be) --- cryptfs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cryptfs.cpp b/cryptfs.cpp index 5a061bb..6ded404 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -317,6 +317,10 @@ constexpr CryptoType default_crypto_type = CryptoType() constexpr CryptoType supported_crypto_types[] = { default_crypto_type, + CryptoType() + .set_property_name("adiantum") + .set_crypto_name("xchacha12,aes-adiantum-plain64") + .set_keysize(32), // Add new CryptoTypes here. Order is not important. };