Repository navigation
Replace custom AES implementation with cryptography - #624
Merged
Merged
Conversation
Preserve Paradox block transposition, padding, key handling, partial ciphertext and serial/IP150 framing. Add fixed legacy vectors and compatibility regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f934cf6-5389-4a80-b9b7-a5df44ff8929
Keep actual values first in crypto assertions. Explain why panel-mandated ECB and padding cannot be replaced without breaking wire compatibility; leave the security finding visible. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f934cf6-5389-4a80-b9b7-a5df44ff8929
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f934cf6-5389-4a80-b9b7-a5df44ff8929
Limit NOSONAR to the ECB mode line; retain the protocol compatibility rationale and documented security limitation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5f934cf6-5389-4a80-b9b7-a5df44ff8929
|
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
Use
cryptography's AES-256-ECB implementation instead of the hand-written AES rounds. This is an independent alternative to #623, based directly ondevat dc9384b; it does not include or modify that PR.Preserve the legacy wire/API behavior:
0xEE, use the first 32 bytes of longer keys, and continue rejecting empty keys.0xEE; preserve empty/aligned plaintext behavior.Add the dependency to both installation manifests and update the encryption documentation. Replace the internal key-schedule test with fixed legacy ciphertext/plaintext vectors and behavioral regressions, including exact serial and IP150 wire vectors.
Compatibility and verification
bytes,bytearray,memoryview, lists and tuples) and 144 empty-key rejection cases per implementation.No encryption-mode or protocol-security redesign is included: ECB and legacy padding are retained for panel compatibility.