GithubHelp home page GithubHelp logo

00mjk / libsignal-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from signalapp/libsignal

0.0 0.0 0.0 3.44 MB

Home to the Signal Protocol as well as other cryptographic primitives which make Signal possible.

License: GNU Affero General Public License v3.0

Rust 52.12% Swift 11.53% C 4.10% Ruby 0.17% Shell 0.39% Dockerfile 0.14% Makefile 0.10% Java 22.60% JavaScript 0.35% Python 0.91% TypeScript 7.48% Objective-C 0.10%

libsignal-client's Introduction

Overview

libsignal-client contains platform-agnostic APIs useful for Signal client apps, exposed as a Java, Swift, or TypeScript library. The underlying implementations are written in Rust:

  • libsignal-protocol: Implements the Signal protocol, including the Double Ratchet algorithm. A replacement for libsignal-protocol-java and libsignal-metadata-java.
  • signal-crypto: Cryptographic primitives such as AES-GCM. We use RustCrypto's where we can but sometimes have differing needs.
  • device-transfer: Support logic for Signal's device-to-device transfer feature.
  • hsm-enclave: A wrapper around the Noise protocol used to securely communicate with server-side HSMs.
  • zkgroup: Functionality for zero-knowledge groups and related features available in Signal.
  • poksho: Utilities for implementing zero-knowledge proofs (such as those used by zkgroup); stands for "proof-of-knowledge, stateful-hash-object".

This repository is used by the Signal client apps (Android, iOS, and Desktop). Use outside of Signal is unsupported. In particular, the products of this repository are the Java, Swift, and TypeScript libraries that wrap the underlying Rust implementations. Those underlying implementations are subject to change without notice, as are the JNI, C, and Node add-on "bridge" layers.

Building

To build anything in this repository you must have Rust installed. The build currently uses a specific version of the Rust nightly compiler, which will be downloaded automatically by cargo. To build and test the basic protocol libraries:

$ cargo build
...
$ cargo test
...

Java/Android

To build for Android you must install several additional packages including a JDK, the Android NDK/SDK, and add the Android targets to the Rust compiler, using

rustup target add armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android

as well as the Cargo NDK tool using

cargo install --version=1.0.0 cargo-ndk

To build the Java/Android jar and aar, and run the tests:

$ cd java
$ ./gradlew test
$ ./gradlew build # if you need AAR outputs

Alternately, a build system using Docker is available:

$ cd java
$ make java_test

When exposing new APIs to Java, you will need to run rust/bridge/jni/bin/gen_java_decl.py in addition to rebuilding.

Swift

To learn about the Swift build process see swift/README.md

Node

You'll need Node installed to build. If you have nvm, you can run nvm use to select an appropriate version automatically.

We use yarn as our package manager. The Rust library will automatically be built when you run yarn install.

$ cd node
$ nvm use
$ yarn install
$ yarn tsc
$ yarn test

When testing changes locally, you can use yarn build to do an incremental rebuild of the Rust library.

When exposing new APIs to Node, you will need to run rust/bridge/node/bin/gen_ts_decl.py in addition to rebuilding.

Contributions

Signal does accept external contributions to this project. However unless the change is simple and easily understood, for example fixing a bug or portability issue, adding a new test, or improving performance, first open an issue to discuss your intended change as not all changes can be accepted.

Contributions that will not be used directly by one of Signal's official client apps may still be considered, but only if they do not pose an undue maintenance burden or conflict with the goals of the project.

Signing a CLA (Contributor License Agreement) is required for all contributions.

Legal things

Cryptography Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

License

Copyright 2020-2021 Signal Messenger, LLC.

Licensed under the AGPLv3: https://www.gnu.org/licenses/agpl-3.0.html

libsignal-client's People

Contributors

alan-signal avatar asamk avatar cody-signal avatar cosmicexplorer avatar cryptomilk avatar dennisameling avatar ehrenkret-signal avatar flipsasser avatar gdg-signal avatar gferon avatar gram-signal avatar greyson-signal avatar grishavar avatar imperiopolis avatar jack-signal avatar jim-signal avatar jimio-signal avatar jrose-signal avatar michelle-signal avatar pierwill avatar qhhonx avatar rex4539 avatar rubdos avatar svmhdvn avatar thor314 avatar trevp-signal avatar zabemath avatar

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.