This toy exercise uses tiny integers to illustrate a key-generation failure. The numbers are intentionally unsuitable for real cryptographic use.
The shared factor
If two moduli reuse a prime p, their greatest common divisor reveals that shared factor:
n1=pq1,n2=pq2
For distinct primes p, q1 and q2:
gcd(n1,n2)=p
Reproducing the observation
from math import gcdn1 = 61 * 53n2 = 61 * 47p = gcd(n1, n2)assert 1 < p < min(n1, n2)print(p, n1 // p, n2 // p)
61 53 47
Lessons learned
This example demonstrates factor recovery only. A real assessment would separately verify the relevant public keys, algorithm parameters and authorization to test them. Reliable key generation depends on a correctly initialized, cryptographically secure source of randomness.
Cookies & preferencesCookie-uri și preferințe
We use essential storage for site functions. Allow us to remember your language for future visits? We do not use advertising or analytics trackers.Folosim stocare esențială pentru funcțiile site-ului. Ne permiți să reținem limba pentru vizite viitoare? Nu folosim instrumente de urmărire pentru publicitate sau analiză.