fix(keys): new passwords have at least 12 characters

The register can't check a password it never sees, and should its
database leak, the verifier and the keys wrapped under the password fall
to guessing at Argon2id's cost (the second reading's M8). Devices now
refuse a new password shorter than 12 characters, counted as code points
once normalised (halkyon_keys' checkNewPassword), at sign-up, a reset
keeping the keys and a change alike, before anything is derived; the new
password's field says so, and the refusal has its own text (en, de).
Signing in takes any length, so a password set before keeps working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-20 21:25:47 +02:00
commit b33b99a50a
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -756,6 +756,16 @@ class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
@override
String get passwordFailed =>
'Couldn\'t reach the instance. Check the connection and try again.';
@override
String passwordMinLength(int count) {
return 'At least $count characters';
}
@override
String passwordTooShort(int count) {
return 'A new password needs at least $count characters: should the instance\'s database ever leak, a short one is guessed first.';
}
}
/// The translations for English, as used in the United Kingdom (`en_GB`).