yace-codec 0.2.1__tar.gz → 0.3.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.
- {yace_codec-0.2.1 → yace_codec-0.3.0}/CHANGELOG.md +97 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/MANIFEST.in +2 -0
- yace_codec-0.3.0/PKG-INFO +852 -0
- yace_codec-0.3.0/README.md +809 -0
- yace_codec-0.3.0/SECURITY.md +213 -0
- yace_codec-0.3.0/examples/encryption.py +30 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/pyproject.toml +27 -11
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/__init__.py +27 -2
- yace_codec-0.3.0/src/yace_codec/_algorithms.py +263 -0
- yace_codec-0.3.0/src/yace_codec/_files.py +120 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/_text.py +14 -8
- yace_codec-0.3.0/src/yace_codec/_winsec.py +164 -0
- yace_codec-0.3.0/src/yace_codec/cli.py +711 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/codec.py +404 -51
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/errors.py +14 -0
- yace_codec-0.3.0/src/yace_codec/keybackends.py +439 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/keystore.py +223 -57
- yace_codec-0.3.0/src/yace_codec/sealed.py +974 -0
- yace_codec-0.3.0/src/yace_codec.egg-info/PKG-INFO +852 -0
- yace_codec-0.3.0/src/yace_codec.egg-info/SOURCES.txt +56 -0
- yace_codec-0.3.0/src/yace_codec.egg-info/requires.txt +12 -0
- yace_codec-0.3.0/tests/conftest.py +122 -0
- yace_codec-0.3.0/tests/fixtures/legacy_keystore.json +1235 -0
- yace_codec-0.3.0/tests/fixtures/legacy_tokens.json +350 -0
- yace_codec-0.3.0/tests/legacy_reference.py +74 -0
- yace_codec-0.3.0/tests/test_aad.py +69 -0
- yace_codec-0.3.0/tests/test_cli.py +264 -0
- yace_codec-0.3.0/tests/test_cli_encryption.py +270 -0
- yace_codec-0.3.0/tests/test_cli_robustness.py +128 -0
- yace_codec-0.3.0/tests/test_codec.py +462 -0
- yace_codec-0.3.0/tests/test_examples.py +38 -0
- yace_codec-0.3.0/tests/test_format.py +284 -0
- yace_codec-0.3.0/tests/test_key_backends.py +219 -0
- yace_codec-0.3.0/tests/test_key_store_robustness.py +204 -0
- yace_codec-0.3.0/tests/test_keystore.py +411 -0
- yace_codec-0.3.0/tests/test_malformed.py +91 -0
- yace_codec-0.3.0/tests/test_output_format.py +195 -0
- yace_codec-0.3.0/tests/test_properties.py +61 -0
- yace_codec-0.3.0/tests/test_raw_keys.py +79 -0
- yace_codec-0.3.0/tests/test_robustness.py +264 -0
- yace_codec-0.3.0/tests/test_spec_independent.py +117 -0
- yace_codec-0.3.0/tests/test_stream.py +318 -0
- yace_codec-0.3.0/tests/test_tables.py +198 -0
- yace_codec-0.3.0/tests/test_vectors.py +70 -0
- yace_codec-0.3.0/tests/vectors/generate.py +114 -0
- yace_codec-0.3.0/tests/vectors/legacy.json +42 -0
- yace_codec-0.3.0/tests/vectors/v3.json +491 -0
- yace_codec-0.2.1/PKG-INFO +0 -862
- yace_codec-0.2.1/README.md +0 -829
- yace_codec-0.2.1/src/yace_codec/cli.py +0 -416
- yace_codec-0.2.1/src/yace_codec/sealed.py +0 -257
- yace_codec-0.2.1/src/yace_codec.egg-info/PKG-INFO +0 -862
- yace_codec-0.2.1/src/yace_codec.egg-info/SOURCES.txt +0 -23
- {yace_codec-0.2.1 → yace_codec-0.3.0}/LICENSE +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/examples/bytes_and_unicode.py +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/examples/quickstart.py +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/examples/share_tables.py +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/setup.cfg +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/__main__.py +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/py.typed +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec/tables.py +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec.egg-info/dependency_links.txt +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec.egg-info/entry_points.txt +0 -0
- {yace_codec-0.2.1 → yace_codec-0.3.0}/src/yace_codec.egg-info/top_level.txt +0 -0
|
@@ -4,6 +4,98 @@ All notable changes to this project are documented in this file. The format foll
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.3.0] - 2026-10-16
|
|
8
|
+
|
|
9
|
+
Output of 0.3.0 cannot be decrypted by 0.2.x. Everything 0.2.x made still decrypts.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Versioned format.** Messages (format 3) and streams (format 4) carry a version
|
|
14
|
+
byte, an algorithm id, and four check bytes, authenticated by the tag and hidden
|
|
15
|
+
under a key-derived mask: output still has no recognisable prefix, and a wrong key
|
|
16
|
+
or secret token is rejected from the header alone. SECURITY.md specifies both
|
|
17
|
+
formats byte by byte.
|
|
18
|
+
- **Algorithms:** `aes-256-gcm` (the default) and `chacha20-poly1305` from the
|
|
19
|
+
audited `cryptography` package, and the standard-library `yace-hmac-sha256`. Every
|
|
20
|
+
algorithm has a 16-byte tag, so output length does not reveal the algorithm.
|
|
21
|
+
Choose with `algorithm=` or `--algorithm`; list them with `algorithms()` or
|
|
22
|
+
`yace-codec algorithms`.
|
|
23
|
+
- **Associated data:** `aad=` (and `--aad`) binds output to a context; a wrong `aad`
|
|
24
|
+
raises `DecryptionError`.
|
|
25
|
+
- **Raw keys:** `encrypt(data, key=<32 bytes>)`, `decrypt(out, keys=[...])`, and
|
|
26
|
+
`generate_key()`, with no key store and no scrypt. Other key sizes raise the new
|
|
27
|
+
`InvalidKeyError`.
|
|
28
|
+
- **Output format:** `output="bytes"` (and `--format bytes`) gives raw output with no
|
|
29
|
+
expansion; `"text"` stays the default. `decrypt()` accepts both.
|
|
30
|
+
- **Streaming:** `encrypt_stream()` and `decrypt_stream()` encrypt files of any size in
|
|
31
|
+
constant memory, in chunks whose nonces hold the chunk index and a final flag, so
|
|
32
|
+
truncation, reordering, and duplication are detected. `decrypt()` also reads
|
|
33
|
+
streams, and `decrypt_stream()` reads every format.
|
|
34
|
+
- **Key backends:** the `KeyBackend` interface, `Codec(key_backend=...)` (an object
|
|
35
|
+
or a name), `open_key_backend()`, and `--key-backend`; `DpapiKeyStore` (Windows;
|
|
36
|
+
keys encrypted with DPAPI) and `KeyringKeyStore` (the system keyring;
|
|
37
|
+
`pip install "yace-codec[keyring]"`).
|
|
38
|
+
- **Key rotation and deletion:** `rotate_key()` / `yace-codec keys rotate` keep the
|
|
39
|
+
previous key for decryption; `delete_key()` / `yace-codec keys delete --yes`.
|
|
40
|
+
- **Command line:** `--token-file PATH` and `--token-stdin`; `encrypt` and `decrypt`
|
|
41
|
+
stream files in constant memory (`encrypt` always writes the stream format).
|
|
42
|
+
- New names: `DEFAULT_ALGORITHM`, `DEFAULT_CHUNK_SIZE`, `KEY_SIZE`,
|
|
43
|
+
`MAX_MESSAGE_SIZE`, `AlgorithmInfo`, `StreamInfo`, `KeyBackend`,
|
|
44
|
+
`KeyNotFoundError`, and the `Codec.key_backend` attribute.
|
|
45
|
+
- `SECURITY.md` with the threat model, the format specification, supported versions,
|
|
46
|
+
and how to report a vulnerability privately.
|
|
47
|
+
- The test suite ships in the sdist and runs in CI on Linux, Windows, and macOS for
|
|
48
|
+
Python 3.10–3.15, against the built wheel and the oldest supported dependencies:
|
|
49
|
+
test vectors for every algorithm and format (`tests/vectors/`), an independent
|
|
50
|
+
implementation that decrypts them, property tests, and tamper, stream, concurrency,
|
|
51
|
+
and legacy tests. `benchmarks/bench.py` reports throughput.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- **The default algorithm is now `aes-256-gcm`**, and `cryptography` is a dependency.
|
|
56
|
+
(0.2.x used an HMAC-SHA256 construction; it remains available as
|
|
57
|
+
`yace-hmac-sha256`.)
|
|
58
|
+
- Python 3.10 or newer is required (3.9 reached end of life in October 2025).
|
|
59
|
+
- Every bad argument raises a `YaceError` subclass (or `TypeError`), and every
|
|
60
|
+
argument is checked before a stored key is created.
|
|
61
|
+
- Command line:
|
|
62
|
+
- every `-o` writes a temporary file that replaces the target only on success;
|
|
63
|
+
- decrypted and decoded files, and exported keys and tables, are created readable
|
|
64
|
+
only by you;
|
|
65
|
+
- usage mistakes (bad `--max-age`, `-l`, `-i`, or `--key`, and conflicting inputs)
|
|
66
|
+
exit with status 2;
|
|
67
|
+
- abbreviated option names are no longer accepted;
|
|
68
|
+
- `--token-file` reads UTF-16 files with a byte order mark (PowerShell);
|
|
69
|
+
- `--token` fails at once without a terminal;
|
|
70
|
+
- `keys rotate` refuses a key that does not exist;
|
|
71
|
+
- with `--key-backend dpapi`, `-k` names the key store and the keys go in
|
|
72
|
+
`keys-dpapi.json` next to it.
|
|
73
|
+
- New key store files are readable only by their owner on Windows too (an
|
|
74
|
+
access control list for you and SYSTEM, with nothing inherited).
|
|
75
|
+
- Stored keys can have a `retired` list after rotation. Version 0.2 ignores it, so
|
|
76
|
+
after a rotation 0.2 can no longer decrypt data made with the old key.
|
|
77
|
+
- Text output encodes about twice as fast.
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
|
|
81
|
+
- Readers no longer see an empty key store while another process replaces it on
|
|
82
|
+
Windows.
|
|
83
|
+
- A damaged key entry no longer blocks decryption with the other keys.
|
|
84
|
+
- `decode()` rejects tokens longer than the encoder can make, instead of using
|
|
85
|
+
gigabytes of memory.
|
|
86
|
+
|
|
87
|
+
### Deprecated
|
|
88
|
+
|
|
89
|
+
- The `YACE_CODEC_TOKEN` and `YACE_CODEC_PASSWORD` environment variables still work
|
|
90
|
+
with `--token`, but print a warning. Use the prompt, `--token-file`, or
|
|
91
|
+
`--token-stdin`.
|
|
92
|
+
|
|
93
|
+
### Security
|
|
94
|
+
|
|
95
|
+
- Releases publish only after the full test suite passes. They are built with
|
|
96
|
+
hash-pinned tools and actions pinned to commits, reproducibly, and publish build
|
|
97
|
+
provenance attestations.
|
|
98
|
+
|
|
7
99
|
## [0.2.1] - 2026-10-15
|
|
8
100
|
|
|
9
101
|
### Added
|
|
@@ -112,3 +204,8 @@ First release on PyPI, as `yace-codec` (import name `yace_codec`).
|
|
|
112
204
|
- The deprecated `encoder (beta).py` and the unfinished `analyzer.py` file encoder
|
|
113
205
|
(use `yace-codec encode FILE` or `--binary` instead).
|
|
114
206
|
- Scratch files unrelated to the encoder, and compiled `__pycache__` files.
|
|
207
|
+
|
|
208
|
+
[0.3.0]: https://github.com/thisismudith/YACE/compare/v0.2.1...v0.3.0
|
|
209
|
+
[0.2.1]: https://github.com/thisismudith/YACE/compare/v0.2.0...v0.2.1
|
|
210
|
+
[0.2.0]: https://github.com/thisismudith/YACE/compare/v0.1.0...v0.2.0
|
|
211
|
+
[0.1.0]: https://github.com/thisismudith/YACE/releases/tag/v0.1.0
|