rtty-soda 0.1.6__tar.gz → 0.2.0__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.0/PKG-INFO +333 -0
  2. rtty_soda-0.2.0/README.md +310 -0
  3. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/pyproject.toml +14 -15
  4. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/archivers.py +11 -3
  5. rtty_soda-0.2.0/src/rtty_soda/cli_io.py +124 -0
  6. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/cryptography/kdf.py +12 -5
  7. rtty_soda-0.2.0/src/rtty_soda/cryptography/public.py +20 -0
  8. rtty_soda-0.2.0/src/rtty_soda/cryptography/secret.py +20 -0
  9. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/encoders/__init__.py +6 -2
  10. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/encoders/base26_encoder.py +2 -3
  11. rtty_soda-0.2.0/src/rtty_soda/encoders/base31_encoder.py +16 -0
  12. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/encoders/base36_encoder.py +2 -3
  13. rtty_soda-0.2.0/src/rtty_soda/encoders/base64_encoder.py +15 -0
  14. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/encoders/base94_encoder.py +2 -3
  15. rtty_soda-0.2.0/src/rtty_soda/encoders/encoder.py +11 -0
  16. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/encoders/functions.py +3 -1
  17. rtty_soda-0.2.0/src/rtty_soda/encoders/raw_encoder.py +13 -0
  18. rtty_soda-0.2.0/src/rtty_soda/main.py +513 -0
  19. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/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.0}/src/rtty_soda/__init__.py +0 -0
  27. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/cryptography/__init__.py +0 -0
  28. {rtty_soda-0.1.6 → rtty_soda-0.2.0}/src/rtty_soda/py.typed +0 -0
