Skip to content

shaljam/libsignal-protocol-javascript-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libsignal-protocol-javascript example

An example on "how to use libsignal-protocol-javascript?"

Components

  • server.js
  • index.html and scripts

How to run

  • Run server with node: node server.js. (It only requires ws I think)
  • Open index.html in browser. Register with a username and send messages to other usernames.

Note that because tabs share localStorage, using multiple tabs from the same browser won't work. Try different browsers or Private/Incognito Windows/Tabs.

What's changed in libsignal-protocol.js

libsignal-protocol.js was sending SignalProtocolAddress.getName() when calling storage.isTrustedidentity(), and it was wrong. Because every username (SignalProtocolAddress.getName()) can have multiple devices, identityKeys should be persistent for every address (username AND deviceId). So calls to storage.isTrustedIdentity() are sending remoteAddress.toString() instead of remoteAddress.getName(). See this also.

I applied the changes to libsignal-protocol.js in a different commit, so it's possible to see what's changed.

Libraries used

I mainly used jsxc-plugin-omemo for the structure and classed (it was in TypeScript and I wasn't comfortable with that, so converted it to js). So the classes are almost doing what they where doing.

About

An example on "how to use libsignal-protocol-javascript?"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published