nymChat - Python Messenger

Update #5 03/04/25


Python-Rust FFI for mixnet operations is fully integrated! Now you don’t need to install the nym-client binary and it should be fully cross platform! (haven’t tested on MacOS yet)

All you need is Python 3.11+ and Rust!


Not quite. There is no directory involved in secret chats. When you run the app, you initialize a nym-client which is used for all mixnet operations during that session. When starting a secret chat, client’s exchange nym addresses which allows them to route messages directly p2p instead of through the server.

Normal Chats:
Outer JSON

{
    "message": "<the JSON string below>",
    "recipient": SERVER_ADDRESS,
}

Encapsulated JSON string

{
  "action": "send",
  "content": {
    "sender": "alice",
    "recipient": "bob",
    "body": {
      "iv": "example_iv",
      "ciphertext": "encrypted_data",
      "tag": "example_tag"
    },
    "encrypted": true
  },
  "signature": "abc123signature"
}

Secret Chats:
Outer JSON

{
    "message": "<the JSON string below>",
    "recipient": RECIPIENT_ADDRESS,
}

Encapsulated JSON string

{
  "action": "secretChat",
  "content": {
    "sender": "alice",
    "body": {
      "iv": "example_iv",
      "ciphertext": "encrypted_data",
      "tag": "example_tag"
    },
    "encrypted": true
  },
  "signature": "abc123signature"
}

Group Chats: (not yet implemented)
Outer JSON

{
    "message": "<the JSON string below>",
    "recipient": GROUP_ADDRESS,
}

Encapsulated JSON string

{
  "action": "send",
  "content": {
    "epoch": 3,
    "sender": "alice",
    "ciphertext": "base64-ciphertext",
    "nonce": "base64-nonce",
    "tag": "base64-tag"
  },
  "signature": "abc123signature"
}

Keep me updated! Would love to work with the team on this!

Lots of updates to the nymCHAT repo!

  • Added nymDirectory code (server dir)
  • Dockerfile’s
  • Documentation
3 Likes

Going through nymCHAT/docs/Build.md at rust · code-zm/nymCHAT · GitHub and the docs are a little confusing - I’m not seeing the server/ dir anywhere that are referenced in the documentation

1 Like

The rust branch is incomplete, still working on the rewrite from python → rust. ETA ~1-2 Weeks!

Currently, the only thing in that branch is the TUI prototype:

2 Likes

Funny, I had no idea there even was a branch called rust .

After checking out the diff it’s obvious why it didn’t work for you.

Just checkout main, @max-nym , right @code-zm ?

Rust TUI client is working! Will be adding to it sparingly as I finish up this semester. New Season proposal ETA < 3 weeks!

Anonymous poll regarding the name of the app:

  • nymchat
  • nymstr
0 voters

3 Likes