File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/Simplex/Messaging/Crypto Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ In pseudo-code:
250250```
251251// session 1
252252hostHelloSecret(1) = dhSecret(1)
253- sessionSecret(1) = sha3-256 (dhSecret(1) || kemSecret(1)) // to encrypt session 1 data, incl. controller hello
253+ sessionSecret(1) = sha256 (dhSecret(1) || kemSecret(1)) // to encrypt session 1 data, incl. controller hello
254254dhSecret(1) = dh(hostHelloDhKey(1), controllerInvitationDhKey(1))
255255kemCiphertext(1) = enc(kemSecret(1), kemEncKey(1))
256256// kemEncKey is included in host HELLO, kemCiphertext - in controller HELLO
@@ -262,7 +262,7 @@ dhSecret(n') = dh(hostHelloDhKey(n - 1), controllerDhKey(n))
262262
263263// session n
264264hostHelloSecret(n) = dhSecret(n)
265- sessionSecret(n) = sha3-256 (dhSecret(n) || kemSecret(n)) // to encrypt session n data, incl. controller hello
265+ sessionSecret(n) = sha256 (dhSecret(n) || kemSecret(n)) // to encrypt session n data, incl. controller hello
266266dhSecret(n) = dh(hostHelloDhKey(n), controllerDhKey(n))
267267// controllerDhKey(n) is either from invitation or from multicast announcement
268268kemCiphertext(n) = enc(kemSecret(n), kemEncKey(n))
Original file line number Diff line number Diff line change 44
55module Simplex.Messaging.Crypto.SNTRUP761 where
66
7- import Crypto.Hash (Digest , SHA3_256 , hash )
7+ import Crypto.Hash (Digest , SHA256 , hash )
88import Data.ByteArray (ScrubbedBytes )
99import qualified Data.ByteArray as BA
1010import Data.ByteString (ByteString )
@@ -28,4 +28,4 @@ kcbEncrypt (KEMHybridSecret k) = sbEncrypt_ k
2828kemHybridSecret :: PublicKeyX25519 -> PrivateKeyX25519 -> KEMSharedKey -> KEMHybridSecret
2929kemHybridSecret k pk (KEMSharedKey kem) =
3030 let DhSecretX25519 dh = C. dh' k pk
31- in KEMHybridSecret $ BA. convert (hash $ BA. convert dh <> kem :: Digest SHA3_256 )
31+ in KEMHybridSecret $ BA. convert (hash $ BA. convert dh <> kem :: Digest SHA256 )
You can’t perform that action at this time.
0 commit comments