halkyon/packages/halkyon_keys/lib/halkyon_keys.dart
Tizian 「ティツィアーン」 b33b99a50a
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>
2026-10-23 14:12:43 +02:00

32 lines
1.3 KiB
Dart

/// An account's keys on the device (ADR 0017): what the password unlocks
/// (Argon2id, split into SRP's x and the key-encryption key), the account's
/// key pairs and their wrapping, the recovery phrase and its key, data keys
/// sealed to the account, and content sealed and signed in ADR 0002's
/// envelope. libsodium (the `sodium` package, its sumo API for Argon2id)
/// does every primitive; nothing here is ever sent but what is wrapped,
/// sealed or public.
library;
export 'src/account_keys.dart'
show AccountKeys, WrappedAccountKeys, unwrapAccountKeys, wrapAccountKeys;
export 'src/data_keys.dart' show DataKey, openDataKey, sealDataKey;
export 'src/key_refused.dart';
export 'src/password_keys.dart'
show PasswordKdf, PasswordKeys, derivePasswordKeys, newPasswordSalt;
export 'src/password_text.dart'
show
PasswordRefusal,
PasswordRefused,
checkNewPassword,
newPasswordMinLength,
normalizePassword;
export 'src/recovery_phrase.dart'
show
entropyOfRecoveryPhrase,
newRecoveryPhrase,
recoveryEntropyBytes,
recoveryKeyOf,
recoveryPhraseOf,
recoveryProofKeysOf,
recoveryProofPublicKeyOf;
export 'src/sealed_content.dart' show SealedContent, openContent, sealContent;