Commit graph

3 commits

Author SHA256 Message Date
7ccda5d917 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>
2026-11-22 09:57:56 +01:00
2b42abb6d9 Keys and nonces are types; Argon2id costs are explicit; passwords are NFC
- AeadKey and AeadNonce are opaque types. A key given where a nonce is
  wanted is a type error: for AEGIS-256 both are 32 bytes, and as arrays
  a swap would store the key in clear. Both print as #<AeadKey> and
  #<AeadNonce>.
- A nonce knows its cipher, so aead-encrypt and aead-decrypt take none.
  They and the nonce functions move to (bjosodium raw). (bjosodium core)
  keeps aead-seal and aead-unseal, which make the nonce.
- Every Argon2id function takes an Argon2idCost. There are no defaults:
  a key made with a default that a later version changed would not be
  made again. argon2id-interactive, -moderate and -sensitive are
  libsodium's three costs.
- argon2id-derive-key returns an AeadKey of 32 bytes. #:length is gone.
- Passwords are normalized to Unicode NFC before Argon2id.
- random-bytes. make-aead-key takes no cipher: both keys are 32 bytes.
- (bjosodium impl) holds the code; core and raw are facades of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:13:50 +01:00
911f4bcc46 bjosodium: libsodium's authenticated encryption and Argon2id for Bjolang
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:07:37 +01:00