perf: share links use scrypt 2^15, about 40 ms each way
Keys keeping to share.keyRules are random and long, so age's 2^18 (a third of a second to share and to open) bought little. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -51,10 +51,12 @@ const (
|
||||
maxFiles = 1 << 20
|
||||
)
|
||||
|
||||
// workFactor is age's scrypt work factor for sealing (its default);
|
||||
// maxWorkFactor is the most opening accepts, so a link can't make it
|
||||
// work for minutes.
|
||||
var workFactor, maxWorkFactor = 18, 20
|
||||
// workFactor is the scrypt work factor for sealing: 2^15, about 40 ms
|
||||
// each way, instead of age's 2^18 (a third of a second). scrypt makes
|
||||
// guessing a weak passphrase slow; a key keeping to the rules is random
|
||||
// and long enough not to need that. maxWorkFactor is the most opening
|
||||
// accepts, so a link can't make it work for minutes.
|
||||
var workFactor, maxWorkFactor = 15, 20
|
||||
|
||||
// File is a shared file.
|
||||
type File struct {
|
||||
|
||||
Reference in new issue
Block a user