Comments (5)
You only fetch for the recipient's public keys when you want to build a session, right? To build an session you do the following: https://github.com/christophhagen/libsignal-protocol-swift#building-a-session-with-a-downloaded-pre-key-bundle.
Building the session is internally done by the library. What you need to do in your project is to write the persistent store logic for your store delegate's: https://github.com/christophhagen/libsignal-protocol-swift#client-install-time.
When you did setup everything successfully you only invoke try SessionBuilder(for: address, in: store).process(preKeyBundle: retrievedBundle)
(first link above, second code line).
Your SignalStore
then invokes all necessary store delegate methods in order to store and receive the recipients public keys.
I highly recommend writing unit test's for your store delegate in order to check whether keys are stored and received correctly.
If you need to see things in action I also recommend checking out the source code of the Signal iOS app: https://github.com/signalapp/Signal-iOS
from libsignal-protocol-swift.
Thank you for your answers and suggestions.
from libsignal-protocol-swift.
Fetching only when building a session, that part i understand. So TestStores that are under TestImplementation are not storing key's on safe place, they are just for presentation purpose. I need to add logic in them to store keys some place safe? I thought that that part is covered by lib, and StoreWrappers, and that C is doing that for me.
from libsignal-protocol-swift.
Yes, you need store keys to Database or file
from libsignal-protocol-swift.
It is like @crossle did said. The library does not cover storing keys persistently for you. If you don't know how and where to store the keys have a look at YapDatabase (https://github.com/yapstudios/YapDatabase). Its perfect for that work.
from libsignal-protocol-swift.
Related Issues (10)
- UnsafeMutablePointer MemoryLayout problem HOT 1
- In decrypt I am getting error legacyMessage : Unsupported legacy version HOT 2
- EXC_BAD_ACCESS crash while running in multithreading decryption logic
- Weird issue with encryption + `SignalAddress` HOT 2
- GroupCipherTests
- Xcode 10 Beta 6 Compiling Issue HOT 5
- Universal Framework HOT 1
- GPLv3 License - Open Source?
- Legacy Version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libsignal-protocol-swift.