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

proposal: internal/cpu: add ifma detection for AMD64 to support e.g., optimized RSA signing #59412

Open
tpaint opened this issue Apr 4, 2023 · 6 comments
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@tpaint
Copy link
Contributor

tpaint commented Apr 4, 2023

Detect IFMA instructions ("HasIFMA") for AMD64 to support e.g., optimized RSA, RSA, ECDSA, and ECDHE public key cryptographic ciphers. References:

https://www.intel.com/content/www/us/en/developer/articles/technical/fourth-generation-xeon-scalable-family-overview.html#gs.uemgn3

https://www.intel.com/content/www/us/en/developer/articles/technical/ipp-crypto-acceleration-with-processor-code-named-ice-lake.html

@tpaint tpaint added the Proposal label Apr 4, 2023
@gopherbot gopherbot added this to the Proposal milestone Apr 4, 2023
@ianlancetaylor ianlancetaylor added the Proposal-Crypto Proposal related to crypto packages or other security issues label Apr 4, 2023
@ianlancetaylor
Copy link
Contributor

CC @golang/security

@randall77
Copy link
Contributor

We generally add these booleans only when code in other parts of the stdlib need them.
So if there are other accepted proposals for additional assembly somewhere in the stdlib, this issue is probably unnecessary. (Although it would be good to mail the changes to internal/cpu as a separate CL.)

@ianlancetaylor
Copy link
Contributor

I suggest that we use this proposal to cover not just adding the boolean, but also using it.

@gopherbot
Copy link

Change https://go.dev/cl/481618 mentions this issue: crypto/rsa: use avx-512 Integer Fused Multiply Add (IFMA) instructions to optimize RSA

@klauspost
Copy link
Contributor

@tpaint Shouldn't cpuid_IFMA also check of OS supports AVX512? So it needs a var osSupportsAVX512 bool that is appropriately populated.

@rolandshoemaker
Copy link
Member

This presumably has the same blockers as #43925?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
Status: Incoming
Development

No branches or pull requests

6 participants