Name | rtty-soda JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl |
upload_time | 2025-10-22 11:53:30 |
maintainer | None |
docs_url | None |
author | Theo Saveliev |
requires_python | <4.0,>=3.14 |
license | MIT |
keywords |
cli
encryption
libsodium
nacl
rtty
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# rtty-soda
A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl.
#### Features
- Public Key encryption (Curve25519-XSalsa20-Poly1305)
- Secret Key encryption (XSalsa20-Poly1305)
- Key derivation (Argon2id-Blake2b)
- Text compression (zstd, zlib, bz2, lzma)
- Custom encodings:
- Base26 (Latin)
- Base31 (Cyrillic)
- Base36 (Latin with numbers)
- Base64 (RFC 3548)
- Base94 (ASCII printable)
- Binary
## Installation
#### Package manager
1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)
2. Install rtty-soda:
```
% uv tool install rtty-soda
```
3. Remove rtty-soda:
```
% uv tool uninstall rtty-soda
```
#### Docker
```
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0-tools
```
## Getting help
All commands have `[-h | --help]` option.
```
% soda
Usage: soda [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
decrypt-password (dp) Decrypt Message (Password).
decrypt-public (d) Decrypt Message (Public).
decrypt-secret (ds) Decrypt Message (Secret).
encode Encode File.
encrypt-password (ep) Encrypt Message (Password).
encrypt-public (e) Encrypt Message (Public).
encrypt-secret (es) Encrypt Message (Secret).
genkey Generate Private Key.
kdf Key Derivation Function.
pubkey Get Public Key.
```
Some commands have aliases, so `% soda encrypt-password ...` and `% soda ep ...`
are equivalent.
## Public Key encryption
#### Key generation
```
% soda genkey | tee alice | soda pubkey - | tee alice_pub
R5xUCEhvkRRwQD+iWo2hV65fIsWucUZtiFJGKy6pTyA=
% soda genkey | tee bob | soda pubkey - | tee bob_pub
woNtqALnGLzp8VBuzJ8T13E4OZRv5YZy6kXMBpV8/mI=
% soda genkey -h
Usage: soda genkey [OPTIONS]
Generate Private Key.
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Options:
-e, --encoding TEXT [default: base64]
-o, --output-file FILE Write output to file.
--group-len INTEGER [default: 0]
--line-len INTEGER [default: 0]
--padding INTEGER [default: 0]
-h, --help Show this message and exit.
```
#### Encryption
Alice sends the message to Bob:
```
% cat message
A telegraph key is a specialized electrical switch used by a trained operator to
transmit text messages in Morse code in a telegraphy system.
The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
(c) Wikipedia
% soda encrypt-public alice bob_pub message --line-len 80 | tee encrypted
cCipniCmJVAb2mc3JLoDo/DAun7cMunWS5bMqtKRPc/e3d2vfRm8wnqTsYjOXVOCZRj78/GqcVweBV0
mE43X7xO8B0OVyKKgqPAqnAJxwggTLPmWtKFrTwKi0utf7n6fIQuDaCths0qO6FF5rm0znc/3KYKP3D
/WbgE/IBrTOAV6P+mLUnGlzO6U/HdtDCjk1ZB45EN0Q76dDzYav+bliCrVWiAUfZUCtEQ/6B4fi9Aqn
KRDC4XSnd7nLs/ZkhL8hkM13xJ+1MBGbIvEjaY=
% soda encrypt-public -h
Usage: soda encrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
MESSAGE_FILE
Encrypt Message (Public).
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Compression: zstd | zlib | bz2 | lzma | raw
Options:
--key-encoding TEXT [default: base64]
-e, --data-encoding TEXT [default: base64]
-c, --compression TEXT [default: zstd]
-o, --output-file FILE Write output to file.
--group-len INTEGER [default: 0]
--line-len INTEGER [default: 0]
--padding INTEGER [default: 0]
-v, --verbose Show verbose output.
-h, --help Show this message and exit.
```
#### Decryption
```
% soda decrypt-public bob alice_pub encrypted
A telegraph key is a specialized electrical switch used by a trained operator to
transmit text messages in Morse code in a telegraphy system.
The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
(c) Wikipedia
% soda decrypt-public -h
Usage: soda decrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
MESSAGE_FILE
Decrypt Message (Public).
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Compression: zstd | zlib | bz2 | lzma | raw
Options:
--key-encoding TEXT [default: base64]
-e, --data-encoding TEXT [default: base64]
-c, --compression TEXT [default: zstd]
-o, --output-file FILE Write output to file.
--padding INTEGER [default: 0]
-v, --verbose Show verbose output.
-h, --help Show this message and exit.
```
## Secret Key encryption
Alice and Bob share a key for symmetric encryption:
```
% soda genkey > shared
% soda encrypt-secret shared message -o encrypted
% soda decrypt-secret shared encrypted -o message
% soda encrypt-secret -h
Usage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE
Encrypt Message (Secret).
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Compression: zstd | zlib | bz2 | lzma | raw
Options:
--key-encoding TEXT [default: base64]
-e, --data-encoding TEXT [default: base64]
-c, --compression TEXT [default: zstd]
-o, --output-file FILE Write output to file.
--group-len INTEGER [default: 0]
--line-len INTEGER [default: 0]
--padding INTEGER [default: 0]
-v, --verbose Show verbose output.
-h, --help Show this message and exit.
```
Another day, they share a password:
```
% echo qwerty | soda encrypt-password - message -p interactive -o encrypted
% echo qwerty | soda decrypt-password - encrypted -p interactive -o message
% soda encrypt-password -h
Usage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE
Encrypt Message (Password).
KDF profile: interactive | moderate | sensitive
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Compression: zstd | zlib | bz2 | lzma | raw
Options:
-p, --kdf-profile TEXT [default: sensitive]
-e, --data-encoding TEXT [default: base64]
-c, --compression TEXT [default: zstd]
-o, --output-file FILE Write output to file.
--group-len INTEGER [default: 0]
--line-len INTEGER [default: 0]
--padding INTEGER [default: 0]
-v, --verbose Show verbose output.
-h, --help Show this message and exit.
```
## Key derivation
The KDF function derives the key from the password.
It accepts different profiles: interactive, moderate, and sensitive.
```
% echo qwerty | soda kdf --profile interactive -
HqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=
% soda kdf -h
Usage: soda kdf [OPTIONS] PASSWORD_FILE
Key Derivation Function.
Encoding: base26 | base31 | base36 | base64 | base94 | binary
Profile: interactive | moderate | sensitive
Options:
-e, --encoding TEXT [default: base64]
-p, --profile TEXT [default: sensitive]
-o, --output-file FILE Write output to file.
--group-len INTEGER [default: 0]
--line-len INTEGER [default: 0]
--padding INTEGER [default: 0]
-h, --help Show this message and exit.
```
## Text compression
That works as follows:
1. The plaintext is compressed with the compression lib
2. The 16-byte MAC and 24-byte nonce are added
3. The result is encoded with Base64, which adds ~25% overhead
```
% soda es shared message -c zstd -v > /dev/null
Plaintext: 239
Ciphertext: 276
Overhead: 1.155
% soda es shared message -c zlib -v > /dev/null
Plaintext: 239
Ciphertext: 280
Overhead: 1.172
% soda es shared message -c bz2 -v > /dev/null
Plaintext: 239
Ciphertext: 340
Overhead: 1.423
% soda es shared message -c lzma -v > /dev/null
Plaintext: 239
Ciphertext: 324
Overhead: 1.356
% soda es shared message -c raw -v > /dev/null
Plaintext: 239
Ciphertext: 372
Overhead: 1.556
```
## Encoding
The rtty-soda supports various encodings:
```
% soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80
9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7
8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D
FSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE
7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB
DKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8
```
## Compatibility
During the initial development (versions prior to 1.0.0),
I can break backwards compatibility.
## Releases
This project follows a rolling release cycle.
Each version bump represents where I completed a full test cycle.
When testing passes successfully, I commit and release - so every release is a verified stable point.
Raw data
{
"_id": null,
"home_page": null,
"name": "rtty-soda",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.14",
"maintainer_email": null,
"keywords": "cli, encryption, libsodium, nacl, rtty",
"author": "Theo Saveliev",
"author_email": "Theo Saveliev <89431871+theosaveliev@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/c5/00/e4b86fa786401dca18ffc8c97880bf8e1e28899f40bf5de027536b1eb0d8/rtty_soda-0.2.0.tar.gz",
"platform": null,
"description": "# rtty-soda\n\nA CLI tool for Unix-like environments to encrypt a RTTY session using NaCl.\n\n\n#### Features\n\n- Public Key encryption (Curve25519-XSalsa20-Poly1305)\n- Secret Key encryption (XSalsa20-Poly1305)\n- Key derivation (Argon2id-Blake2b)\n- Text compression (zstd, zlib, bz2, lzma)\n- Custom encodings:\n - Base26 (Latin)\n - Base31 (Cyrillic)\n - Base36 (Latin with numbers)\n - Base64 (RFC 3548)\n - Base94 (ASCII printable)\n - Binary\n\n\n## Installation\n#### Package manager\n\n1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)\n2. Install rtty-soda:\n ```\n % uv tool install rtty-soda\n ```\n3. Remove rtty-soda:\n ```\n % uv tool uninstall rtty-soda\n ```\n\n#### Docker\n\n```\n% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0\n% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0-tools\n```\n\n\n## Getting help\n\nAll commands have `[-h | --help]` option.\n\n```\n% soda\nUsage: soda [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n --version Show the version and exit.\n -h, --help Show this message and exit.\n\nCommands:\n decrypt-password (dp) Decrypt Message (Password).\n decrypt-public (d) Decrypt Message (Public).\n decrypt-secret (ds) Decrypt Message (Secret).\n encode Encode File.\n encrypt-password (ep) Encrypt Message (Password).\n encrypt-public (e) Encrypt Message (Public).\n encrypt-secret (es) Encrypt Message (Secret).\n genkey Generate Private Key.\n kdf Key Derivation Function.\n pubkey Get Public Key.\n```\n\nSome commands have aliases, so `% soda encrypt-password ...` and `% soda ep ...`\nare equivalent.\n\n\n## Public Key encryption\n#### Key generation\n\n```\n% soda genkey | tee alice | soda pubkey - | tee alice_pub\nR5xUCEhvkRRwQD+iWo2hV65fIsWucUZtiFJGKy6pTyA=\n\n% soda genkey | tee bob | soda pubkey - | tee bob_pub\nwoNtqALnGLzp8VBuzJ8T13E4OZRv5YZy6kXMBpV8/mI=\n\n% soda genkey -h\nUsage: soda genkey [OPTIONS]\n\n Generate Private Key.\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\nOptions:\n -e, --encoding TEXT [default: base64]\n -o, --output-file FILE Write output to file.\n --group-len INTEGER [default: 0]\n --line-len INTEGER [default: 0]\n --padding INTEGER [default: 0]\n -h, --help Show this message and exit.\n```\n\n#### Encryption\n\nAlice sends the message to Bob:\n\n```\n% cat message\nA telegraph key is a specialized electrical switch used by a trained operator to\ntransmit text messages in Morse code in a telegraphy system.\nThe first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.\n(c) Wikipedia\n\n% soda encrypt-public alice bob_pub message --line-len 80 | tee encrypted\ncCipniCmJVAb2mc3JLoDo/DAun7cMunWS5bMqtKRPc/e3d2vfRm8wnqTsYjOXVOCZRj78/GqcVweBV0\nmE43X7xO8B0OVyKKgqPAqnAJxwggTLPmWtKFrTwKi0utf7n6fIQuDaCths0qO6FF5rm0znc/3KYKP3D\n/WbgE/IBrTOAV6P+mLUnGlzO6U/HdtDCjk1ZB45EN0Q76dDzYav+bliCrVWiAUfZUCtEQ/6B4fi9Aqn\nKRDC4XSnd7nLs/ZkhL8hkM13xJ+1MBGbIvEjaY=\n\n% soda encrypt-public -h\nUsage: soda encrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE\n MESSAGE_FILE\n\n Encrypt Message (Public).\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\n Compression: zstd | zlib | bz2 | lzma | raw\n\nOptions:\n --key-encoding TEXT [default: base64]\n -e, --data-encoding TEXT [default: base64]\n -c, --compression TEXT [default: zstd]\n -o, --output-file FILE Write output to file.\n --group-len INTEGER [default: 0]\n --line-len INTEGER [default: 0]\n --padding INTEGER [default: 0]\n -v, --verbose Show verbose output.\n -h, --help Show this message and exit.\n```\n\n#### Decryption\n\n```\n% soda decrypt-public bob alice_pub encrypted \nA telegraph key is a specialized electrical switch used by a trained operator to\ntransmit text messages in Morse code in a telegraphy system.\nThe first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.\n(c) Wikipedia\n\n% soda decrypt-public -h\nUsage: soda decrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE\n MESSAGE_FILE\n\n Decrypt Message (Public).\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\n Compression: zstd | zlib | bz2 | lzma | raw\n\nOptions:\n --key-encoding TEXT [default: base64]\n -e, --data-encoding TEXT [default: base64]\n -c, --compression TEXT [default: zstd]\n -o, --output-file FILE Write output to file.\n --padding INTEGER [default: 0]\n -v, --verbose Show verbose output.\n -h, --help Show this message and exit.\n```\n\n\n## Secret Key encryption\n\nAlice and Bob share a key for symmetric encryption:\n\n```\n% soda genkey > shared\n% soda encrypt-secret shared message -o encrypted\n% soda decrypt-secret shared encrypted -o message\n\n% soda encrypt-secret -h\nUsage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE\n\n Encrypt Message (Secret).\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\n Compression: zstd | zlib | bz2 | lzma | raw\n\nOptions:\n --key-encoding TEXT [default: base64]\n -e, --data-encoding TEXT [default: base64]\n -c, --compression TEXT [default: zstd]\n -o, --output-file FILE Write output to file.\n --group-len INTEGER [default: 0]\n --line-len INTEGER [default: 0]\n --padding INTEGER [default: 0]\n -v, --verbose Show verbose output.\n -h, --help Show this message and exit.\n```\n\nAnother day, they share a password:\n\n```\n% echo qwerty | soda encrypt-password - message -p interactive -o encrypted\n% echo qwerty | soda decrypt-password - encrypted -p interactive -o message\n\n% soda encrypt-password -h\nUsage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE\n\n Encrypt Message (Password).\n\n KDF profile: interactive | moderate | sensitive\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\n Compression: zstd | zlib | bz2 | lzma | raw\n\nOptions:\n -p, --kdf-profile TEXT [default: sensitive]\n -e, --data-encoding TEXT [default: base64]\n -c, --compression TEXT [default: zstd]\n -o, --output-file FILE Write output to file.\n --group-len INTEGER [default: 0]\n --line-len INTEGER [default: 0]\n --padding INTEGER [default: 0]\n -v, --verbose Show verbose output.\n -h, --help Show this message and exit.\n```\n\n\n## Key derivation\n\nThe KDF function derives the key from the password.\nIt accepts different profiles: interactive, moderate, and sensitive.\n\n```\n% echo qwerty | soda kdf --profile interactive -\nHqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=\n\n% soda kdf -h\nUsage: soda kdf [OPTIONS] PASSWORD_FILE\n\n Key Derivation Function.\n\n Encoding: base26 | base31 | base36 | base64 | base94 | binary\n\n Profile: interactive | moderate | sensitive\n\nOptions:\n -e, --encoding TEXT [default: base64]\n -p, --profile TEXT [default: sensitive]\n -o, --output-file FILE Write output to file.\n --group-len INTEGER [default: 0]\n --line-len INTEGER [default: 0]\n --padding INTEGER [default: 0]\n -h, --help Show this message and exit.\n```\n\n\n## Text compression\n\nThat works as follows:\n1. The plaintext is compressed with the compression lib\n2. The 16-byte MAC and 24-byte nonce are added\n3. The result is encoded with Base64, which adds ~25% overhead\n\n```\n% soda es shared message -c zstd -v > /dev/null\nPlaintext: 239\nCiphertext: 276\nOverhead: 1.155\n% soda es shared message -c zlib -v > /dev/null\nPlaintext: 239\nCiphertext: 280\nOverhead: 1.172\n% soda es shared message -c bz2 -v > /dev/null\nPlaintext: 239\nCiphertext: 340\nOverhead: 1.423\n% soda es shared message -c lzma -v > /dev/null\nPlaintext: 239\nCiphertext: 324\nOverhead: 1.356\n% soda es shared message -c raw -v > /dev/null\nPlaintext: 239\nCiphertext: 372\nOverhead: 1.556\n```\n\n\n## Encoding\n\nThe rtty-soda supports various encodings:\n\n```\n% soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80\n9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7\n8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D\nFSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE\n7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB\nDKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8\n```\n\n\n## Compatibility\n\nDuring the initial development (versions prior to 1.0.0),\nI can break backwards compatibility.\n\n\n## Releases \n\nThis project follows a rolling release cycle. \nEach version bump represents where I completed a full test cycle. \nWhen testing passes successfully, I commit and release - so every release is a verified stable point.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl",
"version": "0.2.0",
"project_urls": {
"github": "https://github.com/theosaveliev/rtty-soda",
"issues": "https://github.com/theosaveliev/rtty-soda/issues"
},
"split_keywords": [
"cli",
" encryption",
" libsodium",
" nacl",
" rtty"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3db2871c78a6ab664463f22833a67857e4d14f35684769167d993645d364d9f1",
"md5": "ee0b2c760b4aaed20f11549fae3831e7",
"sha256": "9991fcd0ccbb069bcc340154407acc0a8634978d6426f390939ea01e1793bd4b"
},
"downloads": -1,
"filename": "rtty_soda-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ee0b2c760b4aaed20f11549fae3831e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.14",
"size": 14816,
"upload_time": "2025-10-22T11:53:27",
"upload_time_iso_8601": "2025-10-22T11:53:27.619686Z",
"url": "https://files.pythonhosted.org/packages/3d/b2/871c78a6ab664463f22833a67857e4d14f35684769167d993645d364d9f1/rtty_soda-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c500e4b86fa786401dca18ffc8c97880bf8e1e28899f40bf5de027536b1eb0d8",
"md5": "6ca0e6436bd88bd18a62021f0bcff25c",
"sha256": "3943eb7cc7f6d459cc8cd1534525a21ad3d8a0ff9912ce97eb5e26208a1e3014"
},
"downloads": -1,
"filename": "rtty_soda-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "6ca0e6436bd88bd18a62021f0bcff25c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.14",
"size": 9662,
"upload_time": "2025-10-22T11:53:30",
"upload_time_iso_8601": "2025-10-22T11:53:30.482852Z",
"url": "https://files.pythonhosted.org/packages/c5/00/e4b86fa786401dca18ffc8c97880bf8e1e28899f40bf5de027536b1eb0d8/rtty_soda-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-22 11:53:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "theosaveliev",
"github_project": "rtty-soda",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "rtty-soda"
}