Wire is a an app for modern, private communications. It offers text, voice, video and sending media, and all user communication on Wire is end-to-end encrypted. It is available for iOS, Android, OS X, Windows, and modern web browsers.
We've released components of the app that take care of encryption and data handling as Open Source.
The privacy page and the privacy and security whitepapers explain the details of the encryption algorithms and protocols used.
The Wire mobile app has an architectural layer that we call sync engine. It is the client-side layer that processes all the data that is displayed in the mobile app. It handles network communication and authentication with the backend, push notifications, local caching of data, client-side business logic, signaling with the audio-video libraries, encryption and decryption (using encryption libraries from a lower level) and other bits and pieces.
The user interface layer of the mobile app is built on top of the sync engine, which provides the data to display to the UI. The sync engine itself is built on top of a few third-party frameworks, and uses Wire components that are shared between platforms for cryptography (Proteus/Cryptobox) and audio-video signaling (AVS).
We are looking into releasing more components in the future. For the moment, we provide source code for encryption (Proteus/Cryptobox) and data handling (Sync Engine and AVS).
ZMessaging-cocoa is the top-most layer of the iOS sync engine, and it is using on a number of lower-level frameworks. ZMessaging-cocoa and the lower-lever frameworks constitute the iOS sync engine, as illustrated in the following picture.
The iOS sync engine is developed in a mix of Objective-C and Swift (and just a handful of classes in Objective-C++). It is a result of a long development process that was started in Objective-C when Swift was not yet available. In the past year, parts of it have been written or rewritten in Swift. Going forward, expect new functionalities to be developed almost exclusively in Swift.
- zmessaging-cocoa: topmost layer that implements client-side business logic, caching, encryption and client-side backend communication protocol
- zmc-utilities: implements common data structures, algorithms (such as symmetric encryption) and application environment detection (internal or public build / production or staging backend)
- zmc-system: covers interaction with ASL (Apple logging), profiling and wrappers of some foundation/cocoa classes
- zmc-transport: abstracts the network communication with the backend: handles authentication of requests, network failures and retries transparently
- zmc-testing: testing utilities
- zmc-protos: precompiled protocol buffer definitions for objective-c / swift and some convenience methods around them
- zmc-mocktransport: simulates the entire network component (including backend behaviour) for testing purposes
- zmc-images: performs rotation and scaling of images
- zmc-cryptobox: higher level convenience wrappers around cryptobox for iOS
- cryptobox-ios: iOS binaries for cryptobox
The Android sync engine is developed in Scala.
- zmessaging-android: Sync engine library for Android, in Scala
- cryptobox-jni: JNI bindings for cryptobox with support for cross-compilation to Android
Wire's web application (called “Wire for Web”) is a web application which runs in modern browsers (Chrome, Edge, Firefox & Opera). It's core is written in CoffeeScript and automatically transpiled into JavaScript. Wire for Windows and Wire for OS X are native applications powered by Electron and embedding (wrapping) Wire's web application.
- cbor-codec.js: JavaScript implementation of CBOR
- cryptobox-bower: Redistributables of Cryptobox
- cryptobox.js: API layer for Proteus
- libsodium.js: JavaScript implementation of Sodium, with convenient wrappers
- proteus.js: Implementation of the Axolotl protocol
- node-addressbook: Node.js module providing access to the OSX address book
cryptobox-bower → cryptobox.js → proteus.js → libsodium.js & cbor-codec.js
The audio, video, and signaling (AVS) library of Wire is developed in ANSI C/C++. The code is cross compiled for Android and iOS. Wrappers for interaction with upstream modules are written in Java for Android and Objective-C for iOS.
- avs: Audio-video library for calling (mostly C), then cross compiled for iOS and Android
The Axolotl protocol implementation and other cryptographic and utility libraries are developed in Rust, then cross-compiled for iOS and Android. The web version has its own port of these libraries in JavaScript.
- proteus: Axolotl Protocol Implementation in Rust, then cross compiled for iOS and Android
- libsodium: A modern and easy-to-use crypto library.
- cryptobox: High-level API with persistent storage for proteus
- cryptobox-haskell: Haskell bindings to cryptobox
- cryptobox-c: C-FFI to cryptobox
- hkdf: HKDF implementation (RFC 5869) in Rust, then cross compiled to iOS and Android
Protocol buffer definitions are used by all clients to communicate with each other and with the backend.
- generic-message-proto: Protocol buffer definitions that are part of the cross-platform client communication protocol
- backend-api-protobuf: Protocol buffer definitions that are part of the backend communication protocol