Files
magpie/internal
forever 00a2356db0 backup: a backup is sealed with the run's salt and key for its passphrase, as shared usage already is, so a sync round no longer derives two 600,000-round PBKDF2 keys (one to seal, one to open what it sealed) (#1158)
Seal drew a fresh salt each time and Open derived its key anew, so every
sync round paid PBKDF2 twice. Under -race that is slow enough that
internal/davsync's tests took 570-866s, past or near go test's default
10-minute timeout. Seal now takes the salt SealData keeps per passphrase,
and both go through the derived-key cache, which also keys on the
iteration count now. The nonce stays random per seal; Open's checks are
unchanged, and TestTampered still catches a lowered iteration count.

Verified: TestSealDerivesOnce fails without the change ("derived 0 keys
for two backups under one passphrase, want 1") and passes with it, also
under -race -count=3. internal/davsync under -race went from 866s to 24s
on an M-series Mac (TestGatewayKeysConflict alone 39s to 2.4s, old code
put back through -overlay), and from 36s to 13s without -race. The
backup, davsync, gui and root packages pass; gofmt and go vet -tags nogui
are clean; darwin, linux and windows build.
2026-10-13 09:47:00 +08:00
..
…
…