Ps and Qs

RSA keys generated with one critical weakness



ignamv

11 solved
Dec. 3, 2015, 1:13 a.m.

This command takes a public key from stdin and outputs modulus and exponent

openssl rsa -pubin -text -noout

To quickly search for common multiplicative factors, and later to find the modular multiplicative inverse of a number, use this algorithm

https://en.wikibooks.org/wiki/AlgorithmImplementation/Mathematics/ExtendedEuclidean_algorithm

Don't put the leading '0x' on the answer

ggd

6 solved
Dec. 11, 2015, 4:20 p.m.

My path :

public key 1 : n1, e

public key 2 : n2, e

gcd(n1, n2) = p

q1 = n1 / p

φ(n1) = (p - 1) * (q1 - 1)

e.d1 ≡ 1 mod φ(n1) => e.d1 + k.φ(n1) = 1 egcd(e, φ(n1)) => d1

m1 = powmod(c1, d1, n1)

j_junquera

12 solved
July 21, 2017, 9:48 p.m.

I wrote my solution in python 3. Must be care about / division is not the same operacion than //! (it was my problem)

chq.matteo

4 solved
Dec. 4, 2017, 4:57 p.m.

as j_junquera, with sage / is not the same as //