-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chacha20: Process 4 blocks at a time in AVX2 backend (#267)
- Refactor usage of `blocks` variant of `avx2::StateWords` It is now agnostic of the number of blocks processed, which is now a constant. - Pass around `&mut avx2::StateWord` instead of `&mut __m256i` - Add `avx2::StateWord` methods for required ops; MSRV 1.51+ - Change `buffer_pos` to a `u16` For a 4-block buffer, we need to be able to represent the past-the-end buffer position of 256, which is too large for a `u8`. - Switch to 4-block buffer for SSE2 / AVX2 backend - Add a `BlockRngResults` wrapper type When the non-soft backend is being used, its 4-block buffer size results in a `BlockRngCore::Results` type of `[u32; 64]` which doesn't implement `Default`. We replace it with a wrapper type on which we implement the necessary traits.
- Loading branch information
Showing
8 changed files
with
230 additions
and
109 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.