From 22eb53ea8c3bab072867663726840c0a44b72c83 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Fri, 26 Oct 2018 10:44:10 +0200 Subject: [PATCH] shhext: increase max skip keys (#1257) --- services/shhext/chat/encryption.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/shhext/chat/encryption.go b/services/shhext/chat/encryption.go index db9ea99a3..69882956d 100644 --- a/services/shhext/chat/encryption.go +++ b/services/shhext/chat/encryption.go @@ -251,6 +251,9 @@ func (s *EncryptionService) createNewSession(drInfo *RatchetInfo, sk [32]byte, k keyPair, s.persistence.GetSessionStorage(), dr.WithKeysStorage(s.persistence.GetKeysStorage()), + // TODO: Temporarily increase to a high number, until + // we make sure it's a sliding window rather than dropping + dr.WithMaxSkip(10000), dr.WithCrypto(crypto.EthereumCrypto{})) } else { session, err = dr.NewWithRemoteKey( @@ -259,6 +262,9 @@ func (s *EncryptionService) createNewSession(drInfo *RatchetInfo, sk [32]byte, k keyPair.PubKey, s.persistence.GetSessionStorage(), dr.WithKeysStorage(s.persistence.GetKeysStorage()), + // TODO: Temporarily increase to a high number, until + // we make sure it's a sliding window rather than dropping + dr.WithMaxSkip(10000), dr.WithCrypto(crypto.EthereumCrypto{})) } @@ -285,6 +291,9 @@ func (s *EncryptionService) encryptUsingDR(theirIdentityKey *ecdsa.PublicKey, dr drInfo.ID, sessionStorage, dr.WithKeysStorage(s.persistence.GetKeysStorage()), + // TODO: Temporarily increase to a high number, until + // we make sure it's a sliding window rather than dropping + dr.WithMaxSkip(10000), dr.WithCrypto(crypto.EthereumCrypto{}), ) if err != nil { @@ -333,6 +342,9 @@ func (s *EncryptionService) decryptUsingDR(theirIdentityKey *ecdsa.PublicKey, dr drInfo.ID, sessionStorage, dr.WithKeysStorage(s.persistence.GetKeysStorage()), + // TODO: Temporarily increase to a high number, until + // we make sure it's a sliding window rather than dropping + dr.WithMaxSkip(10000), dr.WithCrypto(crypto.EthereumCrypto{}), ) if err != nil {