Commit Graph
75 Commits
Author SHA1 Message Date
LeoVasanko 972c3053d9 Require Python 3.12+; drop PyPy and 3.10/3.11 wheel builds
- requires-python >= 3.12; abi3 limited API tag cp310 -> cp312
- util.Buffer now imported directly from collections.abc (no fallback)
- release.py: ABI3 wheel covers 3.12-3.15; PyPy wheels dropped (PyPy
  has no 3.12 support yet)
2026-10-04 05:42:22 +00:00
LeoVasanko 199dfe7bd9 generate.py: run ruff format on generated files
Running generate.py standalone previously rewrote _ciphers.py with
formatting that differed from the committed (ruff-formatted) style,
creating spurious diffs. release.py already ran ruff after generation;
now generate.py does too, so both entry points leave the tree in the
same state.
2026-10-04 05:41:14 +00:00
LeoVasanko e01d84a560 Add RAF (random-access encrypted file) support and aeg.random CSPRNG
Implement Python bindings for the libaegis 0.10.6 RAF API:

- Thin per-variant wrappers (raf_create/open/read/write/truncate/size/
  sync/close, merkle_rebuild/verify/commitment) generated from a template
  in tools/generate.py, with errno-mapped exceptions.
- aeg.raf: high-level file-like API (Raf, create/open/probe,
  derive_master_key) with pluggable Storage backends (FileStorage,
  BytesIOStorage) and Merkle tree integrity via a MerkleHasher protocol
  (SHA256MerkleHasher default), adapted from pyaegis (MIT).
- aeg.random: CSPRNG facility. Random produces AEGIS keystream seeded
  once from the OS, exposed per cipher module as cipher.random() and
  usable as the RAF RNG (as_raf_rng) or standalone RandomSource.
- Tests: roundtrip/random-access/seek/truncate/Merkle coverage for all
  six variants, pyaegis-style API checks, and a Merkle fuzz test.
