summaryrefslogtreecommitdiffhomepage
path: root/Types.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-11 16:33:26 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-11 16:33:26 -0400
commitb2719f6e84c0c1f49ac6ab9b60846a899563961c (patch)
tree47c93357b3362e71baf0bf83a21372ae376dfba5 /Types.hs
parent5decbad3eb779b1bbe11245cbde84701909e9c68 (diff)
downloadkeysafe-b2719f6e84c0c1f49ac6ab9b60846a899563961c.tar.gz
inline slightly modified version of secret-sharing
Needed for efficient serialization of shares, unless upstream takes my suggestion to make the finite field be size 256.
Diffstat (limited to 'Types.hs')
-rw-r--r--Types.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Types.hs b/Types.hs
index 085f321..44c38a2 100644
--- a/Types.hs
+++ b/Types.hs
@@ -1,11 +1,15 @@
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances #-}
+{- Copyright 2016 Joey Hess <id@joeyh.name>
+ -
+ - Licensed under the GNU AGPL version 3 or higher.
+ -}
+
module Types where
import Types.Cost
import Entropy
import qualified Data.ByteString as B
-import qualified Data.ByteString.Lazy as BL
import Data.String
-- | keysafe stores secret keys.
@@ -19,7 +23,7 @@ instance Bruteforceable EncryptedSecretKey UnknownPassword where
-- | Objects stored on a keysafe server are (probably) a shard of an
-- encrypted secret key.
-newtype StorableObject = StorableObject { fromStorableObject :: BL.ByteString }
+newtype StorableObject = StorableObject { fromStorableObject :: B.ByteString }
deriving (Show)
-- | An identifier for a StorableObject