rtty-soda 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
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.
- rtty_soda/cli_io.py +15 -23
- rtty_soda/main.py +78 -29
- rtty_soda/main.pyi +9 -4
- {rtty_soda-0.2.1.dist-info → rtty_soda-0.2.2.dist-info}/METADATA +30 -19
- {rtty_soda-0.2.1.dist-info → rtty_soda-0.2.2.dist-info}/RECORD +7 -7
- {rtty_soda-0.2.1.dist-info → rtty_soda-0.2.2.dist-info}/WHEEL +0 -0
- {rtty_soda-0.2.1.dist-info → rtty_soda-0.2.2.dist-info}/entry_points.txt +0 -0
rtty_soda/cli_io.py
CHANGED
|
@@ -64,25 +64,11 @@ def write_bytes_atomic(target: Path, data: bytes) -> None:
|
|
|
64
64
|
temp_path.replace(target)
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
def split_groups(data: str, group_len: int, line_len: int) -> str:
|
|
68
|
-
step = group_len
|
|
69
|
-
groups =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
i = 0
|
|
73
|
-
gpl = line_len // (step + 1)
|
|
74
|
-
for group in groups:
|
|
75
|
-
line.append(group)
|
|
76
|
-
i += 1
|
|
77
|
-
if i == gpl:
|
|
78
|
-
result.append(" ".join(line))
|
|
79
|
-
i = 0
|
|
80
|
-
line = []
|
|
81
|
-
|
|
82
|
-
if line:
|
|
83
|
-
result.append(" ".join(line))
|
|
84
|
-
|
|
85
|
-
return "\n".join(result)
|
|
67
|
+
def split_groups(data: str, group_len: int, line_len: int) -> tuple[str, int]:
|
|
68
|
+
step, gpl = group_len, line_len // (group_len + 1)
|
|
69
|
+
groups = [data[i : i + step] for i in range(0, len(data), step)]
|
|
70
|
+
lines = [" ".join(groups[i : i + gpl]) for i in range(0, len(groups), gpl)]
|
|
71
|
+
return "\n".join(lines), len(groups)
|
|
86
72
|
|
|
87
73
|
|
|
88
74
|
def pad_newlines(data: str, count: int) -> str:
|
|
@@ -90,15 +76,21 @@ def pad_newlines(data: str, count: int) -> str:
|
|
|
90
76
|
return padding + data.strip() + "\n" + padding
|
|
91
77
|
|
|
92
78
|
|
|
93
|
-
def format_output(
|
|
79
|
+
def format_output(
|
|
80
|
+
data: bytes, encoder: Encoder, group_len: int, line_len: int, padding: int
|
|
81
|
+
) -> tuple[bytes, int]:
|
|
82
|
+
groups = 1
|
|
83
|
+
if encoder.is_binary:
|
|
84
|
+
return data, groups
|
|
85
|
+
|
|
94
86
|
text = decode_bytes(data)
|
|
95
|
-
if
|
|
96
|
-
text = split_groups(text, group_len, line_len)
|
|
87
|
+
if 0 < group_len < line_len:
|
|
88
|
+
text, groups = split_groups(text, group_len, line_len)
|
|
97
89
|
|
|
98
90
|
if padding > 0:
|
|
99
91
|
text = pad_newlines(text, padding)
|
|
100
92
|
|
|
101
|
-
return encode_str(text)
|
|
93
|
+
return encode_str(text), groups
|
|
102
94
|
|
|
103
95
|
|
|
104
96
|
def write_output(target: Path | None, data: bytes) -> None:
|
rtty_soda/main.py
CHANGED
|
@@ -43,10 +43,16 @@ def cli() -> None:
|
|
|
43
43
|
@click.option("--encoding", "-e", default="base64", show_default=True)
|
|
44
44
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
45
45
|
@click.option("--group-len", default=0, show_default=True)
|
|
46
|
-
@click.option("--line-len", default=
|
|
46
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
47
47
|
@click.option("--padding", default=0, show_default=True)
|
|
48
|
+
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
48
49
|
def genkey_cmd(
|
|
49
|
-
encoding: str,
|
|
50
|
+
encoding: str,
|
|
51
|
+
output_file: Path | None,
|
|
52
|
+
group_len: int,
|
|
53
|
+
line_len: int,
|
|
54
|
+
padding: int,
|
|
55
|
+
verbose: bool,
|
|
50
56
|
) -> None:
|
|
51
57
|
"""Generate Private Key.
|
|
52
58
|
|
|
@@ -57,19 +63,23 @@ def genkey_cmd(
|
|
|
57
63
|
key = bytes(PrivateKey.generate())
|
|
58
64
|
key = enc.encode(key)
|
|
59
65
|
|
|
60
|
-
|
|
61
|
-
key =
|
|
62
|
-
|
|
66
|
+
key, groups = format_output(
|
|
67
|
+
data=key, encoder=enc, group_len=group_len, line_len=line_len, padding=padding
|
|
68
|
+
)
|
|
63
69
|
write_output(target=output_file, data=key)
|
|
64
70
|
|
|
71
|
+
if verbose:
|
|
72
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
73
|
+
|
|
65
74
|
|
|
66
75
|
@cli.command() # pyright: ignore[reportAny]
|
|
67
76
|
@click.argument("private_key_file", type=in_path)
|
|
68
77
|
@click.option("--encoding", "-e", default="base64", show_default=True)
|
|
69
78
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
70
79
|
@click.option("--group-len", default=0, show_default=True)
|
|
71
|
-
@click.option("--line-len", default=
|
|
80
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
72
81
|
@click.option("--padding", default=0, show_default=True)
|
|
82
|
+
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
73
83
|
def pubkey_cmd(
|
|
74
84
|
private_key_file: Path,
|
|
75
85
|
encoding: str,
|
|
@@ -77,6 +87,7 @@ def pubkey_cmd(
|
|
|
77
87
|
group_len: int,
|
|
78
88
|
line_len: int,
|
|
79
89
|
padding: int,
|
|
90
|
+
verbose: bool,
|
|
80
91
|
) -> None:
|
|
81
92
|
"""Get Public Key.
|
|
82
93
|
|
|
@@ -89,11 +100,14 @@ def pubkey_cmd(
|
|
|
89
100
|
pub = bytes(priv.public_key)
|
|
90
101
|
pub = enc.encode(pub)
|
|
91
102
|
|
|
92
|
-
|
|
93
|
-
pub =
|
|
94
|
-
|
|
103
|
+
pub, groups = format_output(
|
|
104
|
+
data=pub, encoder=enc, group_len=group_len, line_len=line_len, padding=padding
|
|
105
|
+
)
|
|
95
106
|
write_output(target=output_file, data=pub)
|
|
96
107
|
|
|
108
|
+
if verbose:
|
|
109
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
110
|
+
|
|
97
111
|
|
|
98
112
|
@cli.command() # pyright: ignore[reportAny]
|
|
99
113
|
@click.argument("password_file", type=in_path)
|
|
@@ -101,8 +115,9 @@ def pubkey_cmd(
|
|
|
101
115
|
@click.option("--profile", "-p", default="sensitive", show_default=True)
|
|
102
116
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
103
117
|
@click.option("--group-len", default=0, show_default=True)
|
|
104
|
-
@click.option("--line-len", default=
|
|
118
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
105
119
|
@click.option("--padding", default=0, show_default=True)
|
|
120
|
+
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
106
121
|
def kdf_cmd(
|
|
107
122
|
password_file: Path,
|
|
108
123
|
encoding: str,
|
|
@@ -111,6 +126,7 @@ def kdf_cmd(
|
|
|
111
126
|
group_len: int,
|
|
112
127
|
line_len: int,
|
|
113
128
|
padding: int,
|
|
129
|
+
verbose: bool,
|
|
114
130
|
) -> None:
|
|
115
131
|
"""Key Derivation Function.
|
|
116
132
|
|
|
@@ -125,11 +141,14 @@ def kdf_cmd(
|
|
|
125
141
|
key = kdf(password=pw, profile=prof)
|
|
126
142
|
key = enc.encode(key)
|
|
127
143
|
|
|
128
|
-
|
|
129
|
-
key =
|
|
130
|
-
|
|
144
|
+
key, groups = format_output(
|
|
145
|
+
data=key, encoder=enc, group_len=group_len, line_len=line_len, padding=padding
|
|
146
|
+
)
|
|
131
147
|
write_output(target=output_file, data=key)
|
|
132
148
|
|
|
149
|
+
if verbose:
|
|
150
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
151
|
+
|
|
133
152
|
|
|
134
153
|
@cli.command(aliases=["e"]) # pyright: ignore[reportAny]
|
|
135
154
|
@click.argument("private_key_file", type=in_path)
|
|
@@ -140,7 +159,7 @@ def kdf_cmd(
|
|
|
140
159
|
@click.option("--compression", "-c", default="zstd", show_default=True)
|
|
141
160
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
142
161
|
@click.option("--group-len", default=0, show_default=True)
|
|
143
|
-
@click.option("--line-len", default=
|
|
162
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
144
163
|
@click.option("--padding", default=0, show_default=True)
|
|
145
164
|
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
146
165
|
def encrypt_public_cmd(
|
|
@@ -175,12 +194,18 @@ def encrypt_public_cmd(
|
|
|
175
194
|
data = public.encrypt(private=priv, public=pub, data=data)
|
|
176
195
|
data = data_enc.encode(data)
|
|
177
196
|
|
|
178
|
-
|
|
179
|
-
data
|
|
180
|
-
|
|
197
|
+
data, groups = format_output(
|
|
198
|
+
data=data,
|
|
199
|
+
encoder=data_enc,
|
|
200
|
+
group_len=group_len,
|
|
201
|
+
line_len=line_len,
|
|
202
|
+
padding=padding,
|
|
203
|
+
)
|
|
181
204
|
write_output(target=output_file, data=data)
|
|
205
|
+
|
|
182
206
|
if verbose:
|
|
183
207
|
print_stats(plaintext=stats, ciphertext=data)
|
|
208
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
184
209
|
|
|
185
210
|
|
|
186
211
|
@cli.command(aliases=["es"]) # pyright: ignore[reportAny]
|
|
@@ -191,7 +216,7 @@ def encrypt_public_cmd(
|
|
|
191
216
|
@click.option("--compression", "-c", default="zstd", show_default=True)
|
|
192
217
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
193
218
|
@click.option("--group-len", default=0, show_default=True)
|
|
194
|
-
@click.option("--line-len", default=
|
|
219
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
195
220
|
@click.option("--padding", default=0, show_default=True)
|
|
196
221
|
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
197
222
|
def encrypt_secret_cmd(
|
|
@@ -222,12 +247,18 @@ def encrypt_secret_cmd(
|
|
|
222
247
|
data = secret.encrypt(key=key, data=data)
|
|
223
248
|
data = data_enc.encode(data)
|
|
224
249
|
|
|
225
|
-
|
|
226
|
-
data
|
|
227
|
-
|
|
250
|
+
data, groups = format_output(
|
|
251
|
+
data=data,
|
|
252
|
+
encoder=data_enc,
|
|
253
|
+
group_len=group_len,
|
|
254
|
+
line_len=line_len,
|
|
255
|
+
padding=padding,
|
|
256
|
+
)
|
|
228
257
|
write_output(target=output_file, data=data)
|
|
258
|
+
|
|
229
259
|
if verbose:
|
|
230
260
|
print_stats(plaintext=stats, ciphertext=data)
|
|
261
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
231
262
|
|
|
232
263
|
|
|
233
264
|
@cli.command(aliases=["ep"]) # pyright: ignore[reportAny]
|
|
@@ -238,7 +269,7 @@ def encrypt_secret_cmd(
|
|
|
238
269
|
@click.option("--compression", "-c", default="zstd", show_default=True)
|
|
239
270
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
240
271
|
@click.option("--group-len", default=0, show_default=True)
|
|
241
|
-
@click.option("--line-len", default=
|
|
272
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
242
273
|
@click.option("--padding", default=0, show_default=True)
|
|
243
274
|
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
244
275
|
def encrypt_password_cmd(
|
|
@@ -272,12 +303,18 @@ def encrypt_password_cmd(
|
|
|
272
303
|
data = secret.encrypt(key=key, data=data)
|
|
273
304
|
data = data_enc.encode(data)
|
|
274
305
|
|
|
275
|
-
|
|
276
|
-
data
|
|
277
|
-
|
|
306
|
+
data, groups = format_output(
|
|
307
|
+
data=data,
|
|
308
|
+
encoder=data_enc,
|
|
309
|
+
group_len=group_len,
|
|
310
|
+
line_len=line_len,
|
|
311
|
+
padding=padding,
|
|
312
|
+
)
|
|
278
313
|
write_output(target=output_file, data=data)
|
|
314
|
+
|
|
279
315
|
if verbose:
|
|
280
316
|
print_stats(plaintext=stats, ciphertext=data)
|
|
317
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
281
318
|
|
|
282
319
|
|
|
283
320
|
@cli.command(aliases=["d"]) # pyright: ignore[reportAny]
|
|
@@ -319,6 +356,7 @@ def decrypt_public_cmd(
|
|
|
319
356
|
data = unarchiver(data)
|
|
320
357
|
|
|
321
358
|
write_output(target=output_file, data=data)
|
|
359
|
+
|
|
322
360
|
if verbose:
|
|
323
361
|
print_stats(plaintext=data, ciphertext=stats)
|
|
324
362
|
|
|
@@ -357,6 +395,7 @@ def decrypt_secret_cmd(
|
|
|
357
395
|
data = unarchiver(data)
|
|
358
396
|
|
|
359
397
|
write_output(target=output_file, data=data)
|
|
398
|
+
|
|
360
399
|
if verbose:
|
|
361
400
|
print_stats(plaintext=data, ciphertext=stats)
|
|
362
401
|
|
|
@@ -398,6 +437,7 @@ def decrypt_password_cmd(
|
|
|
398
437
|
data = unarchiver(data)
|
|
399
438
|
|
|
400
439
|
write_output(target=output_file, data=data)
|
|
440
|
+
|
|
401
441
|
if verbose:
|
|
402
442
|
print_stats(plaintext=data, ciphertext=stats)
|
|
403
443
|
|
|
@@ -408,8 +448,9 @@ def decrypt_password_cmd(
|
|
|
408
448
|
@click.argument("file", type=in_path)
|
|
409
449
|
@click.option("--output-file", "-o", type=out_path, help="Write output to file.")
|
|
410
450
|
@click.option("--group-len", default=0, show_default=True)
|
|
411
|
-
@click.option("--line-len", default=
|
|
451
|
+
@click.option("--line-len", default=80, show_default=True)
|
|
412
452
|
@click.option("--padding", default=0, show_default=True)
|
|
453
|
+
@click.option("--verbose", "-v", is_flag=True, help="Show verbose output.")
|
|
413
454
|
def encode_cmd(
|
|
414
455
|
in_encoding: str,
|
|
415
456
|
out_encoding: str,
|
|
@@ -418,6 +459,7 @@ def encode_cmd(
|
|
|
418
459
|
group_len: int,
|
|
419
460
|
line_len: int,
|
|
420
461
|
padding: int,
|
|
462
|
+
verbose: bool,
|
|
421
463
|
) -> None:
|
|
422
464
|
"""Encode File.
|
|
423
465
|
|
|
@@ -430,11 +472,18 @@ def encode_cmd(
|
|
|
430
472
|
data = in_enc.decode(data)
|
|
431
473
|
data = out_enc.encode(data)
|
|
432
474
|
|
|
433
|
-
|
|
434
|
-
data
|
|
435
|
-
|
|
475
|
+
data, groups = format_output(
|
|
476
|
+
data=data,
|
|
477
|
+
encoder=out_enc,
|
|
478
|
+
group_len=group_len,
|
|
479
|
+
line_len=line_len,
|
|
480
|
+
padding=padding,
|
|
481
|
+
)
|
|
436
482
|
write_output(target=output_file, data=data)
|
|
437
483
|
|
|
484
|
+
if verbose:
|
|
485
|
+
click.echo(f"Groups: {groups}", err=True)
|
|
486
|
+
|
|
438
487
|
|
|
439
488
|
if __name__ == "__main__":
|
|
440
489
|
cli()
|
rtty_soda/main.pyi
CHANGED
|
@@ -2,7 +2,12 @@ from pathlib import Path
|
|
|
2
2
|
|
|
3
3
|
def cli() -> None: ...
|
|
4
4
|
def genkey_cmd(
|
|
5
|
-
encoding: str,
|
|
5
|
+
encoding: str,
|
|
6
|
+
output_file: Path | None,
|
|
7
|
+
group_len: int,
|
|
8
|
+
line_len: int,
|
|
9
|
+
padding: int,
|
|
10
|
+
verbose: bool,
|
|
6
11
|
) -> None: ...
|
|
7
12
|
def pubkey_cmd(
|
|
8
13
|
private_key_file: Path,
|
|
@@ -11,6 +16,7 @@ def pubkey_cmd(
|
|
|
11
16
|
group_len: int,
|
|
12
17
|
line_len: int,
|
|
13
18
|
padding: int,
|
|
19
|
+
verbose: bool,
|
|
14
20
|
) -> None: ...
|
|
15
21
|
def kdf_cmd(
|
|
16
22
|
password_file: Path,
|
|
@@ -20,6 +26,7 @@ def kdf_cmd(
|
|
|
20
26
|
group_len: int,
|
|
21
27
|
line_len: int,
|
|
22
28
|
padding: int,
|
|
29
|
+
verbose: bool,
|
|
23
30
|
) -> None: ...
|
|
24
31
|
def encrypt_public_cmd(
|
|
25
32
|
private_key_file: Path,
|
|
@@ -66,7 +73,6 @@ def decrypt_public_cmd(
|
|
|
66
73
|
data_encoding: str,
|
|
67
74
|
compression: str,
|
|
68
75
|
output_file: Path | None,
|
|
69
|
-
padding: int,
|
|
70
76
|
verbose: bool,
|
|
71
77
|
) -> None: ...
|
|
72
78
|
def decrypt_secret_cmd(
|
|
@@ -76,7 +82,6 @@ def decrypt_secret_cmd(
|
|
|
76
82
|
data_encoding: str,
|
|
77
83
|
compression: str,
|
|
78
84
|
output_file: Path | None,
|
|
79
|
-
padding: int,
|
|
80
85
|
verbose: bool,
|
|
81
86
|
) -> None: ...
|
|
82
87
|
def decrypt_password_cmd(
|
|
@@ -86,7 +91,6 @@ def decrypt_password_cmd(
|
|
|
86
91
|
data_encoding: str,
|
|
87
92
|
compression: str,
|
|
88
93
|
output_file: Path | None,
|
|
89
|
-
padding: int,
|
|
90
94
|
verbose: bool,
|
|
91
95
|
) -> None: ...
|
|
92
96
|
def encode_cmd(
|
|
@@ -97,4 +101,5 @@ def encode_cmd(
|
|
|
97
101
|
group_len: int,
|
|
98
102
|
line_len: int,
|
|
99
103
|
padding: int,
|
|
104
|
+
verbose: bool,
|
|
100
105
|
) -> None: ...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: rtty-soda
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl
|
|
5
5
|
Keywords: cli,encryption,libsodium,nacl,rtty
|
|
6
6
|
Author: Theo Saveliev
|
|
@@ -57,8 +57,8 @@ A CLI tool for Unix-like environments to encrypt a RTTY session using NaCl.
|
|
|
57
57
|
#### Docker
|
|
58
58
|
|
|
59
59
|
```
|
|
60
|
-
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.
|
|
61
|
-
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.
|
|
60
|
+
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.2
|
|
61
|
+
% docker run -it --rm -h rtty-soda -v .:/app/host nett/rtty-soda:0.2.2-tools
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
|
|
@@ -112,8 +112,9 @@ Options:
|
|
|
112
112
|
-e, --encoding TEXT [default: base64]
|
|
113
113
|
-o, --output-file FILE Write output to file.
|
|
114
114
|
--group-len INTEGER [default: 0]
|
|
115
|
-
--line-len INTEGER [default:
|
|
115
|
+
--line-len INTEGER [default: 80]
|
|
116
116
|
--padding INTEGER [default: 0]
|
|
117
|
+
-v, --verbose Show verbose output.
|
|
117
118
|
-h, --help Show this message and exit.
|
|
118
119
|
```
|
|
119
120
|
|
|
@@ -128,11 +129,11 @@ transmit text messages in Morse code in a telegraphy system.
|
|
|
128
129
|
The first telegraph key was invented by Alfred Vail, an associate of Samuel Morse.
|
|
129
130
|
(c) Wikipedia
|
|
130
131
|
|
|
131
|
-
% soda encrypt-public alice bob_pub message --
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/
|
|
135
|
-
|
|
132
|
+
% soda encrypt-public alice bob_pub message --group-len 79 | tee encrypted
|
|
133
|
+
q+zCgyCfHdlSHrcuyM/Yfw1+ZvqNRXgY0O7gGrauPyQlsI0MdPXoVlkfyKZUtg6Jcqn47d4BGLMBITo
|
|
134
|
+
y3Wp9+9FvI1rolCd7JmyIxRIHHYWqxux+czh88aDdGjbDQ2pRNX68TU33PylBDw/H+VfYSZ6fyw1xdJ
|
|
135
|
+
005pJeEXCzpOXljvXMgAElBIFJ/vsluunrRI9Sw6WcnrCsPYFxTFRZVOvsq6U8PJwnhnaDyLW0Z28Op
|
|
136
|
+
dS71gNH/7xA7P1LbFwxSD0jAjDqPZdLYkPzd94=
|
|
136
137
|
|
|
137
138
|
% soda encrypt-public -h
|
|
138
139
|
Usage: soda encrypt-public [OPTIONS] PRIVATE_KEY_FILE PUBLIC_KEY_FILE
|
|
@@ -150,7 +151,7 @@ Options:
|
|
|
150
151
|
-c, --compression TEXT [default: zstd]
|
|
151
152
|
-o, --output-file FILE Write output to file.
|
|
152
153
|
--group-len INTEGER [default: 0]
|
|
153
|
-
--line-len INTEGER [default:
|
|
154
|
+
--line-len INTEGER [default: 80]
|
|
154
155
|
--padding INTEGER [default: 0]
|
|
155
156
|
-v, --verbose Show verbose output.
|
|
156
157
|
-h, --help Show this message and exit.
|
|
@@ -209,7 +210,7 @@ Options:
|
|
|
209
210
|
-c, --compression TEXT [default: zstd]
|
|
210
211
|
-o, --output-file FILE Write output to file.
|
|
211
212
|
--group-len INTEGER [default: 0]
|
|
212
|
-
--line-len INTEGER [default:
|
|
213
|
+
--line-len INTEGER [default: 80]
|
|
213
214
|
--padding INTEGER [default: 0]
|
|
214
215
|
-v, --verbose Show verbose output.
|
|
215
216
|
-h, --help Show this message and exit.
|
|
@@ -238,7 +239,7 @@ Options:
|
|
|
238
239
|
-c, --compression TEXT [default: zstd]
|
|
239
240
|
-o, --output-file FILE Write output to file.
|
|
240
241
|
--group-len INTEGER [default: 0]
|
|
241
|
-
--line-len INTEGER [default:
|
|
242
|
+
--line-len INTEGER [default: 80]
|
|
242
243
|
--padding INTEGER [default: 0]
|
|
243
244
|
-v, --verbose Show verbose output.
|
|
244
245
|
-h, --help Show this message and exit.
|
|
@@ -268,8 +269,9 @@ Options:
|
|
|
268
269
|
-p, --profile TEXT [default: sensitive]
|
|
269
270
|
-o, --output-file FILE Write output to file.
|
|
270
271
|
--group-len INTEGER [default: 0]
|
|
271
|
-
--line-len INTEGER [default:
|
|
272
|
+
--line-len INTEGER [default: 80]
|
|
272
273
|
--padding INTEGER [default: 0]
|
|
274
|
+
-v, --verbose Show verbose output.
|
|
273
275
|
-h, --help Show this message and exit.
|
|
274
276
|
```
|
|
275
277
|
|
|
@@ -286,22 +288,27 @@ That works as follows:
|
|
|
286
288
|
Plaintext: 239
|
|
287
289
|
Ciphertext: 276
|
|
288
290
|
Overhead: 1.155
|
|
291
|
+
Groups: 1
|
|
289
292
|
% soda es shared message -c zlib -v > /dev/null
|
|
290
293
|
Plaintext: 239
|
|
291
294
|
Ciphertext: 280
|
|
292
295
|
Overhead: 1.172
|
|
296
|
+
Groups: 1
|
|
293
297
|
% soda es shared message -c bz2 -v > /dev/null
|
|
294
298
|
Plaintext: 239
|
|
295
299
|
Ciphertext: 340
|
|
296
300
|
Overhead: 1.423
|
|
301
|
+
Groups: 1
|
|
297
302
|
% soda es shared message -c lzma -v > /dev/null
|
|
298
303
|
Plaintext: 239
|
|
299
304
|
Ciphertext: 324
|
|
300
305
|
Overhead: 1.356
|
|
306
|
+
Groups: 1
|
|
301
307
|
% soda es shared message -c raw -v > /dev/null
|
|
302
308
|
Plaintext: 239
|
|
303
309
|
Ciphertext: 372
|
|
304
310
|
Overhead: 1.556
|
|
311
|
+
Groups: 1
|
|
305
312
|
```
|
|
306
313
|
|
|
307
314
|
|
|
@@ -310,12 +317,16 @@ Overhead: 1.556
|
|
|
310
317
|
The rtty-soda supports various encodings:
|
|
311
318
|
|
|
312
319
|
```
|
|
313
|
-
% soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
320
|
+
% soda encrypt-public alice bob_pub message --data-encoding base36 --group-len 5 --verbose
|
|
321
|
+
D0MQT LF0K5 N997D JJXZ9 K85DJ DCEIF 3I2BN GCYOG KN02L 5TPKE 4UV25 AKD0R O9BKS
|
|
322
|
+
6Y40L T2NET GQKXA B4C4X 6J88W N4HZK 5ACFE 8JWTC UZJBH LRXPE CJLL5 N8L2I BX2NS
|
|
323
|
+
D9LYW H6EAT 1J2OA IHZC3 8L2JM 6XLS9 5M6Y2 E9FLU GHDVB WZWK7 WC2RQ OLQH6 OT725
|
|
324
|
+
706MK ZSU6O V6PWA UHOTM XVFSK HE3OO M4E51 4R00I U3YL8 FJXFQ PZLM8 WYO6Z 50G5Q
|
|
325
|
+
SM6BH GT1T7 ZBSDB 8COJ6 7DXCF K7T36 RSU06 6R9AS J7TEA D9BT7 Q8BCG D4YX
|
|
326
|
+
Plaintext: 239
|
|
327
|
+
Ciphertext: 382
|
|
328
|
+
Overhead: 1.598
|
|
329
|
+
Groups: 64
|
|
319
330
|
```
|
|
320
331
|
|
|
321
332
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
rtty_soda/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
rtty_soda/archivers.py,sha256=b-qZ6-MAY1rm1Jsosi2XEfjNjkU7acAedHmnSzthf-A,1343
|
|
3
|
-
rtty_soda/cli_io.py,sha256=
|
|
3
|
+
rtty_soda/cli_io.py,sha256=feBDGyr-DQw8ALmsChM6V-MfusXdvv-2yE-It53w8JE,3064
|
|
4
4
|
rtty_soda/cryptography/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
rtty_soda/cryptography/kdf.py,sha256=HymfTiK7BD7lhZu0OdtFW_i-v0r7e8XedT8_Q84ClJc,1529
|
|
6
6
|
rtty_soda/cryptography/public.py,sha256=6gwsT4ilaMDHwtdYPOEYlX8IfwHPew8lMIbxRva1mLs,612
|
|
@@ -14,10 +14,10 @@ rtty_soda/encoders/base94_encoder.py,sha256=Xbt0chbeAIM9_nRHVhRMVfMBUKS9q1gNSpg2
|
|
|
14
14
|
rtty_soda/encoders/encoder.py,sha256=trHunjg0uNEQrQWTpRMY5nQEx5_jBrcvfUAcGIKpgms,220
|
|
15
15
|
rtty_soda/encoders/functions.py,sha256=JxtgbZg3kdbFqAhjm59QwJS6zEXYsR1m02k7cg_rFI4,1385
|
|
16
16
|
rtty_soda/encoders/raw_encoder.py,sha256=eJnUSsxf3jichdQ5LqwvBZAX7-qk67p5FMlfKOOGHp8,259
|
|
17
|
-
rtty_soda/main.py,sha256=
|
|
18
|
-
rtty_soda/main.pyi,sha256=
|
|
17
|
+
rtty_soda/main.py,sha256=yjEUe6pwIX_M6HfJ6ujCbYPElknW3zivKOLOSh8Q2h0,15891
|
|
18
|
+
rtty_soda/main.pyi,sha256=SoTM1GXACRafCtwwLOI1X9YhvEo3DPoaPtKSgWacSS0,2242
|
|
19
19
|
rtty_soda/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
rtty_soda-0.2.
|
|
21
|
-
rtty_soda-0.2.
|
|
22
|
-
rtty_soda-0.2.
|
|
23
|
-
rtty_soda-0.2.
|
|
20
|
+
rtty_soda-0.2.2.dist-info/WHEEL,sha256=M6du7VZflc4UPsGphmOXHANdgk8zessdJG0DBUuoA-U,78
|
|
21
|
+
rtty_soda-0.2.2.dist-info/entry_points.txt,sha256=tFROKkaDoE_p5tM2ko7MoAjWBFurchcw3j-MdObxBU0,45
|
|
22
|
+
rtty_soda-0.2.2.dist-info/METADATA,sha256=acIyNel7hAHcz1bsJmEWslmVefPFMYd4DT1CnAbKLno,9820
|
|
23
|
+
rtty_soda-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|