feat: Python round-trip decryptor and cross-platform CI - #30
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Side_Load/Encryptors/python/decrypt.py—reassemble_and_decrypt(): readsiv.bin/salt.bin/parts/produced byencrypt_and_split(), verifies SHA-256 checksum before decrypting, writes recovered plaintext; also has amain()CLI entry pointtests/test_decrypt.py— 8 tests covering the full round trip (see below).github/workflows/test.yml— addswindows-latestto the OS matrix so the full test suite runs on both platforms; Codecov upload pinned toubuntu-latest/3.11Tests
test_roundtrip_num_filestest_roundtrip_chunk_sizetest_roundtrip_single_parttest_roundtrip_binary_payloadtest_checksum_verified_on_good_datatest_checksum_mismatch_raisesValueErrorbefore decryptiontest_wrong_password_raisestest_missing_parts_raisesparts/→FileNotFoundErrorAll 8 pass locally on Python 3.9.
Test plan
pytest tests/test_decrypt.py— 8/8 locally🤖 Generated with Claude Code