Passwords are normalized with (std unicode normalize), not String.Normalize

Its tables are its own, so every platform gives the same bytes for a
password. String.Normalize follows the ICU of each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Linus Björnstam 2026-11-22 09:57:56 +01:00
parent 2b42abb6d9
commit 7ccda5d917
2 changed files with 8 additions and 4 deletions

View file

@ -84,6 +84,9 @@ default, and the data would not open. Store the cost with the data.
as different code points: ~é~ as one, or as ~e~ and a combining accent. Both
are normalized to Unicode NFC before Argon2id, so they give the same key. It
is NFC and not NFKC, as in RFC 8265: ~fi~ and ~fi~ are different passwords.
The normalization is ~string-nfc~ of ~(std unicode normalize)~, which has
its own tables, so a phone and a desktop give the same bytes. It needs a
Bjolang with that module, which is newer than 0.3.0.
| Cipher | Key | Nonce | Tag |
|---------------------+-----+-------+-----|