Skip to content

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

Merged
zakird merged 1 commit intozmap:mainfrom
droe:droe/aesrand-perf-use-full-block
Mar 2, 2024
Merged

Double aesrand_getword() performance by using full 128 bits#801
zakird merged 1 commit intozmap:mainfrom
droe:droe/aesrand-perf-use-full-block

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
@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.

2 participants