Implementation of the Asynchronous Ratcheting Tree (ART) data structure and associated protocols, based on the CCS '18 paper On Ends-to-Ends Encryption: Asynchronous Group Messaging with Strong Security Guarantees by Cohn-Gordon, et al.
The module is intended as a library that other projects may use. However, the module includes a set of command-line utilities that exercise the major operations. These utilities are:
genpkey: Generate ephemeral keys (aka setup keys) and identity keys.pkeyutlCreate and verify signatures on files.setup_groupSetup the ART group.process_setup_messageProcess a group setup message as a group member at a given index.update_keyUpdate the leaf key for a member at given position.process_update_messageProcess a key update message as a group member at given index.
Each command-line utility provides detailed usage statement when invoked with
the -h or --help option.
To build the command-line utilities, enter:
make
There is a also a clean target to delete these built utilities:
make clean
-
Start with generating identity and ephemeral keys for the participants
# Generating individually ./genpkey -keytype ek alice ./genpkey -keytype ik alice # Generating in bulk for name in alice bob cici dave; do for type in ik ek; do ./genpkey -keytype $type $name; done; done
Move the certificates to data folder after generation.
mv *.pem cmd/setup_group/data/ -
Initiating Group Setup (initiator here = alice)
./setup_group -initiator alice ./cmd/setup_group/data/4.conf ./cmd/setup_group/data/alice-ik.pem -
For processing the setup message by another participant (participant here = bob, index = 2)
./process_setup_message -out-state bob-state.json 2 ./cmd/setup_group/data/bob-ek.pem ./cmd/setup_group/data/alice-ik-pub.pem 4.conf.dir/setup.msg -
Update Key: Cici updates her key (assuming Cici already has been setup as a member)
./update_key -update-file cici_update_key 3 cici-state.json -
Process Update Message: Bob applies the key update message sent by Cici in Step 4
./process_update_message 2 ./cmd/setup_group/data/bob-ek.pem bob-state.json cici_update_key
The benchmarking branch contains Go benchmarks for the ART implementation.
(The branch includes a few small changes and instrumentation to the code to facilitate
benchmarking.) To run the benchmarks, switch to this branch and enter:
make benchmark