diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-17 17:29:11 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-17 17:29:46 -0400 |
commit | c394b41a2ffb7e987864fa64fd583017c717703b (patch) | |
tree | 9aaaf9467badba9baeed3b634a1155be1ee833a0 /Tunables.hs | |
parent | b66b497244ab2a094bec5c3a678f448f23c8404d (diff) | |
download | keysafe-c394b41a2ffb7e987864fa64fd583017c717703b.tar.gz |
allow configuring N and M
User has to remember they did this and use the same configuration on
restore.
Diffstat (limited to 'Tunables.hs')
-rw-r--r-- | Tunables.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Tunables.hs b/Tunables.hs index f4f74a4..2e8d43b 100644 --- a/Tunables.hs +++ b/Tunables.hs @@ -33,9 +33,7 @@ knownTunings = map (\t -> (nameGenerationHash (nameGenerationTunable t), t)) -- So, every parameter that can be tuned is configured in this data -- structure. data Tunables = Tunables - { shardParams :: [ShardParams] - -- ^ multiple ShardParams may be supported, with the user - -- allowed to choose between them + { shardParams :: ShardParams , objectSize :: Int -- ^ a StorableObject is exactly this many bytes in size -- (must be a multiple of AES block size 16) @@ -82,7 +80,7 @@ data EncryptionTunable = UseAES256 defaultTunables :: Tunables defaultTunables = Tunables - { shardParams = [ShardParams { totalObjects = 3, neededObjects = 2 }] + { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } , objectSize = 1024*64 -- 64 kb -- The nameGenerationHash was benchmarked at 661 seconds CPU time -- on a 2 core Intel(R) Core(TM) i5-4210Y CPU @ 1.50GHz. @@ -114,7 +112,7 @@ defaultTunables = Tunables -- Not for production use! testModeTunables :: Tunables testModeTunables = Tunables - { shardParams = [ShardParams { totalObjects = 3, neededObjects = 2 }] + { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } , objectSize = 1024*64 , nameGenerationTunable = NameGenerationTunable { nameGenerationHash = weakargon2 (CPUCost (Seconds (2*600))) |