Sunday, January 27, 2013

Serval Mesh 0.90 RC1 Demo

We hopped outside this week to run some tests on the Serval Mesh 0.90 release candidate to see how it performs outside, particularly Rhizome (including MeshMS) in a multi-hop configuration.  We made the following video of the test.



What impacted me most in this testing, was how generally usable the new release is for general use.  Provided the mesh could make the connection, phone calls were easy, and MeshMS and file sharing just worked.  When coordinating the MeshMS  tests, we used a mesh voice call to arrange things.  Then when coordinating file sharing tests, we used MeshMS.

The photos we transferred in the video are shown below:
The photo I sent to Luke

The photo Luke sent me
This test also uncovered an issue with our multi-hop voice call routing, which need some work to prevent routing loops when there are many phones in a small area (we had six phones together in the basket on Romana's scooter).

Thursday, January 24, 2013

Serval Technology Stack (Part 2) - Rhizome

In a previous post, I began to discuss the Serval Technology stack, and gave a high-level overview of the lowest layers, upto the Serval Overlay Mesh (SOM), and the real-time Mesh Datagram Protocol (MDP), and protocols and services that sit above it.  In this post I want to give an overview of the Rhizome store-and-forward or Delay Tolerant Networking (DTN)  and the protocols and services that depend on it.


Rhizome sits over the Serval Overlay Mesh (SOM) layer, and uses the same public key identity system when required.

Rhizome itself is a bundle-based network protocol, where arbitrarily large bundles of data (often files, or compressed archives of files) are the basic unit of transport.

Each bundle of data is associated with a manifest which contains meta-data about the bundle, such as the name of the bundle, a SHA512 hash of the file so that reception of the file can be verified, and sender and recipient details where that makes sense.

Each manifest also contains a Bundle ID (BID), which is the public key in a CryptoSign key space. The BID is the unique identifier of the bundle. Each manifest is also signed using the private key corresponding to the BID, thus allowing detection and rejection of manifests that have been tampered with by a 3rd party.

It is also envisaged that manifests will later be signed by multiple keys, allowing filtering and grouping of bundles based on attesting authorities.  This will be used as part of an overall system that will allow updating of Serval Mesh software via Rhizome over the Serval Mesh itself.

Where bundles are addressed to a particular party, the sender and recipient SID/ServalIDs (which are public keys of the sender and recipient, as discussed in a previous post on this blog.

This has the advantage that Diffie-Hellman style shared secret calculation can be performed to produce a cipher stream that can be XORed with the data in the bundle, ensuring that it can be encrypted/decrypted only by the intended recipient. The nature of a Diffie-Hellman shared secret calculation means that it can also be encrypted/decrypted by the sender, which provides repudiability, which is a valuable property for use in sensitive environments.

In a similar way, the private key corresponding to the BID can be stored in the manifest, allowing the recipient to update the manifest, e.g., to remove the file, once they have received it.  This allows the bundle to be removed from the network.  This ability to scrub stale content is an important property, because Rhizome is a store-and-forward based protocol, and thus each bundle may end up being replicated on every node in the network.

Rhizome itself provides a very flexible service that can be used to enable a wide variety of applications that depend on the resilient secure replication, and hence transport, of data from one node to another.

For example, MeshMS, which is our SMS-like service on the mesh uses Rhizome to distribute messages, even in the face of acute and chronic partitioning or islanding of the mesh.  We have used this property in the past to send MeshMS from Africa to Australia, without depending on any telecommunications infrastructure.

We have also built, and are planning to build other services on top of Rhizome, such as voice mail (which is really just a variation on MeshMS), Serval Maps, our off-line collaborative mapping and situation awareness application, and of course general file distribution.

You can read more about Rhizome, MeshMS in:

Gardner-Stephen, Paul, Jeremy Lakeman, Romana Challans, Corey Wallis, Ariel Stulman, and Yoram Haddad. "MeshMS: Ad Hoc Data Transfer within Mesh Network." (2012)..

Tuesday, January 22, 2013

Serval Mesh 0.90 Release Candidate 1 is Out

The past year and a half we have put a large amount of effort into rebuilding the Serval Mesh application from the inside out, to include end-to-end encryption, integrated short-messaging and resilient file sharing, all made much, much more useful by a completely overhauled user interface.

Therefore it is with great pleasure that I announce our first release candidate for version 0.90 of the Serval Mesh.

This has only been possible due to the outstanding efforts, including during some difficult times, of our core team (in alphabetic order): Andrew Bettison, Romana Challans, Jeremy Lakeman and Corey Wallis.

To get an idea of the extent of changes, take a look at the release notes and related documents. Changes include:

If you have used version 0.08, you will notice these changes:

  • A completely redesigned human interface.
  • A much smaller APK; faster to download and install.
  • No need for third-party apps like SMSDroid or WebSMS.
The main screen now presents nine buttons:
  • Call to make voice calls
  • Messages to compose and view messages
  • Contacts to discover nearby phones on the Mesh and show your Contact List
  • Maps calls up the Serval Maps interface (if installed)
  • Share files to send files via the Rhizome file-distribution system, list and view received files, see how much storage you are using
  • Share Us to give the Serval Mesh software to other users with compatible Android devices
  • Settings to adjust settings (see below)
  • Switch Off(On) to stop or start Serval Mesh
  • Help for instructions and information
The help system is more detailed and complete:
  • Guide To Interface explains the buttons on the main screen
  • Accounts & Contacts explains how Serval Mesh identifies you and other users to each other
  • Licence is the full text of the software licence
  • Serval Security describes Serval's security features, Android permissions used, and the Privacy Policy
  • About introduces the Serval Project and leads to the Donate button
  • Quick Links contains some useful links for further reading
  • Serval Version is the full text of these release notes
The Settings menu has been overhauled:
  • Wifi Settings lets you examine and change Wi-Fi settings
  • Accounts Management lets you change your Serval Mesh phone number and name
  • View Logs shows a log of recent software activity
  • Redetect Wifi redetects the device's Wi-Fi chipset
There have been enormous changes under the hood:
  • The foundations of the Serval Security Framework are now in place. Elliptic curve cryptography is used for identifying, protecting and authenticating subscribers and mesh network traffic.
  • All Serval-to-Serval traffic (except Rhizome transfers) is now encapsulated in Serval's new, secure Mesh Datagram Protocol, implemented as an overlay network on standard IP over Wi-Fi.
  • The original Java implementation of the Rhizome file sharing system has been superseded by a new implementation in C within the serval-dna component, using SQLite as the local storage engine.
  • Voice calls are now carried over the mesh using Serval's own Voice over Mesh Protocol, which has been designed to replace SIPand RTP. As a result, call quality and latency have improved.
  • MeshMS (Serval's SMS-like service) now uses Rhizome as its transport.
  • Improved stability and responsiveness.
Version 0.90 is still considered experimental software, and there are a number of features and improvements that we intend to implement in releases between versions 0.90 and 1.00.

What we need now is for people to download and test this release candidate, and report any issues they encounter.

For more information, visit the Serval wiki page for this release candidate.

Update: see a video of us using 0.90RC1 here.