Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double aesrand_getword() performance by using full 128 bits #801

Merged
merged 1 commit into from Mar 2, 2024

Conversation

droe
Copy link
Contributor

@droe droe commented Mar 2, 2024

The AES-128 PRNG construction produces 128 bits of pseudo-randomness per AES block encryption. Use the full 128 bits instead of throwing half of the bits away.

As long as aesrand is not used for any per-packet randomness, speeding up aesrand_getword() won't matter much, so the need for this change might seem arguable. With the old version of #798 that used aesrand_getword() for every packet, this change reduced the loss of send rate by about half.

@zakird zakird merged commit 612c805 into zmap:main Mar 2, 2024
7 checks passed
@droe droe deleted the droe/aesrand-perf-use-full-block branch March 11, 2024 08:01
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.

None yet

2 participants