https://github.com/stef/saxolotl
salty axolotl ratchet
https://github.com/stef/saxolotl
Last synced: 6 months ago
JSON representation
salty axolotl ratchet
- Host: GitHub
- URL: https://github.com/stef/saxolotl
- Owner: stef
- Created: 2014-09-20T15:24:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-09-20T17:13:34.000Z (almost 12 years ago)
- Last Synced: 2025-02-02T02:11:12.464Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 121 KB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
Awesome Lists containing this project
README
salty axolotl implements the Axolotl ratched based on primitives found in DJBs
NaCL-derivate libsodium.
dependencies: SecureString, pysodium
example:
# create 2 peers with long-term keys
peer1 = Peer('peer1')
peer2 = Peer('peer2')
# create an axolotl context with the other peer
ctx1 = AxolotlCTX(peer1)
ctx2 = AxolotlCTX(peer2)
# aspeer() extracts the public parameters to be given to the other peer
# pairs up the context and sets up initial keys
ctx1.init(ctx2.aspeer())
ctx2.init(ctx1.aspeer())
# sending/encrypt
msg = ctx1.send("howdy")
# does it look like plaintext?
print repr(msg)
# receiving/decrypt
print peer1.name, 'sent', ctx2.recv(msg)