Factoring “short-sleeve” RSA keys with polynomials#2366
Open
carlospolop wants to merge 1 commit into
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://blog.trailofbits.com/2026/06/12/factoring-short-sleeve-rsa-keys-with-polynomials Content Categories: Based on the analysis, this content was categorized under "Crypto > Public-Key Crypto > RSA Attacks; optionally add notes under Crypto for DSA weak private exponent recovery and SSH public key auditing". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
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.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Trail of Bits describes a real-world cryptographic key-generation failure that produced RSA and DSA private keys whose big-integer limbs contain many regularly spaced zero bits. The authors call these “short-sleeve” keys because only a small contiguous part of each limb is filled with random data while the rest of the limb is zero. This is not just a statistical weakness: for many affected RSA keys, the public modulus can be factored quickly using polynomial factorization, allowing rec...
🔧 Technical Details
Scanning public keys for short-sleeve structure: Public RSA moduli can be searched for sparse, regularly spaced zero-bit blocks aligned to suspected limb boundaries. If a big-integer implementation fills only part of each limb with randomness, the public modulus may show repeated all-zero regions. Useful sources for detection include Certificate Transparency logs, TLS scans, SSH scans, PGP key collections, and tools such as badkeys and badkeys standalone.
Factoring structured RSA moduli with polynomials: If RSA primes
pandqare short-sleeved, represent the public modulusn = p*qin baseB = 2^w, wherewis the limb width. Convert base-Bdigits into a polynomialf_n(x). Because evaluating atBpreserves multiplication, short-sleeve factors with small coefficients can make 🤖 Agent ActionsUsing the repo to inspect crypto/RSA/DSA coverage and pick the best single file to update.
I found the best fit is the existing RSA attacks page: it already covers RSA key-generation failures, is concise, and avoids spreading the same concept across multiple files. I’m adding the new technique there with a brief cross-primitive note about DSA exponent recovery from the same limb bug.
Done.
Updated:
src/crypto/public-key/rsa/README.mdAdded:
Validation:
mdbook buildcould not be run becausemdbookis not installed in this environmentThis PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.