Securely encrypt the master key
Move all key management into vold
Reuse vold's existing key management through the crypto footer
to manage the device wide keys.
Use ro.crypto.type flag to determine crypto type, which prevents
any issues when running in block encrypted mode, as well as speeding
up boot in block or no encryption.
This is one of four changes to enable this functionality:
https://android-review.googlesource.com/#/c/148586/
https://android-review.googlesource.com/#/c/148604/
https://android-review.googlesource.com/#/c/148606/
https://android-review.googlesource.com/#/c/148607/
Bug: 18151196
Change-Id: I3c68691717a61b5e1df76423ca0c02baff0dab98
diff --git a/Ext4Crypt.h b/Ext4Crypt.h
new file mode 100644
index 0000000..301639d
--- /dev/null
+++ b/Ext4Crypt.h
@@ -0,0 +1,16 @@
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+// General functions
+int e4crypt_enable(const char* path);
+int e4crypt_main(int argc, char* argv[]);
+int e4crypt_change_password(const char* path, int crypt_type,
+ const char* password);
+int e4crypt_crypto_complete(const char* path);
+int e4crypt_check_passwd(const char* path, const char* password);
+int e4crypt_get_password_type(const char* path);
+const char* e4crypt_get_password(const char* path);
+int e4crypt_restart(const char* path);
+
+__END_DECLS