I encrypt many files per session with the same passphrase (backup tool). Currently every wrap_output call re-runs scrypt with a fresh salt, so the KDF cost (I use work factor 18) is paid per file instead of once per session — this causes timeouts in my streaming pipeline on slower machines.
Would it be possible to expose an API to derive the scrypt key once and reuse it for wrapping multiple file keys, e.g.:
let derived = age::scrypt::Recipient::derive(&passphrase, work_factor)?;
let recipient = derived.recipient(); // cheap, reusable
I encrypt many files per session with the same passphrase (backup tool). Currently every wrap_output call re-runs scrypt with a fresh salt, so the KDF cost (I use work factor 18) is paid per file instead of once per session — this causes timeouts in my streaming pipeline on slower machines.
Would it be possible to expose an API to derive the scrypt key once and reuse it for wrapping multiple file keys, e.g.: