Open cammellos opened 6 years ago
Hi! Yes, you'll have to persist state between reload, I believe you're on the right track. Currently, the key storage was developed this way for the sake of simplicity and it should be fixed for real production use.
Hi! Thanks for the library, I am integrating https://github.com/status-im/doubleratchet with the status application, I have a few questions and I was hoping you could confirm some doubts.
The application is a mobile app, so it will need persistence on disk. I have implemented keysstorage, but seems like to get it working correctly we need also to persist and reload
state
when a newstruct
is created, otherwise key re-use happens.Essentially when the process is restarted, we have to create a new session, but we don't want
N
andPN
to be set back to0
, as we have already performed some steps in the ratchet.I had a look at the signal implementation and seems like they are also persisting session state
https://github.com/signalapp/libsignal-protocol-java/blob/master/java/src/main/java/org/whispersystems/libsignal/state/SessionRecord.java
.Could you confirm if I am on the right track before I start coding away or I am missing something?
Thank you!