GCD for RSA Key Check
Enter two large integers (e.g. RSA moduli or primes) and instantly see their GCD — if it is greater than 1, they share a factor and the key is weak.
Use the GCD for RSA Key Check
Integer A
Integer B
Quick Test Pairs
Enter two integers and click Compute GCD
Supports arbitrarily large numbers (BigInt)
Euclidean Algorithm Steps
Coprime means GCD = 1. In RSA, two moduli being coprime is expected — they should not share any prime factor. If GCD > 1, one prime factor is exposed and both keys are broken.
Summary
The GCD for RSA Key Check tool computes the greatest common divisor of two integers using the Euclidean algorithm entirely in your browser. In RSA cryptography, a GCD greater than 1 between two public moduli exposes a shared prime factor, allowing an attacker to fully factor both keys in milliseconds. Paste any pair of large integers — RSA moduli, candidate primes, or arbitrary numbers — and get an instant result with a clear security verdict.
How it works
- Enter both integers A and B in the input fields.
- Click "Compute GCD" to run the Euclidean algorithm using JavaScript BigInt.
- The result panel shows GCD(A, B), the number of algorithm steps, and a security verdict.
- If GCD = 1, the numbers are coprime — no shared prime factor.
- If GCD > 1, the shared factor is displayed along with a warning.
Use cases
- Spot-check pairs of RSA moduli suspected of shared factors from weak RNG states.
- Cross-verify public keys across fleet TLS certificates to ensure independent generation.
- Educational demo of the Euclidean algorithm on cryptographic-sized numbers.
- Quick sanity-check before deploying an RSA key pair to production.
- Detect entropy failures in embedded devices that reuse prime factors.
- Check whether p and q derived from the same seed share a GCD > 1.