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

possible bug in initializeSenderSession #31

Open
gardenia opened this issue Sep 7, 2016 · 2 comments
Open

possible bug in initializeSenderSession #31

gardenia opened this issue Sep 7, 2016 · 2 comments

Comments

@gardenia
Copy link

gardenia commented Sep 7, 2016

Hi,

I wanted to run past you a possible bug I ran across in ratchet.go when debuggingg a problem I have been having with handshakes. here is a link to the specific line:

https://github.com/janimo/textsecure/blob/master/axolotl/ratchet.go#L196

when I compare against the java (and python) implementations of RatchetingsSession I see the equivalent code in those implementations using the derivedKeys.chainKey (rather than the sendingChain.chainKey):

https://github.com/WhisperSystems/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/ratchet/RatchetingSession.java#L82

here is a patch which changes the behavior as above and which works for me (correctly handles the cases I've been having trouble with).

ratchet_diff.txt

I just wanted to check with you if there was any deliberate reason for deviating from how those other implementations handle it.

Thanks.

@janimo
Copy link
Owner

janimo commented Sep 7, 2016

Thanks, I'll look into this. What problem did you run into exactly?

@gardenia
Copy link
Author

gardenia commented Sep 7, 2016

Thanks. I had a personal project where I was was inter-operatinng with some java code which uses the official java axolotl library but it relied on the KeyExchangeMessage means of session building. I ported across the KeyExchangeMessage handling code to your go stuff but then found that there were cases where it didn't interoperate with the java. I found that it worked fine when in the Bob role but not in the Alice role and then eventually tracked it down to (suspected) the wrong chain having theen persisted in the code I referenced

(in case it helps at all, here is a repo which contains an acceptance testing tool I built to compare the java behavior https://github.com/gardenia/axolotl-sandbox)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants