Update ZCrypto, thereby allowing parsing of RSA public keys with very large exponents#714
Merged
Conversation
# Conflicts: # go.mod # go.sum
524c6e0 to
abe2efd
Compare
zakird
approved these changes
May 15, 2026
|
howdy! i pulled this into runZeroInc/excrypto#78 as well - noticed a few small issues (other places where E was being limited); should be clear in the diffs if you'd like to pull these back too |
Contributor
Author
|
Awesome, I'll pull those in, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As reported in #670, we were unable to parse RSA keys with very large exponents (larger than Go's int). The fix was to bring in the
crypto/rsaintozcryptoand update it to usebig.Int.How to Test
I created
Dockerfileto create an SSH and TLS server with RSA encryption and large values for E. I confirmed that onmasterI get:{"ip":"127.0.0.1","port":2222,"data":{"ssh":{"status":"handshake-error","protocol":"ssh","port":2222,"timestamp":"2026-05-14T16:56:43+12:00","error":"failed to create SSH client connection: ssh: handshake failed: ssh: exponent too large"}}}TLS
And after fix parsing happens correctly:
Issue Tracking
Resolves #670