$ ctf42

Baby_CRT_RSA

Crypto weight 25.00 No technique tags yet.
Difficulty Not rated yet

Alice and Bob still haven't learnt their lesson and they insist on using textbook RSA to encrypt their messages. Now they also want to talk to Charlie as well. They want to talk about their favorite book and they each send a quote from their favorite book to each other. Can you show Alice, Bob, and Charlie why this isn't secure?

Hint: Alice, Bob, and Charlie each like the same quote from the book Flag format: flag{...} from Crypto.Util.number import getPrime, bytes_to_long

pt = bytes_to_long( b"???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????" )

e = 3

n_1 = getPrime(1024) * getPrime(1024) n_2 = getPrime(1024) * getPrime(1024) n_3 = getPrime(1024) * getPrime(1024)

ct_1 = pow(pt, e, n_1) ct_2 = pow(pt, e, n_2) ct_3 = pow(pt, e, n_3)

print(f"e = {e}") print(f"n_1 = {n_1}") print(f"n_2 = {n_2}") print(f"n_3 = {n_3}") print(f"ct_1 = {ct_1}") print(f"ct_2 = {ct_2}") print(f"ct_3 = {ct_3}")

Writeups

Official

No official writeup linked.

Community

No community writeups yet. Solved it? Share how.

Log in to add a community writeup.