rtty-soda 0.1.6__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rtty-soda might be problematic. Click here for more details.

Files changed (28) hide show
  1. rtty_soda-0.2.1/PKG-INFO +332 -0
  2. rtty_soda-0.2.1/README.md +309 -0
  3. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/pyproject.toml +14 -15
  4. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/archivers.py +11 -3
  5. rtty_soda-0.2.1/src/rtty_soda/cli_io.py +121 -0
  6. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/cryptography/kdf.py +12 -5
  7. rtty_soda-0.2.1/src/rtty_soda/cryptography/public.py +20 -0
  8. rtty_soda-0.2.1/src/rtty_soda/cryptography/secret.py +20 -0
  9. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/encoders/__init__.py +6 -2
  10. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/encoders/base26_encoder.py +4 -3
  11. rtty_soda-0.2.1/src/rtty_soda/encoders/base31_encoder.py +19 -0
  12. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/encoders/base36_encoder.py +4 -3
  13. rtty_soda-0.2.1/src/rtty_soda/encoders/base64_encoder.py +16 -0
  14. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/encoders/base94_encoder.py +4 -2
  15. rtty_soda-0.2.1/src/rtty_soda/encoders/encoder.py +13 -0
  16. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/encoders/functions.py +3 -1
  17. rtty_soda-0.2.1/src/rtty_soda/encoders/raw_encoder.py +15 -0
  18. rtty_soda-0.2.1/src/rtty_soda/main.py +440 -0
  19. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/main.pyi +45 -4
  20. rtty_soda-0.1.6/PKG-INFO +0 -254
  21. rtty_soda-0.1.6/README.md +0 -229
  22. rtty_soda-0.1.6/src/rtty_soda/cli_io.py +0 -87
  23. rtty_soda-0.1.6/src/rtty_soda/cryptography/public.py +0 -20
  24. rtty_soda-0.1.6/src/rtty_soda/cryptography/secret.py +0 -17
  25. rtty_soda-0.1.6/src/rtty_soda/main.py +0 -315
  26. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/__init__.py +0 -0
  27. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/cryptography/__init__.py +0 -0
  28. {rtty_soda-0.1.6 → rtty_soda-0.2.1}/src/rtty_soda/py.typed +0 -0
