From b2719f6e84c0c1f49ac6ab9b60846a899563961c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Aug 2016 16:33:26 -0400 Subject: 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. --- Types.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Types.hs') 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 + - + - 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 -- cgit v1.2.3