Skip to content

feat: Python round-trip decryptor and cross-platform CI - #30

Merged
incendiary merged 4 commits into
mainfrom
feat/decrypt-roundtrip-test
May 19, 2026
Merged

feat: Python round-trip decryptor and cross-platform CI#30
incendiary merged 4 commits into
mainfrom
feat/decrypt-roundtrip-test

Conversation

@incendiary

Copy link
Copy Markdown
Owner

Summary

  • Side_Load/Encryptors/python/decrypt.pyreassemble_and_decrypt(): reads iv.bin/salt.bin/parts/ produced by encrypt_and_split(), verifies SHA-256 checksum before decrypting, writes recovered plaintext; also has a main() CLI entry point
  • tests/test_decrypt.py — 8 tests covering the full round trip (see below)
  • .github/workflows/test.yml — adds windows-latest to the OS matrix so the full test suite runs on both platforms; Codecov upload pinned to ubuntu-latest/3.11

Tests

Test What it checks
test_roundtrip_num_files encrypt → split (num_files) → decrypt = original
test_roundtrip_chunk_size encrypt → split (chunk_size) → decrypt = original
test_roundtrip_single_part single-part edge case
test_roundtrip_binary_payload all 256 byte values survive the round trip
test_checksum_verified_on_good_data returned checksum matches encrypt_and_split return value
test_checksum_mismatch_raises corrupted part → ValueError before decryption
test_wrong_password_raises wrong passphrase → exception
test_missing_parts_raises missing parts/FileNotFoundError

All 8 pass locally on Python 3.9.

Test plan

  • pytest tests/test_decrypt.py — 8/8 locally
  • CI matrix: ubuntu + windows × Python 3.9/3.10/3.11 via GHA

🤖 Generated with Claude Code

incendiary and others added 4 commits May 20, 2026 00:26
decrypt.py (Side_Load/Encryptors/python/):
- reassemble_and_decrypt(): reads iv.bin/salt.bin/parts/ written by
  encrypt_and_split(), verifies SHA-256 before decrypting, writes
  recovered plaintext; also has a main() CLI entry point
- Acts as the Python counterpart to slice.py for offline decryption

test_decrypt.py (tests/):
- 8 tests: round-trip correctness (num_files, chunk_size, single part,
  binary payload), checksum verification pass + mismatch raises,
  wrong-password raises, missing parts/ raises

test.yml:
- Adds windows-latest to the OS matrix (was ubuntu-only)
- Codecov upload pinned to ubuntu-latest/3.11 to avoid duplicate reports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Removed inline 'from Crypto.Util.Padding import unpad' that was unused
- Applied black formatting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_decrypt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@incendiary
incendiary merged commit b2f1981 into main May 19, 2026
23 checks passed
@incendiary
incendiary deleted the feat/decrypt-roundtrip-test branch May 19, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant