status-go/services/shhext/chat
Andrea Maria Piana cef7f367ab Add topic negotiation
This commit add topic negotiation to the protocol.

On receiving a message from a client with version >= 1, we will generate
a shared key using Diffie-Hellman. We will record also which
installationID has sent us a message.

This key will be passed back to the above layer, which will then use to
start listening to a whisper topic (the `chat` namespace has no
knowledge of whisper).

When sending a message to a set of InstallationIDs, we check whether we
have agreed on a topic with all of them, and if so, we will send on this
separate topic, otherwise we fallback on discovery.

This change is backward compatible, as long as there is no downgrade of
the app on the other side.

A few changes:

* Factored out the DB in a separate namespace as now it is
being used by multiple services (TopicService and EncryptionService).

* Factored out multidevice management in a separate namespace

* Moved all the test to test the whole protoocl rather than just the encryption service

* Moved all the filter management in status-go
2019-06-19 17:38:45 +02:00
..
crypto update linter 2019-06-12 13:12:00 +02:00
db Add topic negotiation 2019-06-19 17:38:45 +02:00
topic Add topic negotiation 2019-06-19 17:38:45 +02:00
chat.pb.go migrate to go 1.12 and go modules 2019-06-12 13:12:00 +02:00
encryption.go Allow messages to be decrypted from previous bundles (#1400) 2019-02-28 13:09:43 +01:00
encryption.pb.go Add topic negotiation 2019-06-19 17:38:45 +02:00
encryption.proto Add topic negotiation 2019-06-19 17:38:45 +02:00
encryption_multi_device_test.go Add tests for multi-device and refactor encryption service config (#1277) 2018-11-27 09:54:20 +01:00
encryption_test.go Allow messages to be decrypted from previous bundles (#1400) 2019-02-28 13:09:43 +01:00
persistence.go Add tests for multi-device and refactor encryption service config (#1277) 2018-11-27 09:54:20 +01:00
protocol.go Add topic negotiation 2019-06-19 17:38:45 +02:00
protocol_test.go Add topic negotiation 2019-06-19 17:38:45 +02:00
rpc.go Add GetContactCode call, add DH flag (#1367) 2019-02-12 12:07:13 +01:00
sql_lite_persistence.go Add topic negotiation 2019-06-19 17:38:45 +02:00
sql_lite_persistence_keys_storage_test.go Change handling of skipped/deleted keys & add version (#1261) 2018-11-05 20:00:04 +01:00
sql_lite_persistence_test.go Add versioning & tests, migrate db files (#1293) 2018-11-28 12:34:39 +01:00
whisper.go Add topic negotiation 2019-06-19 17:38:45 +02:00
whisper_test.go Add topic negotiation 2019-06-19 17:38:45 +02:00
x3dh.go Add enabling/disabling of installations (#1264) 2018-11-06 09:05:32 +01:00
x3dh_test.go Add enabling/disabling of installations (#1264) 2018-11-06 09:05:32 +01:00