Skip to content

Commit

Permalink
shhext: increase max skip keys (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
cammellos authored and divan committed Oct 26, 2018
1 parent bdbceba commit 22eb53e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions services/shhext/chat/encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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{}))
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 22eb53e

Please sign in to comment.