From 8cb4c9ff785f361ad6cd70e434b2df13fd714acd 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 --- cryptfs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cryptfs.cpp b/cryptfs.cpp index ae25e9a..2ac20e1 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -316,6 +316,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. };