The page covers two things:

  1. The libcontrac library is an implementation of the crypto portion of the Apple/Google Exposure Notification API (once upn a time referred to as the Contract Tracing API). It uses OpenSSL but has otherwise fairly light dependencies, and so should be compatible across a range of platforms.
  2. The harbour-contrac app is a version of Germany's Corona-Warn-App for Sailfish OS. It builds on the libcontrac code with additional Bluetooth and server upload/download support.


For more info about the library see the library's API documentation and the official draft specs from Apple/Google. There's are also a post on my blog that gives a short and more accessible overview of the specification.

The source code for libcontrac is available under a GPLv2 licence from my home git server, but also mirrored on github.


The harbour-contrac app for is a full unofficial reimplementation of Germany's Corona-Warn-App. The official apps only run on Android and iOS, whereas harbour-contrac has been built to run on Sailfish OS. It's available for use by anyone running Sailfish OS, and although it's only a beta version at this stage it now connects to the official production servers (rather than test servers as it did before).

For more info or to install it on your phone see the app's OpenRepos page.

The source code is available under a GPLv2 licence from github.

Contrac main page
Contrac TeleTAN input page
Contrac cover page


10 most recent items

16 Feb 2021 : Contrac 0.7.7 released #
A new version of Contrac is out, to coincide with the release of Sailfish OS 4.0.1 (since it needed an update for that anyway). This latest version fixes various issues, including the counters getting reset on unclean shutdown of the daemon, and you can also now (finally!) have diagnosis keys automatically download each day. Special note goes to Oskar Roesler, who contributed a bunch of great changes to the code, not least making the entire project more developer-friendly. The code is on github and binaries are on OpenRepos.
31 Jan 2021 : Contrac 0.7.6 released #
The latest version of Contrac is now up on OpenRepos and github. For some reason there was an interruption in the hourly diagnosis key archives being released and users noticed failed downloads. The hourly downloads are now working again, but since the daily archives worked throughout, I've switched the app to using those instead. Another nice improvement is that the download region can also now be chosen, so the Europe-wide keys can be requested instead of those just from Germany.
1 Jan 2021 : Contrac 0.7.5 released #
An updated version of Contrac is now available from OpenRepos (source on github). This latest version improves the diagnosis key matching algorithm. One of the consequences of the change, and the increasing quantity of keys coming from the servers, is that the length of time to process the keys has increased significantly. I've therefore also moved the processing into a background thread so that it doesn't interfere with the sending and receiving of keys while the processing takes place.
9 Oct 2020 : Test CWA-server shutdown #
Today I terminated my test cwa-server AWS instance. That means any old versions of Contrac will start generating errors if they try to download diagnosis keys. Hopefully that'll encourage anyone still on an old version to move over to the latest using the corona-warn-app production servers.
8 Oct 2020 : Contrac 0.7.4 released #
Hot on the heals of 0.7.3 comes Contrac 0.7.4. This continues in the same spirit as the previous version, but fixing restarting of BLE scanning on Xperia X phones.
8 Oct 2020 : Contrac 0.7.3 released #
A small update to Contrac to bring it to version 0.7.3. This will hopefully fix an issue that prevented the daemon from shuting down the BLE scanning properly on Xperia X devices.
4 Oct 2020 : Contrac 0.7.2 released #
This is a really important release of Contrac (the unofficial Sailfish OS version of Germany's Corona-Warn-App), because on this release it will finally start connecting to Germany's official production servers. I'm crossing my fingers (and all sorts of other appendages) in the hope it works as expected. It has new Chinese and German translations thanks to the great efforts of the dashinfantry and spodermenpls; thank you both! It also has a bunch of other changes mostly aimed at making the switch to the official servers. As always it's available on OpenRepos and github.
16 Sep 2020 : Contrac 0.6.2 released #
I've just pushed the latest changes to github and made Contrac 0.6.2 available from OpenRepos. This update adds new Chinese translations and fixes a bug that prevented the update button from being used daily (a borked calculation meant you could only update every two days, or thereabouts).
14 Sep 2020 : Contrac 0.6.1 released #
After a busy weekend of work, Contrac 0.6.1 is now available from OpenRepos and with code on github. The latest improvements include Chinese translations (thanks to the sterling work of dashinfantry) a homescreen cover, attenuation value configuration, and risk configuration downloaded from the Corona-Warn-App servers to ensure the risk evaluations mirror the official app.
6 Sep 2020 : Contrac 0.5.1 released #
The latest version of Contrac now analyses the keys downloaded from the server against thoe collected using Bluetooth and provides an up-to-date risk assessment for the user. This is a pretty big step, because it means the app now has all the pieces needed to perform the full exposure notification cycle (diagnosis upload, key download, exposure analysis). There are still plenty of potential improvements of course, the main one being that it needs to be plugged in to the official severs rather than my test server, but hopefully that'll come soon. In the meantime, get it from OpenRepos and github.


  • Contrac Contrac
    Version 0.7.7 (16 Feb 2021) for SailfishOS.
    A (nearly) full reimplementation of Germany's Corona-Warn-App for Sailfish OS. It supports BLE beacon send/receive, diagnosis key upload/downlaod and exposure checking. More info...
    Download: binary, source, screenshot.
  • libcontrac libcontrac
    Version 0.01 (22 Apr 2020) for libc.
    An implementation of the crypto portion of the Apple/Google Exposure Notification API. It uses OpenSSL but has otherwise fairly light dependencies for use across different platforms. More info...
    Download: source.


Uncover Disqus comments