2026-10-04 04:25:59 +00:00
LeoVasanko e70c7a37d2 Update libaegis submodule 0.9.0 -> 0.10.6
89 upstream commits: Zig 0.16 compat, symbol namespacing, opaque state
structs, new stream_xor and random-access file APIs. Regenerated
aegis_cdef.h; Python modules unchanged. Full release build verified:
5 wheels + sdist, tests/benchmarks pass on all 10 Python versions.
2026-10-04 02:58:47 +00:00
LeoVasanko 0cb7faf698 Add Gitea release workflow: per-platform wheel builds, then publish to PyPI
Matrix job builds and tests wheels on linux/macos/windows (no Gitea
release, unlike mediahive); publish job uploads the merged dist/ to PyPI
only after all platforms succeed. release.py gains --no-upload for the
matrix jobs.
2026-10-04 02:54:30 +00:00
LeoVasanko a1bfeb2434 Build updated for upstream libaegis 0.9.0 simplified API with matching changes on Python side. Set lower MacOS build target (11.0). Build abi3 version for all supported Python versions, reducing the number of wheels. Other build cleanup. v0.9.0 2026-01-10 20:23:37 +00:00
LeoVasanko a26ce6a9fb Considered stable from here onwards. 2026-01-10 20:22:44 +00:00
LeoVasanko 7e6a5bf52a Allow the cipher() function also work without prefix aegis 2026-01-04 14:25:39 +00:00
LeoVasanko 8018e68274 Add nonce_increment and wipe functions on typing. 2026-01-04 14:19:01 +00:00
LeoVasanko ccccfd7918 README: Add the new aeg.cipher() function for fetching variants. 2025-12-31 22:51:19 +00:00
LeoVasanko 4de66b6bc6 [packaging] Release script: Fix further problems with freethreaded wheels and a variable name overlap. 2025-12-31 22:30:28 +00:00
LeoVasanko 66338ef416 [packaging] Fix wheel curing for pypy-linux. v0.4.3 2025-12-31 21:59:37 +00:00
LeoVasanko 509898ac73 Make tool scripts executable. v0.4.2 2025-12-31 21:43:25 +00:00
LeoVasanko 67ec091bc5 Add aeg.cipher(alg) for loading modules by name in str. Added aeg.CIPHERS mapping of the nominal names to module names and Cipher for typing literals. 2025-12-31 21:38:30 +00:00
LeoVasanko 4977a7e79d Added free-threaded non-GIL Python and PyPy wheels, up to 3.15 now. 2025-12-31 21:24:56 +00:00
LeoVasanko d7acf7a315 [release script] Auditwheel only on Linux. v0.4.1 2025-12-23 19:38:59 +00:00
LeoVasanko 7f01de8327 Add README for PyPI. 2025-12-23 19:33:00 +00:00
LeoVasanko 9294fba86d Make manylinux wheels. 2025-12-23 19:20:17 +00:00
LeoVasanko 348812e750 Clean up for release. v0.4.0 2025-12-23 19:09:59 +00:00
LeoVasanko 22dff32b22 Clean up for release. 2025-12-23 19:08:10 +00:00
LeoVasanko 178b689a35 Clean up for release. 2025-12-23 18:54:03 +00:00
LeoVasanko bd8b183e32 Project renamed to aeg, preparing for PyPI release. 2025-12-23 18:25:03 +00:00
LeoVasanko daba717ebb Add tools/release.py script for automatic release process. v0.3.2 2025-11-12 23:47:26 +00:00
LeoVasanko 5b74bcb683 Always generate LF line endings (even on broken OS). 2025-11-12 23:43:25 +00:00
LeoVasanko d9a18f43d5 Ruff formatting. 2025-11-12 23:43:04 +00:00
LeoVasanko 98ee4ab7b3 Fixed Windows build, cleaned up messages during build, using SCM version numbering, added ruff. 2025-11-12 22:59:21 +00:00
LeoVasanko c6148806dd Update pyproject, bump version. v0.3.1 2025-11-10 08:41:40 +00:00
LeoVasanko 6e6bc49466 README tuning. New benchmark results (a bit slower than initial versions were). 2025-11-10 08:40:04 +00:00
LeoVasanko c2ac2e2790 Use a much faster method to wipe buffers. 2025-11-10 08:38:28 +00:00
LeoVasanko c6e77cac66 Cleanup. 2025-11-10 08:00:12 +00:00
LeoVasanko df1acadb1f Bump version v0.3.0 2025-11-09 21:47:08 +00:00
LeoVasanko cb0f9956c3 Convert all input buffers to memoryview before use and use .nbytes, because len() doesn't work correctly with some buffers. Update docs with a Numpy example. 2025-11-09 21:19:50 +00:00
LeoVasanko a29405455a Cleanup benchmark 2025-11-09 20:59:53 +00:00
LeoVasanko 0d63844201 Make Mac class prevent further updates or final after finalisation. Keep cached values for hashlib API. 2025-11-09 20:53:19 +00:00
LeoVasanko 7682d5bc8b Cleanup 2025-11-09 08:39:41 +00:00
LeoVasanko 26b883ecbc Simplify implementation: remove bytes_in and bytes_out counters from all classes. 2025-11-09 08:09:26 +00:00
LeoVasanko 87d9a07868 Wipe state structs automatically after use. Simplified aligned allocator and its use via a single handle. 2025-11-09 08:04:00 +00:00
LeoVasanko eed36e2463 API updates:
- Mac class follows hashlib API: digest functions added and finalization no longer modifies state.
- Encryptor and Decryptor now raise RuntimeError if still used after final.

Documentation updated with the changes and  further examples.

Tests updated with the changes, new test module for error cases (test_raises).

Docstrings improved.
2025-11-09 06:53:27 +00:00
LeoVasanko 46bc05f547 Add human-readable algorithm name as NAME constant. 2025-11-09 04:01:05 +00:00
LeoVasanko 56d304a82e Constants renamed and values extracted from C code rather than function call at runtime. Documentation update. 2025-11-09 03:43:01 +00:00
LeoVasanko 28ee0e1314 Combine the two generator scripts into one that also reads ALIGNMENT and RATE from C sources. 2025-11-09 01:20:15 +00:00
LeoVasanko 1f506806d4 Bump version v0.2.0 2025-11-08 00:51:40 +00:00
LeoVasanko 17fba3c2f2 README 2025-11-07 22:30:23 +00:00
LeoVasanko d04c593766 Move the build_backend script to tools folder. 2025-11-07 22:26:03 +00:00
LeoVasanko fce6324ae5 Documentation updates, added BUILD.md 2025-11-07 22:20:27 +00:00
LeoVasanko b35dc75513 Use uv in the commands. 2025-11-07 22:00:36 +00:00
LeoVasanko 1da3000a22 README formatting 2025-11-07 21:59:20 +00:00
LeoVasanko f983cbe4c5 util.nonce_increment and util.wipe functions, also exported by each module for convenience. 2025-11-07 21:53:39 +00:00
LeoVasanko f0b4373c0e README updated 2025-11-07 21:52:28 +00:00
LeoVasanko 0efc2595d8 Make random_key and random_nonce return bytearray, and add a nonce_increment utility function. 2025-11-07 19:43:33 +00:00