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.
Fixes #162 when merged.
RFC: https://datatracker.ietf.org/doc/draft-irtf-cfrg-aegis-aead
Implement bitsliced AES
This is the first step towards implementing AEGIS-128L and AEGIS-256 in pure PHP, with the eventual hope of polyfilling those functions ahead of their landing in PHP 8.4's ext-sodium.
While we may be able to use a table look-up version of AES for the actual bulk data processing for AEGIS, we do at least want a bitsliced implementation of the AES round function for the Init() step.
This implementation is based heavily on the work of Thomas Pornin's BearSSL project.
See https://www.bearssl.org/constanttime.html#aes
Implement AEGIS-128L and AEGIS-256
We specified an aesRound method on ParagonIE_Sodium_Core_AES that uses our bitsliced AES implementation to perform one round with an arbitrary round key (rather than relying on the key schedule primitive).
The implementation follows the RFC draft, including the provided test vectors.
Expose public APIs for AEGIS
Pretty straightforward. Our typical boilerplate, reused.
Add compat tests for PHP 8.4+
Added a new test that will only run on PHP 8.4 to compare the public APIs.