Commit caec9ee
refactor: upgrade keystore to AES-256-GCM + Argon2id
- Switch cipher from AES-128-CTR to AES-256-GCM authenticated encryption
- Eliminates separate MAC field; GCM auth tag handles both integrity
and password verification
- Uses full 32-byte derived key (256-bit) instead of 16-byte (128-bit)
- 12-byte GCM nonce + 16-byte auth tag stored in cipherparams
- Add Argon2id as the default KDF (via hash-wasm, WASM-based)
- Defaults: iterations=3, parallelism=4, memorySize=65536 KiB (64 MiB)
- Winner of the Password Hashing Competition, OWASP recommended
- Superior GPU/ASIC resistance compared to scrypt
- Retain scrypt and PBKDF2 as alternative KDFs for compatibility
- Update all 26 tests for new cipher and KDF parameters
Co-authored-by: Greg Nazario <greg@gnazar.io>1 parent a6eb427 commit caec9ee
File tree
5 files changed
+261
-153
lines changed- src/core/crypto
- tests/unit
5 files changed
+261
-153
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments