diff --git a/res/layout/crypt_keeper_password_field.xml b/res/layout/crypt_keeper_password_field.xml
index 34c7f64fc40..8102658e44a 100644
--- a/res/layout/crypt_keeper_password_field.xml
+++ b/res/layout/crypt_keeper_password_field.xml
@@ -28,6 +28,7 @@
android:inputType="textPassword"
android:textSize="16sp"
android:padding="10sp"
+ android:maxLength="500"
style="@style/TextAppearance.CryptKeeper_PasswordEntry" />
diff --git a/res/layout/crypt_keeper_pin_field.xml b/res/layout/crypt_keeper_pin_field.xml
index 56b4978e4da..a13142efc00 100644
--- a/res/layout/crypt_keeper_pin_field.xml
+++ b/res/layout/crypt_keeper_pin_field.xml
@@ -28,6 +28,7 @@
android:inputType="numberPassword"
android:textSize="28sp"
android:padding="4sp"
+ android:maxLength="500"
style="@style/TextAppearance.CryptKeeper_PasswordEntry" />