Replace rand::random() with rand::rngs::OsRng for cryptographic nonce and salt generation in encryption.rs. rand::random() uses thread-local RNG which may not be a CSPRNG on all platforms; OsRng reads from the OS entropy source, preventing catastrophic IV reuse under AES-GCM. Drift item #1 (security-critical).
8.8 KiB
8.8 KiB