Skip to content

Add vpaes_ctr32_encrypt_blocks for x86_64 - #10884

Closed
davidben wants to merge 1 commit into
openssl:masterfrom
davidben:vpaes-2x-x86-64
Closed

davidben wants to merge 1 commit into
openssl:masterfrom
davidben:vpaes-2x-x86-64

Conversation

@davidben

Copy link
Copy Markdown
Contributor

This adds an analog to the (currently unused) "2x" optimization from vpaes-armv8.pl and a ctr128_f implementation.

This PR probably should not be merged as-is. I haven't integrated it into the C portions or even tested that it works in OpenSSL. Rather, this PR is so @bernd-edlinger can look into integrating it into #9677 if it helps remove bsaes-x86_64.pl which, while constant-time, is currently integrated with other bits that are not constant-time and is a little awkward at small inputs.

In BoringSSL, we found that, while bsaes-x86_64.pl is still faster, the gap became small enough that we were comfortable removing bsaes-x86_64.pl and reducing the number of AES implementations we carried around. Perhaps this'll help you all too.

See also #9677 (comment) and https://boringssl-review.googlesource.com/c/boringssl/+/35364. (Note that, by then, we had already batched the non-constant-time fallback for small inputs in bsaes_ctr32_encrypt_blocks.)

Checklist
  • tests are added or updated

This adds an analog to the (currently unused) "2x" optimization from
vpaes-armv8.pl and a ctr128_f implementation.
@bernd-edlinger

Copy link
Copy Markdown
Member

Yeah, thanks! I integrated this into #9677 and it seems to work.

@t8m t8m added branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature labels Jul 23, 2021
@t8m t8m added this to the Post 3.0.0 milestone Jul 23, 2021
@t8m t8m closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants