summaryrefslogtreecommitdiffhomepage
path: root/Tunables.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Tunables.hs')
-rw-r--r--Tunables.hs20
1 files changed, 9 insertions, 11 deletions
diff --git a/Tunables.hs b/Tunables.hs
index 07b4c61..8d95ad5 100644
--- a/Tunables.hs
+++ b/Tunables.hs
@@ -86,21 +86,19 @@ defaultTunables = Tunables
{ shareParams = ShareParams { totalObjects = 3, neededObjects = 2 }
, objectSize = 1024*32 -- 32 kb
, shareOverhead = 2
- -- The nameGenerationHash was benchmarked at 661 seconds CPU time
- -- on a 2 core Intel(R) Core(TM) i5-4210Y CPU @ 1.50GHz.
- -- Since cost is measured per core, we double that.
+ -- The nameGenerationHash was benchmarked at 600 seconds
+ -- on a 2 core Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz.
, nameGenerationTunable = NameGenerationTunable
- { nameGenerationHash = argon2 10000 (CPUCost (Seconds (2*600)))
+ { nameGenerationHash = argon2 10000 (coreCost 2 (Seconds 600))
}
, keyEncryptionKeyTunable = KeyEncryptionKeyTunable
- { keyEncryptionKeyHash = argon2 115 (CPUCost (Seconds 0))
+ { keyEncryptionKeyHash = argon2 2700 (CPUCost (Seconds 12))
, randomSaltBytes = 1
-- The keyEncryptionKeyHash is run 256 times per
-- random salt byte to brute-force, and its parameters
-- were chosen so the total brute forcing time is 50 minutes,
- -- on a 2 core Intel(R) Core(TM) i5-4210Y CPU @ 1.50GHz.
- -- Since cost is measured per core, we double that.
- , randomSaltBytesBruteForceCost = CPUCost (Seconds (2*50*60))
+ -- on a 2 core Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz.
+ , randomSaltBytesBruteForceCost = coreCost 2 (Seconds (50*60))
}
, encryptionTunable = UseAES256
}
@@ -120,12 +118,12 @@ testModeTunables = Tunables
, objectSize = 1024*32
, shareOverhead = 2
, nameGenerationTunable = NameGenerationTunable
- { nameGenerationHash = weakargon2 (CPUCost (Seconds (2*600)))
+ { nameGenerationHash = weakargon2 (coreCost 2 (Seconds 600))
}
, keyEncryptionKeyTunable = KeyEncryptionKeyTunable
- { keyEncryptionKeyHash = weakargon2 (CPUCost (Seconds 0))
+ { keyEncryptionKeyHash = weakargon2 (CPUCost (Seconds 12))
, randomSaltBytes = 1
- , randomSaltBytesBruteForceCost = CPUCost (Seconds (2*50*60))
+ , randomSaltBytesBruteForceCost = coreCost 2 (Seconds (50*60))
}
, encryptionTunable = UseAES256
}