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: crypto/rc4: remove assembly implementations #25417

Closed
mundaym opened this issue May 16, 2018 · 4 comments
Closed

proposal: crypto/rc4: remove assembly implementations #25417

mundaym opened this issue May 16, 2018 · 4 comments
Labels
FrozenDueToAge Proposal Proposal-Accepted Proposal-Crypto Proposal related to crypto packages or other security issues
Milestone

Comments

@mundaym
Copy link
Member

mundaym commented May 16, 2018

@bradfitz investigated doing this in CL 102255. He found that on some CPUs the assembly was considerably faster and so abandoned the change.

At this point we are very unlikely to accept new RC4 assembly (e.g. CL 101916). This begs the question of whether we should have any assembly in this package at all. For reference, BoringSSL has removed all assembly for RC4: https://boringssl-review.googlesource.com/c/boringssl/+/10720. Removing all the assembly from crypto/rc4 would simplify the package significantly.

Is the performance of RC4 still important enough to warrant having assembly in this package?

/cc @FiloSottile @agl

@gopherbot gopherbot added this to the Proposal milestone May 16, 2018
@mundaym mundaym added the Proposal-Crypto Proposal related to crypto packages or other security issues label May 16, 2018
@gopherbot
Copy link

Change https://golang.org/cl/130397 mentions this issue: crypto/rc4: remove assembler implementations

@anacrolix
Copy link
Contributor

anacrolix commented Dec 20, 2018

RC4 is still used in many applications (for instance BitTorrent stream obfuscation). I don't think its performance should be allowed to slip just because it's not considered secure by modern standards.

@bradfitz
Copy link
Contributor

@anacrolix, it's a trade-off and we chose code size & maintainability & principles (we should fix the compiler instead) over the concerns of zero vocal users at the time. Even if you'd spoken up earlier we still probably would've made the same choice.

@bradfitz
Copy link
Contributor

@anacrolix, also, if you look at the CL, it might actually be faster on your CPU now with the pure Go implementation. Or it might be slower. In any case, it's a compiler bug now.

@golang golang locked and limited conversation to collaborators Dec 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge Proposal Proposal-Accepted Proposal-Crypto Proposal related to crypto packages or other security issues
Projects
None yet
Development

No branches or pull requests

5 participants