@@ -0,0 +1,332 @@
1
+ Metadata-Version: 2.3
2
+ Name: rtty-soda
3
+ Version: 0.2.1
4
+ Summary: A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl
5
+ Keywords: cli,encryption,libsodium,nacl,rtty
6
+ Author: Theo Saveliev
7
+ Author-email: Theo Saveliev <89431871+theosaveliev@users.noreply.github.com>
8
+ License: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Programming Language :: Python :: 3.14
11
+ Classifier: Operating System :: POSIX
12
+ Classifier: Environment :: Console
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Topic :: Security :: Cryptography
15
+ Classifier: Topic :: Utilities
16
+ Requires-Dist: click-aliases>=1.0.5,<2.0.0
17
+ Requires-Dist: click>=8.3.0,<9.0.0
18
+ Requires-Dist: pynacl>=1.6.0,<2.0.0
19
+ Requires-Python: >=3.14, <4.0
20
+ Project-URL: github, https://github.com/theosaveliev/rtty-soda
21
+ Project-URL: issues, https://github.com/theosaveliev/rtty-soda/issues
22
+ Description-Content-Type: text/markdown
23
+
24
+ # rtty-soda
25
+
26
+ A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl.
27
+
28
+
29
+ #### Features
30
+
31
+ - Public Key encryption (Curve25519-XSalsa20-Poly1305)
32
+ - Secret Key encryption (XSalsa20-Poly1305)
33
+ - Key derivation (Argon2id-Blake2b)
34
+ - Text compression (zstd, zlib, bz2, lzma)
35
+ - Custom encodings:
36
+ - Base26 (Latin)
37
+ - Base31 (Cyrillic)
38
+ - Base36 (Latin with numbers)
39
+ - Base64 (RFC 3548)
40
+ - Base94 (ASCII printable)
41
+ - Binary
42
+
43
+
44
+ ## Installation
45
+ #### Package manager
46
+
47
+ 1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)
48
+ 2. Install rtty-soda:
49
+ ```
50
+ % uv tool install rtty-soda
51
+ ```
52
+ 3. Remove rtty-soda:
53
+ ```
54
+ % uv tool uninstall rtty-soda
55
+ ```
56
+
57
+ #### Docker
58
+
59
+ ```
60
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.1
61
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.1-tools
62
+ ```
63
+
64
+
65
+ ## Getting help
66
+
67
+ All commands have `[-h | --help]` option.
68
+
69
+ ```
70
+ % soda
71
+ Usage: soda [OPTIONS] COMMAND [ARGS]...
72
+
73
+ Options:
74
+ --version Show the version and exit.
75
+ -h, --help Show this message and exit.
76
+
77
+ Commands:
78
+ decrypt-password (dp) Decrypt Message (Password).
79
+ decrypt-public (d) Decrypt Message (Public).
80
+ decrypt-secret (ds) Decrypt Message (Secret).
81
+ encode Encode File.
82
+ encrypt-password (ep) Encrypt Message (Password).
83
+ encrypt-public (e) Encrypt Message (Public).
84
+ encrypt-secret (es) Encrypt Message (Secret).
85
+ genkey Generate Private Key.
86
+ kdf Key Derivation Function.
87
+ pubkey Get Public Key.
88
+ ```
89
+
90
+ Some commands have aliases, so `% soda encrypt-password ...` and `% soda ep ...`
91
+ are equivalent.
92
+
93
+
94
+ ## Public Key encryption
95
+ #### Key generation
96
+
97
+ ```
98
+ % soda genkey | tee alice | soda pubkey - | tee alice_pub
99
+ R5xUCEhvkRRwQD+iWo2hV65fIsWucUZtiFJGKy6pTyA=
100
+
101
+ % soda genkey | tee bob | soda pubkey - | tee bob_pub
102
+ woNtqALnGLzp8VBuzJ8T13E4OZRv5YZy6kXMBpV8/mI=
103
+
104
+ % soda genkey -h
105
+ Usage: soda genkey [OPTIONS]
106
+
107
+ Generate Private Key.
108
+
109
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
110
+
111
+ Options:
112
+ -e, --encoding TEXT [default: base64]
113
+ -o, --output-file FILE Write output to file.
114
+ --group-len INTEGER [default: 0]
115
+ --line-len INTEGER [default: 0]
116
+ --padding INTEGER [default: 0]
117
+ -h, --help Show this message and exit.
118
+ ```
119
+
120
+ #### Encryption
121
+
122
+ Alice sends the message to Bob:
123
+
124
+ ```
125
+ % cat message
126
+ A telegraph key is a specialized electrical switch used by a trained operator to
127
+ transmit text messages in Morse code in a telegraphy system.
128
+ The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
129
+ (c) Wikipedia
130
+
131
+ % soda encrypt-public alice bob_pub message --line-len 80 | tee encrypted
132
+ cCipniCmJVAb2mc3JLoDo/DAun7cMunWS5bMqtKRPc/e3d2vfRm8wnqTsYjOXVOCZRj78/GqcVweBV0
133
+ mE43X7xO8B0OVyKKgqPAqnAJxwggTLPmWtKFrTwKi0utf7n6fIQuDaCths0qO6FF5rm0znc/3KYKP3D
134
+ /WbgE/IBrTOAV6P+mLUnGlzO6U/HdtDCjk1ZB45EN0Q76dDzYav+bliCrVWiAUfZUCtEQ/6B4fi9Aqn
135
+ KRDC4XSnd7nLs/ZkhL8hkM13xJ+1MBGbIvEjaY=
136
+
137
+ % soda encrypt-public -h
138
+ Usage: soda encrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
139
+ MESSAGE_FILE
140
+
141
+ Encrypt Message (Public).
142
+
143
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
144
+
145
+ Compression: zstd | zlib | bz2 | lzma | raw
146
+
147
+ Options:
148
+ --key-encoding TEXT [default: base64]
149
+ -e, --data-encoding TEXT [default: base64]
150
+ -c, --compression TEXT [default: zstd]
151
+ -o, --output-file FILE Write output to file.
152
+ --group-len INTEGER [default: 0]
153
+ --line-len INTEGER [default: 0]
154
+ --padding INTEGER [default: 0]
155
+ -v, --verbose Show verbose output.
156
+ -h, --help Show this message and exit.
157
+ ```
158
+
159
+ #### Decryption
160
+
161
+ ```
162
+ % soda decrypt-public bob alice_pub encrypted
163
+ A telegraph key is a specialized electrical switch used by a trained operator to
164
+ transmit text messages in Morse code in a telegraphy system.
165
+ The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
166
+ (c) Wikipedia
167
+
168
+ % soda decrypt-public -h
169
+ Usage: soda decrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
170
+ MESSAGE_FILE
171
+
172
+ Decrypt Message (Public).
173
+
174
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
175
+
176
+ Compression: zstd | zlib | bz2 | lzma | raw
177
+
178
+ Options:
179
+ --key-encoding TEXT [default: base64]
180
+ -e, --data-encoding TEXT [default: base64]
181
+ -c, --compression TEXT [default: zstd]
182
+ -o, --output-file FILE Write output to file.
183
+ -v, --verbose Show verbose output.
184
+ -h, --help Show this message and exit.
185
+ ```
186
+
187
+
188
+ ## Secret Key encryption
189
+
190
+ Alice and Bob share a key for symmetric encryption:
191
+
192
+ ```
193
+ % soda genkey > shared
194
+ % soda encrypt-secret shared message -o encrypted
195
+ % soda decrypt-secret shared encrypted -o message
196
+
197
+ % soda encrypt-secret -h
198
+ Usage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE
199
+
200
+ Encrypt Message (Secret).
201
+
202
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
203
+
204
+ Compression: zstd | zlib | bz2 | lzma | raw
205
+
206
+ Options:
207
+ --key-encoding TEXT [default: base64]
208
+ -e, --data-encoding TEXT [default: base64]
209
+ -c, --compression TEXT [default: zstd]
210
+ -o, --output-file FILE Write output to file.
211
+ --group-len INTEGER [default: 0]
212
+ --line-len INTEGER [default: 0]
213
+ --padding INTEGER [default: 0]
214
+ -v, --verbose Show verbose output.
215
+ -h, --help Show this message and exit.
216
+ ```
217
+
218
+ Another day, they share a password:
219
+
220
+ ```
221
+ % echo qwerty | soda encrypt-password - message -p interactive -o encrypted
222
+ % echo qwerty | soda decrypt-password - encrypted -p interactive -o message
223
+
224
+ % soda encrypt-password -h
225
+ Usage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE
226
+
227
+ Encrypt Message (Password).
228
+
229
+ KDF profile: interactive | moderate | sensitive
230
+
231
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
232
+
233
+ Compression: zstd | zlib | bz2 | lzma | raw
234
+
235
+ Options:
236
+ -p, --kdf-profile TEXT [default: sensitive]
237
+ -e, --data-encoding TEXT [default: base64]
238
+ -c, --compression TEXT [default: zstd]
239
+ -o, --output-file FILE Write output to file.
240
+ --group-len INTEGER [default: 0]
241
+ --line-len INTEGER [default: 0]
242
+ --padding INTEGER [default: 0]
243
+ -v, --verbose Show verbose output.
244
+ -h, --help Show this message and exit.
245
+ ```
246
+
247
+
248
+ ## Key derivation
249
+
250
+ The KDF function derives the key from the password.
251
+ It accepts different profiles: interactive, moderate, and sensitive.
252
+
253
+ ```
254
+ % echo qwerty | soda kdf --profile interactive -
255
+ HqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=
256
+
257
+ % soda kdf -h
258
+ Usage: soda kdf [OPTIONS] PASSWORD_FILE
259
+
260
+ Key Derivation Function.
261
+
262
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
263
+
264
+ Profile: interactive | moderate | sensitive
265
+
266
+ Options:
267
+ -e, --encoding TEXT [default: base64]
268
+ -p, --profile TEXT [default: sensitive]
269
+ -o, --output-file FILE Write output to file.
270
+ --group-len INTEGER [default: 0]
271
+ --line-len INTEGER [default: 0]
272
+ --padding INTEGER [default: 0]
273
+ -h, --help Show this message and exit.
274
+ ```
275
+
276
+
277
+ ## Text compression
278
+
279
+ That works as follows:
280
+ 1. The plaintext is compressed with the compression lib
281
+ 2. The 16-byte MAC and 24-byte nonce are added
282
+ 3. The result is encoded with Base64, which adds ~25% overhead
283
+
284
+ ```
285
+ % soda es shared message -c zstd -v > /dev/null
286
+ Plaintext: 239
287
+ Ciphertext: 276
288
+ Overhead: 1.155
289
+ % soda es shared message -c zlib -v > /dev/null
290
+ Plaintext: 239
291
+ Ciphertext: 280
292
+ Overhead: 1.172
293
+ % soda es shared message -c bz2 -v > /dev/null
294
+ Plaintext: 239
295
+ Ciphertext: 340
296
+ Overhead: 1.423
297
+ % soda es shared message -c lzma -v > /dev/null
298
+ Plaintext: 239
299
+ Ciphertext: 324
300
+ Overhead: 1.356
301
+ % soda es shared message -c raw -v > /dev/null
302
+ Plaintext: 239
303
+ Ciphertext: 372
304
+ Overhead: 1.556
305
+ ```
306
+
307
+
308
+ ## Encoding
309
+
310
+ The rtty-soda supports various encodings:
311
+
312
+ ```
313
+ % soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80
314
+ 9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7
315
+ 8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D
316
+ FSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE
317
+ 7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB
318
+ DKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8
319
+ ```
320
+
321
+
322
+ ## Compatibility
323
+
324
+ During the initial development (versions prior to 1.0.0),
325
+ I can break backwards compatibility.
326
+
327
+
328
+ ## Releases
329
+
330
+ This project follows a rolling release cycle.
331
+ Each version bump represents where I completed a full test cycle.
332
+ When testing passes successfully, I commit and release - so every release is a verified stable point.
@@ -0,0 +1,309 @@
1
+ # rtty-soda
2
+
3
+ A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl.
4
+
5
+
6
+ #### Features
7
+
8
+ - Public Key encryption (Curve25519-XSalsa20-Poly1305)
9
+ - Secret Key encryption (XSalsa20-Poly1305)
10
+ - Key derivation (Argon2id-Blake2b)
11
+ - Text compression (zstd, zlib, bz2, lzma)
12
+ - Custom encodings:
13
+ - Base26 (Latin)
14
+ - Base31 (Cyrillic)
15
+ - Base36 (Latin with numbers)
16
+ - Base64 (RFC 3548)
17
+ - Base94 (ASCII printable)
18
+ - Binary
19
+
20
+
21
+ ## Installation
22
+ #### Package manager
23
+
24
+ 1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/)
25
+ 2. Install rtty-soda:
26
+ ```
27
+ % uv tool install rtty-soda
28
+ ```
29
+ 3. Remove rtty-soda:
30
+ ```
31
+ % uv tool uninstall rtty-soda
32
+ ```
33
+
34
+ #### Docker
35
+
36
+ ```
37
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.1
38
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.1-tools
39
+ ```
40
+
41
+
42
+ ## Getting help
43
+
44
+ All commands have `[-h | --help]` option.
45
+
46
+ ```
47
+ % soda
48
+ Usage: soda [OPTIONS] COMMAND [ARGS]...
49
+
50
+ Options:
51
+ --version Show the version and exit.
52
+ -h, --help Show this message and exit.
53
+
54
+ Commands:
55
+ decrypt-password (dp) Decrypt Message (Password).
56
+ decrypt-public (d) Decrypt Message (Public).
57
+ decrypt-secret (ds) Decrypt Message (Secret).
58
+ encode Encode File.
59
+ encrypt-password (ep) Encrypt Message (Password).
60
+ encrypt-public (e) Encrypt Message (Public).
61
+ encrypt-secret (es) Encrypt Message (Secret).
62
+ genkey Generate Private Key.
63
+ kdf Key Derivation Function.
64
+ pubkey Get Public Key.
65
+ ```
66
+
67
+ Some commands have aliases, so `% soda encrypt-password ...` and `% soda ep ...`
68
+ are equivalent.
69
+
70
+
71
+ ## Public Key encryption
72
+ #### Key generation
73
+
74
+ ```
75
+ % soda genkey | tee alice | soda pubkey - | tee alice_pub
76
+ R5xUCEhvkRRwQD+iWo2hV65fIsWucUZtiFJGKy6pTyA=
77
+
78
+ % soda genkey | tee bob | soda pubkey - | tee bob_pub
79
+ woNtqALnGLzp8VBuzJ8T13E4OZRv5YZy6kXMBpV8/mI=
80
+
81
+ % soda genkey -h
82
+ Usage: soda genkey [OPTIONS]
83
+
84
+ Generate Private Key.
85
+
86
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
87
+
88
+ Options:
89
+ -e, --encoding TEXT [default: base64]
90
+ -o, --output-file FILE Write output to file.
91
+ --group-len INTEGER [default: 0]
92
+ --line-len INTEGER [default: 0]
93
+ --padding INTEGER [default: 0]
94
+ -h, --help Show this message and exit.
95
+ ```
96
+
97
+ #### Encryption
98
+
99
+ Alice sends the message to Bob:
100
+
101
+ ```
102
+ % cat message
103
+ A telegraph key is a specialized electrical switch used by a trained operator to
104
+ transmit text messages in Morse code in a telegraphy system.
105
+ The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
106
+ (c) Wikipedia
107
+
108
+ % soda encrypt-public alice bob_pub message --line-len 80 | tee encrypted
109
+ cCipniCmJVAb2mc3JLoDo/DAun7cMunWS5bMqtKRPc/e3d2vfRm8wnqTsYjOXVOCZRj78/GqcVweBV0
110
+ mE43X7xO8B0OVyKKgqPAqnAJxwggTLPmWtKFrTwKi0utf7n6fIQuDaCths0qO6FF5rm0znc/3KYKP3D
111
+ /WbgE/IBrTOAV6P+mLUnGlzO6U/HdtDCjk1ZB45EN0Q76dDzYav+bliCrVWiAUfZUCtEQ/6B4fi9Aqn
112
+ KRDC4XSnd7nLs/ZkhL8hkM13xJ+1MBGbIvEjaY=
113
+
114
+ % soda encrypt-public -h
115
+ Usage: soda encrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
116
+ MESSAGE_FILE
117
+
118
+ Encrypt Message (Public).
119
+
120
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
121
+
122
+ Compression: zstd | zlib | bz2 | lzma | raw
123
+
124
+ Options:
125
+ --key-encoding TEXT [default: base64]
126
+ -e, --data-encoding TEXT [default: base64]
127
+ -c, --compression TEXT [default: zstd]
128
+ -o, --output-file FILE Write output to file.
129
+ --group-len INTEGER [default: 0]
130
+ --line-len INTEGER [default: 0]
131
+ --padding INTEGER [default: 0]
132
+ -v, --verbose Show verbose output.
133
+ -h, --help Show this message and exit.
134
+ ```
135
+
136
+ #### Decryption
137
+
138
+ ```
139
+ % soda decrypt-public bob alice_pub encrypted
140
+ A telegraph key is a specialized electrical switch used by a trained operator to
141
+ transmit text messages in Morse code in a telegraphy system.
142
+ The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
143
+ (c) Wikipedia
144
+
145
+ % soda decrypt-public -h
146
+ Usage: soda decrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
147
+ MESSAGE_FILE
148
+
149
+ Decrypt Message (Public).
150
+
151
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
152
+
153
+ Compression: zstd | zlib | bz2 | lzma | raw
154
+
155
+ Options:
156
+ --key-encoding TEXT [default: base64]
157
+ -e, --data-encoding TEXT [default: base64]
158
+ -c, --compression TEXT [default: zstd]
159
+ -o, --output-file FILE Write output to file.
160
+ -v, --verbose Show verbose output.
161
+ -h, --help Show this message and exit.
162
+ ```
163
+
164
+
165
+ ## Secret Key encryption
166
+
167
+ Alice and Bob share a key for symmetric encryption:
168
+
169
+ ```
170
+ % soda genkey > shared
171
+ % soda encrypt-secret shared message -o encrypted
172
+ % soda decrypt-secret shared encrypted -o message
173
+
174
+ % soda encrypt-secret -h
175
+ Usage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE
176
+
177
+ Encrypt Message (Secret).
178
+
179
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
180
+
181
+ Compression: zstd | zlib | bz2 | lzma | raw
182
+
183
+ Options:
184
+ --key-encoding TEXT [default: base64]
185
+ -e, --data-encoding TEXT [default: base64]
186
+ -c, --compression TEXT [default: zstd]
187
+ -o, --output-file FILE Write output to file.
188
+ --group-len INTEGER [default: 0]
189
+ --line-len INTEGER [default: 0]
190
+ --padding INTEGER [default: 0]
191
+ -v, --verbose Show verbose output.
192
+ -h, --help Show this message and exit.
193
+ ```
194
+
195
+ Another day, they share a password:
196
+
197
+ ```
198
+ % echo qwerty | soda encrypt-password - message -p interactive -o encrypted
199
+ % echo qwerty | soda decrypt-password - encrypted -p interactive -o message
200
+
201
+ % soda encrypt-password -h
202
+ Usage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE
203
+
204
+ Encrypt Message (Password).
205
+
206
+ KDF profile: interactive | moderate | sensitive
207
+
208
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
209
+
210
+ Compression: zstd | zlib | bz2 | lzma | raw
211
+
212
+ Options:
213
+ -p, --kdf-profile TEXT [default: sensitive]
214
+ -e, --data-encoding TEXT [default: base64]
215
+ -c, --compression TEXT [default: zstd]
216
+ -o, --output-file FILE Write output to file.
217
+ --group-len INTEGER [default: 0]
218
+ --line-len INTEGER [default: 0]
219
+ --padding INTEGER [default: 0]
220
+ -v, --verbose Show verbose output.
221
+ -h, --help Show this message and exit.
222
+ ```
223
+
224
+
225
+ ## Key derivation
226
+
227
+ The KDF function derives the key from the password.
228
+ It accepts different profiles: interactive, moderate, and sensitive.
229
+
230
+ ```
231
+ % echo qwerty | soda kdf --profile interactive -
232
+ HqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=
233
+
234
+ % soda kdf -h
235
+ Usage: soda kdf [OPTIONS] PASSWORD_FILE
236
+
237
+ Key Derivation Function.
238
+
239
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
240
+
241
+ Profile: interactive | moderate | sensitive
242
+
243
+ Options:
244
+ -e, --encoding TEXT [default: base64]
245
+ -p, --profile TEXT [default: sensitive]
246
+ -o, --output-file FILE Write output to file.
247
+ --group-len INTEGER [default: 0]
248
+ --line-len INTEGER [default: 0]
249
+ --padding INTEGER [default: 0]
250
+ -h, --help Show this message and exit.
251
+ ```
252
+
253
+
254
+ ## Text compression
255
+
256
+ That works as follows:
257
+ 1. The plaintext is compressed with the compression lib
258
+ 2. The 16-byte MAC and 24-byte nonce are added
259
+ 3. The result is encoded with Base64, which adds ~25% overhead
260
+
261
+ ```
262
+ % soda es shared message -c zstd -v > /dev/null
263
+ Plaintext: 239
264
+ Ciphertext: 276
265
+ Overhead: 1.155
266
+ % soda es shared message -c zlib -v > /dev/null
267
+ Plaintext: 239
268
+ Ciphertext: 280
269
+ Overhead: 1.172
270
+ % soda es shared message -c bz2 -v > /dev/null
271
+ Plaintext: 239
272
+ Ciphertext: 340
273
+ Overhead: 1.423
274
+ % soda es shared message -c lzma -v > /dev/null
275
+ Plaintext: 239
276
+ Ciphertext: 324
277
+ Overhead: 1.356
278
+ % soda es shared message -c raw -v > /dev/null
279
+ Plaintext: 239
280
+ Ciphertext: 372
281
+ Overhead: 1.556
282
+ ```
283
+
284
+
285
+ ## Encoding
286
+
287
+ The rtty-soda supports various encodings:
288
+
289
+ ```
290
+ % soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80
291
+ 9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7
292
+ 8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D
293
+ FSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE
294
+ 7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB
295
+ DKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8
296
+ ```
297
+
298
+
299
+ ## Compatibility
300
+
301
+ During the initial development (versions prior to 1.0.0),
302
+ I can break backwards compatibility.
303
+
304
+
305
+ ## Releases
306
+
307
+ This project follows a rolling release cycle.
308
+ Each version bump represents where I completed a full test cycle.
309
+ When testing passes successfully, I commit and release - so every release is a verified stable point.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "rtty-soda"
3
- version = "0.1.6"
3
+ version = "0.2.1"
4
4
  description = "A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -9,22 +9,20 @@ authors = [
