diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2019-05-17 23:43:14 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2019-05-20 22:20:13 +0200 |
commit | 75cf4c130cc21afd4d569ce0291c2656de162908 (patch) | |
tree | 88c216d183f59da1ec9a55d773411c4649d5ec43 /src/Main.hs | |
parent | f609499402160aa908e6435b8a61f7cb1f258cfe (diff) |
Encrypted channels negotiated with DH
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs index 40540fe..2a4dc4e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -26,11 +26,13 @@ main = do name <- T.getLine (secret, public) <- generateKeys st + (_secretMsg, publicMsg) <- generateKeys st (devSecret, devPublic) <- generateKeys st + (_devSecretMsg, devPublicMsg) <- generateKeys st - owner <- wrappedStore st =<< sign secret =<< wrappedStore st (emptyIdentity public) { idName = Just name } + owner <- wrappedStore st =<< sign secret =<< wrappedStore st (emptyIdentity public publicMsg) { idName = Just name } base <- signAdd devSecret =<< sign secret =<< - wrappedStore st (emptyIdentity devPublic) { idOwner = Just owner } + wrappedStore st (emptyIdentity devPublic devPublicMsg) { idOwner = Just owner } Right h <- replaceHead base (Left (st, "identity")) return h |