Skip to content

Implement pure python AES-IGE mode - #6

Open
SWORDIntel wants to merge 1 commit into
mainfrom
jules-7188788929984145490-75123ab5
Open

Implement pure python AES-IGE mode#6
SWORDIntel wants to merge 1 commit into
mainfrom
jules-7188788929984145490-75123ab5

Conversation

@SWORDIntel

Copy link
Copy Markdown
Owner

AES-IGE Pure Python Implementation

  • AES Generic Base Class: The previous AES256 class inside src/crypto_standalone/symmetric/aes.py has been updated and renamed to a base AES class. The _key_expand and initialization steps were updated to natively support 16, 24, and 32 byte keys for AES-128, AES-192, and AES-256 respectively, adapting the number of key expansion iterations based on the key length.
  • Backward Compatibility: A subclass AES256 that inherits from AES was placed inside src/crypto_standalone/symmetric/aes.py that specifically throws a ValueError for key lengths other than 32 bytes to ensure existing legacy implementations are completely unaffected.
  • AES-IGE Strategy: Developed a dedicated mode class AESIGE which conforms to the conventions of other block cipher modes (like AEAD implementations). Added aes_ige_encrypt and aes_ige_decrypt functions to provide user-friendly encapsulation, enforcing the necessary length requirements, utilizing a two-block combined IV ($C_0 || P_0$), handling standard recursion behavior, and rejecting any padded/invalid length requirements.
  • Framework integration: The new classes and helper functions were successfully attached to module exports inside src/crypto_standalone/symmetric/__init__.py and the main __init__.py export. Updated the README.md to advertise the AES-IGE features.
  • Validation: Included comprehensive Kat (known-answers-test) test suites utilizing multi-block output tests with vectors derived from independent implementations inside a new tests/unit/test_aes_ige.py. Tests verify correct functionality and error handling. Code passes validation (linting and testing).

PR created automatically by Jules for task 7188788929984145490 started by @SWORDIntel

Co-authored-by: SWORDIntel <117012829+SWORDIntel@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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