diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-11 16:33:26 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-11 16:33:26 -0400 |
commit | b2719f6e84c0c1f49ac6ab9b60846a899563961c (patch) | |
tree | 47c93357b3362e71baf0bf83a21372ae376dfba5 /Types.hs | |
parent | 5decbad3eb779b1bbe11245cbde84701909e9c68 (diff) | |
download | keysafe-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.hs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 |