Encrypted messaging you can actually understand. Contribute to achempion/tlx development by creating an account on GitHub.

5 points•achempion•6 days ago•7 comments•
This is a reference implementation of encrypted chats for small trusted groups.

It runs SSH server in a container that acts as a mailbox for opaque encrypted blobs (145 lines of code).

SSH keys serve as an identity.

Then a local demon syncs and decrypts these blobs into SQLite database (321 lines of code).

I wanted to make crypto as simple as possible and have only widely used and well audited components.

Relay server and sync demon are implemented in standard Python without any extra dependencies.

I've chosen Python as it ships with SQLite client in standard library. Could have used go/rust, but wanted to keep reference implementation as simple as possible with minimal dependencies.

7 comments

achempion6 days ago
I've prepared a quick demo on how to run relay locally and connect two demo users: https://github.com/achempion/tlx#demo
awfm96 days ago
Nice. I wonder if you could get it shorter with Ruby, or Lisp. And what it would look like with Rust or Go. Should be easy to port I reckon. Maybe I'll give it a try.
achempion6 days ago
Thanks, I considered ruby initially and it's possible for the relay (even bash would work :)).

For the local sync, I needed sqlite and python comes with sqlite client in a standard lib, ruby requires a gem.

I wanted core parts of the infra (relay and sync) to be implemented with zero external language dependencies. I didn't want to have a relay in ruby and sync in python. TUI example uses textual, so everything fits in a single language.

awfm96 days ago
I never thought about standard library versus external dependencies in that way. I wonder why. Do you think there is a relevant difference?
ddaniel106 days ago
Nice. what the use cases and groups of people you see that are going to use it?
achempion6 days ago
I'll share a quote from a readme

> Communicate with people you trust, away from the eyes of modern surveillance and large corporations.

I hope this answers your question.

Read the full thread on Hacker News →

Related stories