status-go/protocol/common
Andrea Maria Piana 23f71c1125 Fix encryption id && rekey with a single message
This commit changes the format of the encryption id to be based off 3
things:

1) The group id
2) The timestamp
3) The actual key

Previously this was solely based on the timestamp and the group id, but
this might lead to conflicts. Moreover the format of the key was an
uint32 and so it would wrap periodically.

The migration is a bit tricky, so first we cleared the cache of keys,
that's easier than migrating, and second we set the new field hash_id to
the concatenation of group_id / key_id.
This might lead on some duplication in case keys are re-received, but it
should not have an impact on the correctness of the code.

I have added 2 tests covering compatibility between old/new clients, as
this should not be a breaking change.

It also adds a new message to rekey in a single go, instead of having to
send multiple messages
2023-10-24 20:48:54 +01:00
..
chat_entity.go Skip wrapping emojis in private group chats 2021-01-26 09:39:47 +01:00
crypto.go Added device name set on Messenger.Start() 2022-11-25 11:33:58 +00:00
crypto_test.go Added device name set on Messenger.Start() 2022-11-25 11:33:58 +00:00
errors.go Use ErrRecordNotFound instead of sql.ErrNoRows 2020-10-08 13:23:00 +02:00
feature_flags.go feat: desktop mailserver cycle (#2481) 2022-01-12 12:02:01 -04:00
media_server_image_id.go feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
message.go feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
message_linkpreview.go feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
message_sender.go Fix encryption id && rekey with a single message 2023-10-24 20:48:54 +01:00
message_sender_test.go fix: use proper migrations for protocol's test database 2023-10-03 15:11:58 +02:00
message_test.go feature: Unfurl status links (#4033) 2023-10-13 13:25:34 +01:00
pin_message.go Always use protobufs by reference & generate handlers 2023-08-22 12:08:54 +01:00
raw_message.go feat: use protected topics for communities 2023-08-23 13:56:00 -04:00
raw_messages_persistence.go Fix encryption id && rekey with a single message 2023-10-24 20:48:54 +01:00
shard.go optimised finding server cert (#4148) 2023-10-18 14:17:49 +08:00
timesource.go Handle organisation membership requests 2020-12-23 17:20:55 +01:00