@@ -0,0 +1,333 @@
1
+ Metadata-Version: 2.3
2
+ Name: rtty-soda
3
+ Version: 0.2.0
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.0
61
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0-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
+ --padding INTEGER [default: 0]
184
+ -v, --verbose Show verbose output.
185
+ -h, --help Show this message and exit.
186
+ ```
187
+
188
+
189
+ ## Secret Key encryption
190
+
191
+ Alice and Bob share a key for symmetric encryption:
192
+
193
+ ```
194
+ % soda genkey > shared
195
+ % soda encrypt-secret shared message -o encrypted
196
+ % soda decrypt-secret shared encrypted -o message
197
+
198
+ % soda encrypt-secret -h
199
+ Usage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE
200
+
201
+ Encrypt Message (Secret).
202
+
203
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
204
+
205
+ Compression: zstd | zlib | bz2 | lzma | raw
206
+
207
+ Options:
208
+ --key-encoding TEXT [default: base64]
209
+ -e, --data-encoding TEXT [default: base64]
210
+ -c, --compression TEXT [default: zstd]
211
+ -o, --output-file FILE Write output to file.
212
+ --group-len INTEGER [default: 0]
213
+ --line-len INTEGER [default: 0]
214
+ --padding INTEGER [default: 0]
215
+ -v, --verbose Show verbose output.
216
+ -h, --help Show this message and exit.
217
+ ```
218
+
219
+ Another day, they share a password:
220
+
221
+ ```
222
+ % echo qwerty | soda encrypt-password - message -p interactive -o encrypted
223
+ % echo qwerty | soda decrypt-password - encrypted -p interactive -o message
224
+
225
+ % soda encrypt-password -h
226
+ Usage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE
227
+
228
+ Encrypt Message (Password).
229
+
230
+ KDF profile: interactive | moderate | sensitive
231
+
232
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
233
+
234
+ Compression: zstd | zlib | bz2 | lzma | raw
235
+
236
+ Options:
237
+ -p, --kdf-profile TEXT [default: sensitive]
238
+ -e, --data-encoding TEXT [default: base64]
239
+ -c, --compression TEXT [default: zstd]
240
+ -o, --output-file FILE Write output to file.
241
+ --group-len INTEGER [default: 0]
242
+ --line-len INTEGER [default: 0]
243
+ --padding INTEGER [default: 0]
244
+ -v, --verbose Show verbose output.
245
+ -h, --help Show this message and exit.
246
+ ```
247
+
248
+
249
+ ## Key derivation
250
+
251
+ The KDF function derives the key from the password.
252
+ It accepts different profiles: interactive, moderate, and sensitive.
253
+
254
+ ```
255
+ % echo qwerty | soda kdf --profile interactive -
256
+ HqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=
257
+
258
+ % soda kdf -h
259
+ Usage: soda kdf [OPTIONS] PASSWORD_FILE
260
+
261
+ Key Derivation Function.
262
+
263
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
264
+
265
+ Profile: interactive | moderate | sensitive
266
+
267
+ Options:
268
+ -e, --encoding TEXT [default: base64]
269
+ -p, --profile TEXT [default: sensitive]
270
+ -o, --output-file FILE Write output to file.
271
+ --group-len INTEGER [default: 0]
272
+ --line-len INTEGER [default: 0]
273
+ --padding INTEGER [default: 0]
274
+ -h, --help Show this message and exit.
275
+ ```
276
+
277
+
278
+ ## Text compression
279
+
280
+ That works as follows:
281
+ 1. The plaintext is compressed with the compression lib
282
+ 2. The 16-byte MAC and 24-byte nonce are added
283
+ 3. The result is encoded with Base64, which adds ~25% overhead
284
+
285
+ ```
286
+ % soda es shared message -c zstd -v > /dev/null
287
+ Plaintext: 239
288
+ Ciphertext: 276
289
+ Overhead: 1.155
290
+ % soda es shared message -c zlib -v > /dev/null
291
+ Plaintext: 239
292
+ Ciphertext: 280
293
+ Overhead: 1.172
294
+ % soda es shared message -c bz2 -v > /dev/null
295
+ Plaintext: 239
296
+ Ciphertext: 340
297
+ Overhead: 1.423
298
+ % soda es shared message -c lzma -v > /dev/null
299
+ Plaintext: 239
300
+ Ciphertext: 324
301
+ Overhead: 1.356
302
+ % soda es shared message -c raw -v > /dev/null
303
+ Plaintext: 239
304
+ Ciphertext: 372
305
+ Overhead: 1.556
306
+ ```
307
+
308
+
309
+ ## Encoding
310
+
311
+ The rtty-soda supports various encodings:
312
+
313
+ ```
314
+ % soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80
315
+ 9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7
316
+ 8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D
317
+ FSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE
318
+ 7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB
319
+ DKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8
320
+ ```
321
+
322
+
323
+ ## Compatibility
324
+
325
+ During the initial development (versions prior to 1.0.0),
326
+ I can break backwards compatibility.
327
+
328
+
329
+ ## Releases
330
+
331
+ This project follows a rolling release cycle.
332
+ Each version bump represents where I completed a full test cycle.
333
+ When testing passes successfully, I commit and release - so every release is a verified stable point.
@@ -0,0 +1,310 @@
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.0
38
+ % docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.0-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
+ --padding INTEGER [default: 0]
161
+ -v, --verbose Show verbose output.
162
+ -h, --help Show this message and exit.
163
+ ```
164
+
165
+
166
+ ## Secret Key encryption
167
+
168
+ Alice and Bob share a key for symmetric encryption:
169
+
170
+ ```
171
+ % soda genkey > shared
172
+ % soda encrypt-secret shared message -o encrypted
173
+ % soda decrypt-secret shared encrypted -o message
174
+
175
+ % soda encrypt-secret -h
176
+ Usage: soda encrypt-secret [OPTIONS] KEY_FILE MESSAGE_FILE
177
+
178
+ Encrypt Message (Secret).
179
+
180
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
181
+
182
+ Compression: zstd | zlib | bz2 | lzma | raw
183
+
184
+ Options:
185
+ --key-encoding TEXT [default: base64]
186
+ -e, --data-encoding TEXT [default: base64]
187
+ -c, --compression TEXT [default: zstd]
188
+ -o, --output-file FILE Write output to file.
189
+ --group-len INTEGER [default: 0]
190
+ --line-len INTEGER [default: 0]
191
+ --padding INTEGER [default: 0]
192
+ -v, --verbose Show verbose output.
193
+ -h, --help Show this message and exit.
194
+ ```
195
+
196
+ Another day, they share a password:
197
+
198
+ ```
199
+ % echo qwerty | soda encrypt-password - message -p interactive -o encrypted
200
+ % echo qwerty | soda decrypt-password - encrypted -p interactive -o message
201
+
202
+ % soda encrypt-password -h
203
+ Usage: soda encrypt-password [OPTIONS] PASSWORD_FILE MESSAGE_FILE
204
+
205
+ Encrypt Message (Password).
206
+
207
+ KDF profile: interactive | moderate | sensitive
208
+
209
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
210
+
211
+ Compression: zstd | zlib | bz2 | lzma | raw
212
+
213
+ Options:
214
+ -p, --kdf-profile TEXT [default: sensitive]
215
+ -e, --data-encoding TEXT [default: base64]
216
+ -c, --compression TEXT [default: zstd]
217
+ -o, --output-file FILE Write output to file.
218
+ --group-len INTEGER [default: 0]
219
+ --line-len INTEGER [default: 0]
220
+ --padding INTEGER [default: 0]
221
+ -v, --verbose Show verbose output.
222
+ -h, --help Show this message and exit.
223
+ ```
224
+
225
+
226
+ ## Key derivation
227
+
228
+ The KDF function derives the key from the password.
229
+ It accepts different profiles: interactive, moderate, and sensitive.
230
+
231
+ ```
232
+ % echo qwerty | soda kdf --profile interactive -
233
+ HqbvUXflAG+no3YS9njezZ3leyr8IwERAyeNoG2l41U=
234
+
235
+ % soda kdf -h
236
+ Usage: soda kdf [OPTIONS] PASSWORD_FILE
237
+
238
+ Key Derivation Function.
239
+
240
+ Encoding: base26 | base31 | base36 | base64 | base94 | binary
241
+
242
+ Profile: interactive | moderate | sensitive
243
+
244
+ Options:
245
+ -e, --encoding TEXT [default: base64]
246
+ -p, --profile TEXT [default: sensitive]
247
+ -o, --output-file FILE Write output to file.
248
+ --group-len INTEGER [default: 0]
249
+ --line-len INTEGER [default: 0]
250
+ --padding INTEGER [default: 0]
251
+ -h, --help Show this message and exit.
252
+ ```
253
+
254
+
255
+ ## Text compression
256
+
257
+ That works as follows:
258
+ 1. The plaintext is compressed with the compression lib
259
+ 2. The 16-byte MAC and 24-byte nonce are added
260
+ 3. The result is encoded with Base64, which adds ~25% overhead
261
+
262
+ ```
263
+ % soda es shared message -c zstd -v > /dev/null
264
+ Plaintext: 239
265
+ Ciphertext: 276
266
+ Overhead: 1.155
267
+ % soda es shared message -c zlib -v > /dev/null
268
+ Plaintext: 239
269
+ Ciphertext: 280
270
+ Overhead: 1.172
271
+ % soda es shared message -c bz2 -v > /dev/null
272
+ Plaintext: 239
273
+ Ciphertext: 340
274
+ Overhead: 1.423
275
+ % soda es shared message -c lzma -v > /dev/null
276
+ Plaintext: 239
277
+ Ciphertext: 324
278
+ Overhead: 1.356
279
+ % soda es shared message -c raw -v > /dev/null
280
+ Plaintext: 239
281
+ Ciphertext: 372
282
+ Overhead: 1.556
283
+ ```
284
+
285
+
286
+ ## Encoding
287
+
288
+ The rtty-soda supports various encodings:
289
+
290
+ ```
291
+ % soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --line-len 80
292
+ 9TPUZ T8OA3 PNC2Z XEH87 EPMCN NDQJJ GX0DE YW16D OJ2FC D3PCM B148K 6UZFN 9RQX7
293
+ 8C83X 6O8WS MQ4CX 26C7H 35EK5 CVSIX IFSVN KPV6A TRV1F 573WI JFFGE I7N3Z Z4N6D
294
+ FSSOB DJUBK PC2YW Z6RG0 SUD2N OIYH8 WHJMN YYSKQ EBEVJ ZT0M1 DYJ7E NJ25J FMXNE
295
+ 7LHUQ N5UIH SK5O7 96LWM IZ7BA R8SIV 6G55R Q50L4 PJH5Z 2JQNX JZTPK BG140 AKXOB
296
+ DKR4K POW9A HCQSQ JLSJ1 11AZY P8BM4 F3GUC SFX04 RMD0G 4V0PL RLRHN G8D8
297
+ ```
298
+
299
+
300
+ ## Compatibility
301
+
302
+ During the initial development (versions prior to 1.0.0),
303
+ I can break backwards compatibility.
304
+
305
+
306
+ ## Releases
307
+
308
+ This project follows a rolling release cycle.
309
+ Each version bump represents where I completed a full test cycle.
310
+ 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.0"
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]