Challenges
Rabin cryptosystem
Cryptography
Easy
Rabin
Solves: 9
Rabin cryptosystem
Author: CyberSamSU
Points
18
The Rabin cryptosystem is similar to the e = 2 case of RSA: encryption is c = m² mod n. Decryption requires taking a square root. Since the modulus is n = p·q, there are four roots, one of which is the real message.
In this challenge, the private primes are given to you (usually they are hidden). Both p and q are ≡ 3 (mod 4), so the root is easy: √c mod p = c^((p+1)/4) mod p.
p =
6082114414950926477645364432287023781667978102066757620680166925
5520936725331
q =
8770737185223325062824593021757814361333196612685420800764192890
1068641491783
c =
8980875894134177660401147299155990262435549578103606358760226233
8060651377989671853373097468322360436830908222502896860260086715
8437194649822986174664969
Reconstruct the four roots with the Chinese Remainder Theorem (CRT). Whichever one starts with BAYROQ{ — that is the correct one.
To submit a flag, log in.