A Dart implementation of the cryptography needed for OMEMO 0.8.3.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
PapaTutuWawa 7c3a9a75df chore: Let pub ignore the protobuf build artifacts 7 days ago
example feat: Add getDeviceId and getDeviceBundle 2 months ago
lib feat: Allow getting the device's fingerprint 2 weeks ago
protobuf wip: Add the basics for the Double Ratchet 2 months ago
test fix: Fix replaceOnetimePrekey mutating the device's id 3 weeks ago
.gitignore chore: Commit the protobuf artifacts 3 weeks ago
.gitlint style: Fix linter warnings 2 months ago
.pubignore chore: Let pub ignore the protobuf build artifacts 7 days ago
.woodpecker.yml ci: Fix issue with duplicate naming 1 week ago
CHANGELOG.md release: Version 0.3.1 7 days ago
LICENSE release: Make pub happy 2 months ago
README.md release: Version 0.3.1 7 days ago
analysis_options.yaml wip: Add the basics for the Double Ratchet 2 months ago
flake.lock refactor: Clean up the X3DH implementation 2 months ago
flake.nix wip: Add the basics for the Double Ratchet 2 months ago
pubspec.yaml release: Version 0.3.1 7 days ago

README.md

omemo_dart

omemo_dart is a Dart library to help developers of Dart/Flutter XMPP clients to implement OMEMO in its newest version - currently 0.8.3.

The library provides an implementation of the X3DH key exchange, the Double Ratchet with the OMEMO 0.8.3 specific ENCRYPT, DECRYPT and KDF_* functions and a very high-level OmemoSessionManager that manages all Double Ratchet sessions and provides a clean and simple interface for encrypting a message for all known Ratchet sessions we have with a user.

This library also has no dependency on any XMPP library. omemo_dart instead defines an intermediary format for the required data that you, the user, will need to transform to and from the stanza format of your preferred XMPP library yourself.

Important Notes

  • Please note that this library has not been audited for its security! Use at your own risk!
  • This library is not tested with other implementations of OMEMO 0.8.3 as I do not know of any client implementing spec compliant OMEMO 0.8.3. It does, however, work with itself.

Usage

Include omemo_dart in your pubspec.yaml like this:

# [...]

dependencies:
  omemo_dart:
    hosted: https://git.polynom.me/api/packages/PapaTutuWawa/pub
    version: ^0.3.1
  # [...]

# [...]

Contributing

Due to issues with protobuf, omemo_dart reimplements the Protobuf encoding for the required OMEMO messages. As such, protobuf is only a dependency for testing that the serialisation and deserialisation of the custom implementation. In order to run tests, you need the Protbuf compiler. After that, making sure that the Dart Protobuf compiler addon and the Protobuf compiler itself is in your PATH, run protoc -I=./protobuf/ --dart_out=lib/protobuf/ ./protobuf/schema.proto in the repository's root to generate the real Protobuf bindings.

When submitting a PR, please run the linter using dart analyze and make sure that all tests still pass using dart test.

To ensure uniform commit message formatting, please also use gitlint to lint your commit messages' formatting.

License

Licensed under the MIT license.

See LICENSE.