python-axolotl Double Ratchet and X3DH for Python

Published: 2014
Authors: Tarek Galal

Python implementation for The Double Ratchet Algorithm and The Extended Triple Diffie-Hellman Key Agreement Protocol (X3DH). This is a port based on the original implementation libsignal-protocol-java.

Example:

identityKeyPair = KeyHelper.generateIdentityKeyPair()
registrationId  = KeyHelper.generateRegistrationId()
preKeys = KeyHelper.generatePreKeys(startId, 100)
lastResortKey = KeyHelper.generateLastResortKey()
signedPreKey = KeyHelper.generateSignedPreKey(identityKeyPair, 5)