cacophony 0.9.1 → 0.9.2
raw patch · 10 files changed
+31/−15 lines, 10 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ Crypto.Noise.Cipher: cipherSymToBytes :: Cipher c => SymmetricKey c -> ScrubbedBytes
- Crypto.Noise: hoLocalEphemeral :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (KeyPair d_atxd))
+ Crypto.Noise: hoLocalEphemeral :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (KeyPair d_atiC))
- Crypto.Noise: hoLocalSemiEphemeral :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (KeyPair d_atxd))
+ Crypto.Noise: hoLocalSemiEphemeral :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (KeyPair d_atiC))
- Crypto.Noise: hoLocalStatic :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (KeyPair d_atxd))
+ Crypto.Noise: hoLocalStatic :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (KeyPair d_atiC))
- Crypto.Noise: hoPattern :: forall d_atxd. Lens' (HandshakeOpts d_atxd) HandshakePattern
+ Crypto.Noise: hoPattern :: forall d_atiC. Lens' (HandshakeOpts d_atiC) HandshakePattern
- Crypto.Noise: hoPreSharedKey :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe Plaintext)
+ Crypto.Noise: hoPreSharedKey :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe Plaintext)
- Crypto.Noise: hoPrologue :: forall d_atxd. Lens' (HandshakeOpts d_atxd) Plaintext
+ Crypto.Noise: hoPrologue :: forall d_atiC. Lens' (HandshakeOpts d_atiC) Plaintext
- Crypto.Noise: hoRemoteEphemeral :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (PublicKey d_atxd))
+ Crypto.Noise: hoRemoteEphemeral :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (PublicKey d_atiC))
- Crypto.Noise: hoRemoteSemiEphemeral :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (PublicKey d_atxd))
+ Crypto.Noise: hoRemoteSemiEphemeral :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (PublicKey d_atiC))
- Crypto.Noise: hoRemoteStatic :: forall d_atxd. Lens' (HandshakeOpts d_atxd) (Maybe (PublicKey d_atxd))
+ Crypto.Noise: hoRemoteStatic :: forall d_atiC. Lens' (HandshakeOpts d_atiC) (Maybe (PublicKey d_atiC))
- Crypto.Noise: hoRole :: forall d_atxd. Lens' (HandshakeOpts d_atxd) HandshakeRole
+ Crypto.Noise: hoRole :: forall d_atiC. Lens' (HandshakeOpts d_atiC) HandshakeRole
Files
- benchmarks/bench.hs +1/−1
- cacophony.cabal +2/−2
- changelog.md +4/−0
- src/Crypto/Noise/Cipher.hs +3/−0
- src/Crypto/Noise/Cipher/AESGCM.hs +5/−0
- src/Crypto/Noise/Cipher/ChaChaPoly1305.hs +4/−0
- src/Crypto/Noise/Hash/BLAKE2b.hs +3/−3
- src/Crypto/Noise/Hash/BLAKE2s.hs +3/−3
- src/Crypto/Noise/Hash/SHA256.hs +3/−3
- src/Crypto/Noise/Hash/SHA512.hs +3/−3
benchmarks/bench.hs view
@@ -133,7 +133,7 @@ , (NoiseK, 1) , (NoiseX, 1) ]- psks = [Nothing, Just ""]+ psks = [Nothing, Just "This is my Austrian perspective!"] ciphers = [WrapCipherType CTChaChaPoly1305, WrapCipherType CTAESGCM] dhs = [WrapDHType DTCurve25519, WrapDHType DTCurve448] hashes = [WrapHashType HTSHA256, WrapHashType HTSHA512, WrapHashType HTBLAKE2s, WrapHashType HTBLAKE2b]
cacophony.cabal view
@@ -1,5 +1,5 @@ name: cacophony-version: 0.9.1+version: 0.9.2 synopsis: A library implementing the Noise protocol. license: PublicDomain license-file: LICENSE@@ -10,7 +10,7 @@ category: Cryptography build-type: Simple cabal-version: >=1.10-tested-with: GHC == 7.10.3, GHC == 8.0.1+tested-with: GHC == 7.10.3, GHC == 8.0.2 description: This library implements the <https://github.com/trevp/noise/blob/master/noise.md Noise> protocol.
changelog.md view
@@ -1,3 +1,7 @@+# 0.9.2++* Added ability to export raw symmetric keys+ # 0.9.1 * Enabled llvm flag support on executables
src/Crypto/Noise/Cipher.hs view
@@ -56,6 +56,9 @@ -- is truncated. cipherBytesToSym :: ScrubbedBytes -> SymmetricKey c + -- | Exports a symmetric key. Use with care.+ cipherSymToBytes :: SymmetricKey c -> ScrubbedBytes+ -- | Exports a Ciphertext. The authentication tag follows the -- actual ciphertext. cipherTextToBytes :: Ciphertext c -> ScrubbedBytes
src/Crypto/Noise/Cipher/AESGCM.hs view
@@ -38,6 +38,7 @@ cipherZeroNonce = zeroNonce cipherIncNonce = incNonce cipherBytesToSym = bytesToSym+ cipherSymToBytes = symToBytes cipherTextToBytes = ctToBytes cipherBytesToText = bytesToCt @@ -73,6 +74,10 @@ bytesToSym :: ScrubbedBytes -> SymmetricKey AESGCM bytesToSym = SKAES . B.take 32++symToBytes :: SymmetricKey AESGCM+ -> ScrubbedBytes+symToBytes (SKAES sk) = sk ctToBytes :: Ciphertext AESGCM -> ScrubbedBytes
src/Crypto/Noise/Cipher/ChaChaPoly1305.hs view
@@ -34,6 +34,7 @@ cipherZeroNonce = zeroNonce cipherIncNonce = incNonce cipherBytesToSym = bytesToSym+ cipherSymToBytes = symToBytes cipherTextToBytes = ctToBytes cipherBytesToText = bytesToCt @@ -76,6 +77,9 @@ bytesToSym :: ScrubbedBytes -> SymmetricKey ChaChaPoly1305 bytesToSym = SKCCP1305 . take 32++symToBytes :: SymmetricKey ChaChaPoly1305 -> ScrubbedBytes+symToBytes (SKCCP1305 sk) = sk ctToBytes :: Ciphertext ChaChaPoly1305 -> ScrubbedBytes ctToBytes (CTCCP1305 (ct, a)) = ct `mappend` convert a
src/Crypto/Noise/Hash/BLAKE2b.hs view
@@ -46,11 +46,11 @@ x02 = "\x02" hmac1 = M.hmac ck d :: M.HMAC H.Blake2b_512- temp = convert . M.hmacGetDigest $ hmac1 :: ScrubbedBytes+ temp = convert hmac1 :: ScrubbedBytes hmac2 = M.hmac temp x01 :: M.HMAC H.Blake2b_512 hmac3 = M.hmac temp (convert hmac2 `mappend` x02) :: M.HMAC H.Blake2b_512- ck' = convert . M.hmacGetDigest $ hmac2- sk = convert . M.hmacGetDigest $ hmac3+ ck' = convert hmac2+ sk = convert hmac3 bytesToCKB :: ScrubbedBytes -> ChainingKey BLAKE2b
src/Crypto/Noise/Hash/BLAKE2s.hs view
@@ -46,11 +46,11 @@ x02 = "\x02" hmac1 = M.hmac ck d :: M.HMAC H.Blake2s_256- temp = convert . M.hmacGetDigest $ hmac1 :: ScrubbedBytes+ temp = convert hmac1 :: ScrubbedBytes hmac2 = M.hmac temp x01 :: M.HMAC H.Blake2s_256 hmac3 = M.hmac temp (convert hmac2 `mappend` x02) :: M.HMAC H.Blake2s_256- ck' = convert . M.hmacGetDigest $ hmac2- sk = convert . M.hmacGetDigest $ hmac3+ ck' = convert hmac2+ sk = convert hmac3 bytesToCKS :: ScrubbedBytes -> ChainingKey BLAKE2s
src/Crypto/Noise/Hash/SHA256.hs view
@@ -43,11 +43,11 @@ x02 = "\x02" hmac1 = M.hmac ck d :: M.HMAC H.SHA256- temp = convert . M.hmacGetDigest $ hmac1 :: ScrubbedBytes+ temp = convert hmac1 :: ScrubbedBytes hmac2 = M.hmac temp x01 :: M.HMAC H.SHA256 hmac3 = M.hmac temp (convert hmac2 `mappend` x02) :: M.HMAC H.SHA256- ck' = convert . M.hmacGetDigest $ hmac2- sk = convert . M.hmacGetDigest $ hmac3+ ck' = convert hmac2+ sk = convert hmac3 bytesToCK :: ScrubbedBytes -> ChainingKey SHA256 bytesToCK = HCKSHA256
src/Crypto/Noise/Hash/SHA512.hs view
@@ -43,11 +43,11 @@ x02 = "\x02" hmac1 = M.hmac ck d :: M.HMAC H.SHA512- temp = convert . M.hmacGetDigest $ hmac1 :: ScrubbedBytes+ temp = convert hmac1 :: ScrubbedBytes hmac2 = M.hmac temp x01 :: M.HMAC H.SHA512 hmac3 = M.hmac temp (convert hmac2 `mappend` x02) :: M.HMAC H.SHA512- ck' = convert . M.hmacGetDigest $ hmac2- sk = convert . M.hmacGetDigest $ hmac3+ ck' = convert hmac2+ sk = convert hmac3 bytesToCK :: ScrubbedBytes -> ChainingKey SHA512 bytesToCK = HCKSHA512