todo/donekeysafehttp://keysafe.branchable.com/todo/done/keysafeikiwiki2017-04-04T17:01:06ZMove the project to notabug.orghttp://keysafe.branchable.com/todo/Move_the_project_to_notabug.org/2017-04-04T17:01:06Z2017-04-03T20:05:39Z
<p>Currently it's difficult to discuss anything publicly, refer to solved issues, get a fresh overview of the project's progress, etc.</p>
<p>So I'd like to propose moving the Keysafe project to <a href="https://notabug.org">https://notabug.org</a>. They're very open, they respect (in fact require) Free Software and they're pretty stable (I'm following them for about 2 years and they're meticulously publicly documenting what is going on) and legally OK.</p>
<p><a href="https://notabug.org">https://notabug.org</a> is running <a href="https://gogs.io">Gogs</a>, which is a SW providing a centralized web interface for a great amount of git projects <a href="https://notabug.org">https://notabug.org</a> can be seen as an alternative GitHub, but with good Terms of Service and not the GitHub's ToS which basically say among other things that "you're fully responsible for anything we do in your country/land/region").</p>
<p>If <a href="https://notabug.org">https://notabug.org</a> won't suit our needs, could find another alternative allowing easy public discussion of enhancements/bugs of Keysafe and a nicely visible progress overview?</p>
<p><span class="selflink">done</span></p>
Fix compiler errors in HEADhttp://keysafe.branchable.com/todo/Fix_compiler_errors_in_HEAD/2017-04-03T19:11:21Z2017-04-01T18:41:35Z
<p>```
From e1fee7bb9dd508b9bef420fd76292f91bb151c8c Mon Sep 17 00:00:00 2001
From: Mitchell Rosen <a href="mailto:mitchellwrosen@gmail.com">mitchellwrosen@gmail.com</a>
Date: Sat, 1 Apr 2017 14:39:41 -0400
Subject: [PATCH 1/1] Fix compiler errors</p>
<hr />
<p> HTTP/ProofOfWork.hs | 8 ++++----
HTTP/Server.hs | 3 ++-
2 files changed, 6 insertions(+), 5 deletions(-)</p>
<p>diff --git a/HTTP/ProofOfWork.hs b/HTTP/ProofOfWork.hs
index 0237347..9a10d39 100644
--- a/HTTP/ProofOfWork.hs
+++ b/HTTP/ProofOfWork.hs
@@ -16,7 +16,7 @@ import ByteStrings
import GHC.Generics
import qualified Data.Text as T
import qualified Data.ByteString as B
-import Data.Text.Encoding (encodeUtf8)
+import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import Raaz.Core.Encode
import qualified Raaz
import Data.BloomFilter.Hash
@@ -55,7 +55,7 @@ instance Hashable RequestID where
hashIO64 = hashIO64 . hashRequestID</p>
<p> hashRequestID :: RequestID -> B.ByteString
-hashRequestID rid = encodeUtf8 (fromRandomSalt (randomSalt rid))
+hashRequestID rid = encodeUtf8 (fromRandomSalt (randomSalt rid))
<> ":" <> encodeUtf8 (requestHMAC rid)</p>
<p> -- | Using Text and not ByteString so that ProofOfWorkRequirement can have a
@@ -80,7 +80,7 @@ maxProofOfWork = Seconds (16*60)
-- on the very first try. On average, the client will need to work for half
-- as long as the returned number of Seconds.
generationTime :: ProofOfWorkRequirement -> Seconds
-generationTime req =
+generationTime req =
let UseArgon2 (CPUCost (Seconds s) _) _ = proofOfWorkHashTunable (addedArgon2Iterations req)
in Seconds ((2<sup>leadingZeros req</sup>) * s)</p>
<p>@@ -109,7 +109,7 @@ mkRequestID secret = mkRequeestID' secret <$> mkRandomSalt
mkRequeestID' :: RequestIDSecret -> RandomSalt -> RequestID
mkRequeestID' (RequestIDSecret key) salt =
let hmac = Raaz.hmacSha256 key (encodeUtf8 $ fromRandomSalt salt)
- in RequestID salt $ T.toByteString (Raaz.encode hmac :: Base16)
+ in RequestID salt $ decodeUtf8 $ Raaz.toByteString (Raaz.encode hmac :: Base16)</p>
<p> validRequestID :: RequestIDSecret -> RequestID -> Bool
validRequestID secret rid =
diff --git a/HTTP/Server.hs b/HTTP/Server.hs
index 61bdbfd..12a8f26 100644
--- a/HTTP/Server.hs
+++ b/HTTP/Server.hs
@@ -18,6 +18,7 @@ import CmdLine (ServerConfig(..))
import Storage.Local
import Serialization ()
import Servant
+import Network.Wai (Application)
import Network.Wai.Handler.Warp
import Control.Monad.IO.Class
import Control.Concurrent
@@ -51,7 +52,7 @@ runServer d cfg = do
_ <- forkIO $ obscurerThread st
runSettings settings (app st)
where
- settings = setHost host $ setPort (serverPort cfg) $ defaultSettings
+ settings = setHost host $ setPort (serverPort cfg) $ defaultSettings
host = fromString (serverAddress cfg)</p>
<h2> serverStorage :: Maybe LocalStorageDirectory -> Storage</h2>
<p>2.12.1
```</p>
<blockquote><p>Thanks for the patch; I applied essentially these fixes although
untangled the unrelated issues. <span class="selflink">done</span> --<span class="createlink"><a href="http://keysafe.branchable.com/ikiwiki.cgi?do=create&from=todo%2FFix_compiler_errors_in_HEAD&page=Joey" rel="nofollow">?</a>Joey</span></p></blockquote>
Update to new version of raaz (0.1.1)http://keysafe.branchable.com/todo/Update_to_new_version_of_raaz___40__0.1.1__41__/2017-03-03T20:20:58Z2017-03-02T03:51:54Z
<p>New version of raaz is released and will hopefully end up in debian expt. soon.
It would be good if we can get keysafe to use the new interface as there is some breakage
but hope fully good ones.</p>
<p>Ref.</p>
<p>https://github.com/raaz-crypto/raaz/issues/278</p>
<blockquote><p><span class="selflink">done</span> --<span class="createlink"><a href="http://keysafe.branchable.com/ikiwiki.cgi?do=create&from=todo%2FUpdate_to_new_version_of_raaz___40__0.1.1__41__&page=Joey" rel="nofollow">?</a>Joey</span></p></blockquote>