9
9
  { name = "Theo Saveliev", email = "89431871+theosaveliev@users.noreply.github.com" },
10
10
  ]
11
11
 
12
- requires-python = ">=3.13,<4.0"
12
+ requires-python = ">=3.14,<4.0"
13
13
 
14
14
  dependencies = [
15
- "click>=8.2.1,<9.0.0",
16
15
  "click-aliases>=1.0.5,<2.0.0",
17
- "pynacl>=1.5.0,<2.0.0",
16
+ "click>=8.3.0,<9.0.0",
17
+ "pynacl>=1.6.0,<2.0.0",
18
18
  ]
19
19
 
20
20
  classifiers = [
21
21
  "Development Status :: 4 - Beta",
22
- "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.14",
23
23
  "Operating System :: POSIX",
24
24
  "Environment :: Console",
25
- "Intended Audience :: End Users/Desktop",
26
25
  "License :: OSI Approved :: MIT License",
27
- "Topic :: Communications",
28
26
  "Topic :: Security :: Cryptography",
29
27
  "Topic :: Utilities",
30
28
  ]
@@ -33,16 +31,16 @@ keywords = ["cli", "encryption", "libsodium", "nacl", "rtty"]
33
31
 
34
32
  [dependency-groups]
35
33
  dev = [
36
- "ruff>=0.13.2,<0.14.0",
37
- "mypy>=1.17.1,<2.0.0",
38
- "basedpyright>=1.31.4,<2.0.0",
39
- "pytest>=8.4.1,<9.0.0",
40
- "poethepoet>=0.37.0,<0.38.0",
34
+ "basedpyright>=1.31.7,<2.0.0",
41
35
  "jinja2-cli[toml]>=0.8.2,<0.9.0",
36
+ "mypy>=1.18.2,<2.0.0",
37
+ "poethepoet>=0.37.0,<0.38.0",
38
+ "pytest>=8.4.2,<9.0.0",
39
+ "ruff>=0.14.1,<0.15.0",
42
40
  ]
43
41
 
44
42
  [build-system]
45
- requires = ["uv_build>=0.8.22,<0.9.0"]
43
+ requires = ["uv_build>=0.9.3,<0.10.0"]
46
44
  build-backend = "uv_build"
47
45
 
48
46
  [project.scripts]
@@ -66,6 +64,7 @@ source-exclude = [
66
64
  ".idea",
67
65
  ".vscode",
68
66
  ]
67
+
69
68
  wheel-exclude = [
70
69
  ".env",
71
70
  ".mypy_cache",
@@ -87,8 +86,8 @@ mypy = "mypy ."
87
86
  pyright = "basedpyright ."
88
87
  test = "pytest"
89
88
  readme = "jinja2 README.j2 pyproject.toml --outfile README.md"
90
- all = ["lint", "format", "mypy", "pyright", "test", "readme"]
91
- build = "uv build"
89
+ dev = ["format", "lint", "mypy", "pyright"]
90
+ pre-build = ["dev", "test", "readme"]
92
91
  docker = ["docker-build", "docker-push"]
93
92
 
94
93
  [tool.poe.tasks.docker-build]