p
q
n
🔐 RSA Modulus Generation: n = p × q | Public Key Component
Step 1: Generate Two Large Prime Numbers
512-bit
1024-bit
2048-bit
4096-bit
Prime p
32,317
1024-bit prime
5 decimal digits
Hex: 0x7e2d
✓ Primality Test Passed
Prime q
40,009
1024-bit prime
5 decimal digits
Hex: 0x9c49
✓ Primality Test Passed
Step 2: Compute RSA Modulus n = p × q
Prime p
32,317
1024 bits
×
Prime q
40,009
1024 bits
=
RSA Modulus n
1,292,886,653
PUBLIC COMPONENT
Modulus Properties and Security Considerations
Current Security Level Assessment
Weak Moderate Strong Very Strong
Mathematical Properties
  • n is a semi-prime (product of exactly two primes)
  • n is publicly shared in RSA cryptosystem
  • Bit length of n ≈ bit length of p + bit length of q
  • For 2048-bit RSA: p and q are each ~1024 bits
  • Factoring n = p × q must remain computationally infeasible
n = p × q (semi-prime) |n| ≈ |p| + |q| (bit length) φ(n) = (p-1)(q-1)
Security Requirements
  • p and q must be kept absolutely secret
  • |p - q| should be large (not too close in value)
  • Both primes should pass rigorous primality tests
  • Generated using cryptographically secure randomness
  • Security relies on Integer Factorization Problem
Critical: Knowledge of p,q ≡ complete key compromise
RSA KEY GENERATION REQUIREMENTS
Prime Selection: Must use cryptographically secure PRNG
1. Generate random odd number of desired bit length 2. Test for primality using Miller-Rabin test 3. Repeat until prime is found 4. Ensure |p - q| is sufficiently large
Modulus Computation: Simple multiplication with security implications
Factorization Resistance: Current best algorithms are sub-exponential
Time Complexity: O(exp((64/9 * ln n)^(1/3) * (ln ln n)^(2/3))) Key Sizes: 1024-bit deprecated, 2048-bit current standard, 4096-bit future-proof
Interactive • Hover elements • Security visualization