Giter Site home page Giter Site logo

Comments (5)

Bem44 avatar Bem44 commented on August 23, 2024 1

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.

B00jan avatar B00jan commented on August 23, 2024 1

Thank you for your answers and suggestions.

from libsignal-protocol-swift.

B00jan avatar B00jan commented on August 23, 2024

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.

crossle avatar crossle commented on August 23, 2024

Yes, you need store keys to Database or file

from libsignal-protocol-swift.

Bem44 avatar Bem44 commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.