Skip to content
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

Implement session rekeying #238

Open
ovalseven8 opened this issue Nov 5, 2016 · 3 comments
Open

Implement session rekeying #238

ovalseven8 opened this issue Nov 5, 2016 · 3 comments
Labels
crypto Crypto enhancement New feature for the user, not a new feature for build script P3 Low priority security Security
Milestone

Comments

@ovalseven8
Copy link

Link to the complete history of the issue: irungentoo#1254

Most important/informative quotes:

@irungentoo wrote:

Do you create a random public/private keypair per session, or do you directly create per session symmetric keys?

The answer is both. It creates a session keypair with NaCl and sends it to the other peer, the other peer then uses that public key and their session secret key to generate a shared key used for symmetric encryption. (You do the same thing with their session public key and your session secret key and get the same key). That key is then used to encrypt everything sent via the connection.

Please rekey after a given time! Let's say after 2 hours or 500 text messages or 10MB of transferred data, depending on which happens first.

Yes, that's planned. How does rekeying every 2^16 packets sound? Personally I think that rekeying isn't that needed because if someone gets access to your machines ram while you are running Tox they can get all your messages from the message log of whatever client you are running. If someone has enough access to your system to obtain the session key then they don't even need it to know what you were doing with Tox.

But since it's not hard to implement and doesn't have any drawbacks I have no issues with implementing it.

@codedust wrote:

The point is to make it even more difficult for an attacker (with a lot of computing power) who has no access to your machine to decrypt your whole communication during one session. Note that sessions can get quite long on mobile devices.

Anyone interested in this may read these two blog post from OWS explaining how (and why) they designed the protocol behind Textsecure:
https://whispersystems.org/blog/asynchronous-security/
https://whispersystems.org/blog/advanced-ratcheting/

@ovalseven8 ovalseven8 added the enhancement New feature for the user, not a new feature for build script label Nov 5, 2016
@iphydf iphydf modified the milestone: v0.3.0 Nov 5, 2016
@SkyzohKey
Copy link

This is related to #210, we currently would need a threat model before thinking about fixing issues that may never happens.

ie. Let's assume that user computer is safe (you can't do anything against that) but bootstrap nodes can be compromized, or an attacker (Eve) can steal your friend's tox save file and impersonate it. This should be made impossible by using Forward secrecy, Ratchets systems and Future secrecy.

The main idea is to not encrypt everything with the same key, but with derrivated keys, to ensure that if a key is compromized it won't affect the entire past conversation nor the one that could takes place.

@SkyzohKey SkyzohKey added the security Security label Nov 6, 2016
@GrayHatter
Copy link

ie. Let's assume that user computer is safe (you can't do anything against that) but bootstrap nodes can be compromized, or an attacker (Eve) can steal your friend's tox save file and impersonate it. This should be made impossible by using Forward secrecy, Ratchets systems and Future secrecy.

If someone steals your keyfile, there's nothing toxcore can do about that. A ratchet system won't protect you from that.

The main idea is to not encrypt everything with the same key, but with derrivated keys, to ensure that if a key is compromized it won't affect the entire past conversation nor the one that could takes place.

This is already true in core.

@codedust
Copy link

codedust commented Nov 7, 2016

We don't have to think about possible solutions here. The Signal Protocol does already exist and provides strong security guarantees. Implementing the Signal Protocol should be the way to go.

@SkyzohKey SkyzohKey added the crypto Crypto label Nov 9, 2016
@iphydf iphydf modified the milestone: v0.3.0 Jan 10, 2017
@iphydf iphydf added the P3 Low priority label Jan 12, 2017
@iphydf iphydf added this to the v0.2.x milestone Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Crypto enhancement New feature for the user, not a new feature for build script P3 Low priority security Security
Projects
None yet
Development

No branches or pull requests

5 participants