Apex › Cryptography
Finding a factor by accident (Pollard’s rho)
Miller–Rabin says a number is composite; Pollard’s rho produces the factor — in about n^(1/4) steps, no divisor list. Iterate f(x) = x² + c mod n; if p is a hidden factor, the sequence taken mod p cycles after ~√p steps (birthday paradox), tracing the Greek letter ρ. When two terms collide mod p but not mod n, gcd(x_i − x_j, n) = p. Floyd’s tortoise-and-hare finds the collision in O(√p) time and O(1) memory. Verified in node: finds a true factor of many composites including a 19-digit semiprime, factor·cofactor = n, and iterations track √p. Step the walk and watch the gcd jump from 1 to a factor.
More in Cryptography
- Cryptography
- Classical ciphers
- One-time pad
- AES internals
- ECB penguin / modes
- Feistel / DES
- CTR & AEAD
- ChaCha20
- Poly1305 MAC
- Timing attacks
- SHA-256 internals
- Broken hashes
- Length-extension attack
- HMAC
- Padding oracle attack
- Montgomery multiplication
- How public-key crypto works
- RSA
- Is this number prime? (Miller–Rabin)
- One number, many remainders (Chinese Remainder Theorem)
- Dividing mod m (extended Euclid & the modular inverse)
- Elliptic curves
- Exponentiation that doesn’t leak (Montgomery ladder)
- ECDSA & nonce reuse
- Square roots mod a prime (Tonelli–Shanks)
- EdDSA (Ed25519)
- Pedersen commitment
- Blind signatures
- Verifiable random function
- Oblivious transfer
- Compute on secrets (Yao garbled circuits)
- Hiding what you access (Path ORAM)
- Fetching a record privately (PIR)
- Homomorphic (Paillier)
- ElGamal encryption
- Zero-knowledge (Schnorr)
- One signature for a thousand signers (BLS aggregation)
- Proving a huge sum cheaply (sumcheck)
- A clock you can’t rush (verifiable delay function)
- Diffie–Hellman
- Cracking a discrete log (baby-step giant-step)
- DH man-in-the-middle
- TLS downgrade
- How HTTPS secures a connection
- Password hashing
- Post-quantum (LWE)
- How LLL reduces a lattice (& breaks crypto)
- NTT (Kyber engine)
- Quantum key (BB84)
- Secret sharing
- Envelope encryption (KMS)
- Verifiable secret sharing
- Threshold signatures
- Proof of Work
- Double Ratchet
- X3DH key agreement
- MLS / TreeKEM (group messaging)
- Merkle tree
- A whole set in one number (RSA accumulator)
- Lamport signatures
- Hash chain