From 6261f7e58b764ae48293bee3b1863b518e9f0442 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Aug 2016 13:00:34 -0400 Subject: rename shard -> share This makes it clearer that it's not a chunk of data, but a Shamir share. --- Tunables.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Tunables.hs') diff --git a/Tunables.hs b/Tunables.hs index 2e8d43b..77c3296 100644 --- a/Tunables.hs +++ b/Tunables.hs @@ -33,7 +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 + { shareParams :: ShareParams , objectSize :: Int -- ^ a StorableObject is exactly this many bytes in size -- (must be a multiple of AES block size 16) @@ -43,9 +43,9 @@ data Tunables = Tunables } deriving (Show) --- | Parameters for sharding. The secret is split into +-- | Parameters for shareing. The secret is split into -- N objects, such that only M are needed to reconstruct it. -data ShardParams = ShardParams +data ShareParams = ShareParams { totalObjects :: Int -- ^ N , neededObjects :: Int -- ^ M } @@ -80,7 +80,7 @@ data EncryptionTunable = UseAES256 defaultTunables :: Tunables defaultTunables = Tunables - { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } + { shareParams = ShareParams { 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. @@ -112,7 +112,7 @@ defaultTunables = Tunables -- Not for production use! testModeTunables :: Tunables testModeTunables = Tunables - { shardParams = ShardParams { totalObjects = 3, neededObjects = 2 } + { shareParams = ShareParams { totalObjects = 3, neededObjects = 2 } , objectSize = 1024*64 , nameGenerationTunable = NameGenerationTunable { nameGenerationHash = weakargon2 (CPUCost (Seconds (2*600))) -- cgit v1.2.3