Skip to content

Reuse of scrypt derivation possible? #637

Description

@zarniwp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions