-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider device_id when dealing with remote identity keys #15
base: master
Are you sure you want to change the base?
Conversation
As signal protocol suggests, different clients under the same account are distinguished by their device_id, so what should be uniquely stored and queried should be the tuple of (addr_p->name, addr_p->device_id, identity_key), not (addr_p->name, identity_key). Signed-off-by: HardenedVault <root@hardenedvault.net>
Auto variables must be initialized at every time the housing code blocks ({}) are called, even qualified with "const", so if semantic constants are needed, they had better be stored statically, i.e. declared as global "const" or "static const" in blocks. By the way, it is better to initialize those provider structures with global constant templates. Signed-off-by: HardenedVault <root@hardenedvault.net>
Thank you for your contribution! Changing the constants to static to prevent them from being re-initialized all the time sounds like a good idea. I don't understand how it is related to the title of the pull request, though. Is there something I don't see? |
Hey gkdr,
The main purpose of this pull request is to correct the logic associated with device_id, so as its title. The transformation of semantic constant is a secondary purpose.
https://signal.org/docs/specifications/sesame/#device-state
Signal protocol allows "per-user identity keys" and "per-device identity keys" to be one of the two, so axc don 't have to assume "there is only one identity key per account".
By contrast, this means that OMEMO uses "per-device identity keys", so that axc should implement it as a part of an implementation of OMEMO. |
I see. I see the cause of my confusion - when I started working on this (and that was after OMEMO was proposed and implemented), there was no "Sesame" specification (in fact, there weren't any specs and I was digging through their sourcecode). That's probably also the reason OMEMO describes some own ways to deal with (some of) the mentioned failure modes.
You're right! I'll check how it affects my implementation so far and then merge your changes at some point. I'm sorry in advance that this might take a while.and thanks again for your contribution. |
@root-hardenedvault: I see a lot of PRs from you not merged, what is the status of this? |
as you can tell by the last comment, it's on me. it's a good PR with some thought put into it, and i did not have the time to check the implications on the existing code. |
No description provided.