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.
This change adds a test which probes for issues with sparse inputs on the fast path.
This was driven by the issue highlighted in #163
In response to the problems raised in the above issue and those uncovered by the test 5 improvements are made to the fast path with AES. This does impose a performance peanility which appears to be about 25% in the worst case at 128 byte long inputs, but there is no overhead for short inputs (as this code path is not used) and as the overhead added is constant (not length dependent) the impact on very long inputs should be negligible.
This fixes #163 in multiple ways. Each of the improvements have been tested individually and in various combinations with weakened versions of other parts of the algorithm to insure they work as intended and provide a benifit.