nuntius

command module
v0.0.0-...-4f7ffea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 10 Imported by: 0

README

Nuntius

This is just an attempt to have fun by implementing a Signal-esque E2E messaging app.

Right now this is just a little CLI application to communicate with another person through an intermediate server. Although communication is E2E encrypted, atm everything is session based, unlike the more asynchronous models supported by other apps like Signal.

Tech

This uses Signal's X3DH exchange protocol to establish a shared secret between two parties, and then uses the Double Ratchet to encrypt further communication in the session.

Unlike Signal, the CLI doesn't support asynchronous messages, instead requiring both parties to be online at the same time, and establishing a new session secret each time they connect.

Usage

Here's an overview of the different commands that exist:

Usage: nuntius <command>

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

Commands:
  generate
    Generate a new identity pair.

  identity
    Fetch the current identity.

  add-friend <name> <pub>
    Add a new friend

  server [<port>]
    Start a server.

  chat <url> <name>
    Chat with a friend.

Run "nuntius <command> --help" for more information on a command.

All the commands take an optional path to a database, in order to save data like keys and friend names, and things like that.

The basic idea is that you generate your key pair with generate. You then share your identity key (which you can check with identity) with people you want to communicate with. You can associate other people's identities with a name through the add-friend command. Finally, you can start a communication session with friends using the chat command. A server is needed to forward messages, and store prekeys, but won't be able to inspect any of your communication. A server can be run with server.

Generate

Usage: nuntius generate

Generate a new identity pair.

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

      --force              Overwrite existing identity

This generates a new key pair, printing out the public identity key. This identity key is then used to establish communication with you later.

Identity

Usage: nuntius identity

Fetch the current identity.

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

This command is useful to see what your public identity key is.

Add Friend

Usage: nuntius add-friend <name> <pub>

Add a new friend

Arguments:
  <name>    The name of the friend
  <pub>     Their public identity key

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

Instead of chatting using just an identity key, instead you first associate an identity key with a name, and use that to identify a user instead.

Chatting

Usage: nuntius chat <url> <name>

Chat with a friend.

Arguments:
  <url>     The URL used to access this server
  <name>    The name of the friend to chat with

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

This is used to start a new communication session with another user. After both ends have established the session, they can send text messages just by typing in the console.

This needs a server to forward messages, and the url for the server (no trailing /).

Server

Usage: nuntius server [<port>]

Start a server.

Arguments:
  [<port>]    The port to use

Flags:
  -h, --help               Show context-sensitive help.
      --database=STRING    Path to local database.

To run a relay server, you can use this command. This will take a port to listen on.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL