summaryrefslogtreecommitdiffhomepage
path: root/Tunables.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-19 13:00:34 -0400
commit6261f7e58b764ae48293bee3b1863b518e9f0442 (patch)
treed9260d1beeced137e36c1ae1945c499d85e91608 /Tunables.hs
parentd3323ab8e9e39bcb0a6493d33efa265073920a7d (diff)
downloadkeysafe-6261f7e58b764ae48293bee3b1863b518e9f0442.tar.gz
rename shard -> share
This makes it clearer that it's not a chunk of data, but a Shamir share.
Diffstat (limited to 'Tunables.hs')
-rw-r--r--Tunables.hs10
1 files changed, 5 insertions, 5 deletions
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)))