https://github.com/innovativeinventor/noise-cli
Thin CLI wrapper over the Noise protocol. Can be used to quickly establish secure E2E conversations over arbitrary medium (e.g. SMS, Discord, etc.) in adversarial environments.
https://github.com/innovativeinventor/noise-cli
Last synced: about 2 months ago
JSON representation
Thin CLI wrapper over the Noise protocol. Can be used to quickly establish secure E2E conversations over arbitrary medium (e.g. SMS, Discord, etc.) in adversarial environments.
- Host: GitHub
- URL: https://github.com/innovativeinventor/noise-cli
- Owner: InnovativeInventor
- License: unlicense
- Created: 2021-11-29T01:23:51.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-30T03:31:42.000Z (over 4 years ago)
- Last Synced: 2025-02-26T14:45:23.981Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## noise-cli
This is a dead-simple, secure wrapper around the Noise protocol for secure E2E communication.
If you don't believe me, read the code (it's very short at 48 lines of code!).
```
❯ wc -l *.py
23 initiator.py
25 responder.py
48 total
```
`noise-cli` supports emojis and most unicode (excluding certain whitespace characters, such as `\n`).
## Usage
To initiate a message, just run: ```python initiator.py```
If you're recieving a message, run: ```python responder.py```
Follow the prompts to establish a secure channel over mediums like SMS and Discord.
To install, run
```
pip install -r requirements.txt
```
or
```
poetry shell
```
## Example usage
Suppose you have the following conversation with someone:
```
me: scandalous secret message
other: wow we should keep this convo secret
me: haha yeah thank god we're using noise-cli
other: yep
```
With `noise-cli`, the conversation would look like (from the initiator's perspective):
```
❯ python initiator.py
Handshake (send this): NuNLd17tzFRj/ugNq/m4YejELXW70PdjCqjOMPCvb24=
Handshake response (enter here): H5mqb3KCYSs3cjmaIuXmhsS0vEi+vls10XtB8m50b0z9i3Byb7/d7GmCB/ooyI9j
Secure channel established!
Message to encrypt (enter here): scandalous secret message
Encrypted message (send this): TGPg++DVNIYyaeY/WJtNyYYBOim3WbQeIFAwxi2bXblkmONdux/5F+s=
Response to decrypt: 0XzOnaGPcHtXacEtBM3Boytd6h/y14/Qq+L76qDFMVn2SJIsdY8hg7AyOPHx5mtwxsSdLg==
Received message: wow we should keep this convo secret
Message to encrypt (enter here): haha yeah thank god we're using noise-cli
Encrypted message (send this): mmn6+ZuUoOeG0AizDH7/FX2QlMGrl0xmt8IxnDWpDahZSBibrrXXHIY/TX0VXZN2Qk/hyTcYRcz7
Response to decrypt: GvI8fdLTVq89f7oIqUk1sh9dlw==
Received message: yep
```
From the responder's perspective, the conversation would look like:
```
❯ python responder.py
Received handshake (enter here): NuNLd17tzFRj/ugNq/m4YejELXW70PdjCqjOMPCvb24=
Handshake response (send this): H5mqb3KCYSs3cjmaIuXmhsS0vEi+vls10XtB8m50b0z9i3Byb7/d7GmCB/ooyI9j
Secure channel established (once you send the handshake response)!
Message to decrypt (enter here): TGPg++DVNIYyaeY/WJtNyYYBOim3WbQeIFAwxi2bXblkmONdux/5F+s=
Received message: scandalous secret message
Response to encrypt: wow we should keep this convo secret
Encrypted message (send this): 0XzOnaGPcHtXacEtBM3Boytd6h/y14/Qq+L76qDFMVn2SJIsdY8hg7AyOPHx5mtwxsSdLg==
Message to decrypt (enter here): mmn6+ZuUoOeG0AizDH7/FX2QlMGrl0xmt8IxnDWpDahZSBibrrXXHIY/TX0VXZN2Qk/hyTcYRcz7
Received message: haha yeah thank god we're using noise-cli
Response to encrypt: yep
Encrypted message (send this): GvI8fdLTVq89f7oIqUk1sh9dlw==
```
From an eavesdropper's perspective (e.g. anyone else in the Discord channel), the exchange would look like:
```
initiator: NuNLd17tzFRj/ugNq/m4YejELXW70PdjCqjOMPCvb24=
responder: H5mqb3KCYSs3cjmaIuXmhsS0vEi+vls10XtB8m50b0z9i3Byb7/d7GmCB/ooyI9j
initiator: TGPg++DVNIYyaeY/WJtNyYYBOim3WbQeIFAwxi2bXblkmONdux/5F+s=
responder: 0XzOnaGPcHtXacEtBM3Boytd6h/y14/Qq+L76qDFMVn2SJIsdY8hg7AyOPHx5mtwxsSdLg==
initiator: mmn6+ZuUoOeG0AizDH7/FX2QlMGrl0xmt8IxnDWpDahZSBibrrXXHIY/TX0VXZN2Qk/hyTcYRcz7
responder: GvI8fdLTVq89f7oIqUk1sh9dlw==
```
(in other words, it'd look like properly encrypted gibberish!)
## License
Public domain (The Unlicense).