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)
diff --git a/cryptfs.cpp b/cryptfs.cpp
index 5a061bb..6ded404 100644
--- a/cryptfs.cpp
+++ b/cryptfs.cpp
@@ -317,6 +317,10 @@
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.
};