✅Jarvis OJ Crypto RSA Series
veryeasyRSA (RSA Decryption Algorithm)
Solution
Since and are given, we could decrypt the message directly with the RSA decryption algorithm.
Implementation
Easy RSA (Small Modulus)
Solution
The prime factors of modulus can be easily found with FactorDB . To simplify this process, we could use the factordb-python module.
Implementation
Medium RSA (Wiener's Attack)
Solution
Note that the is really large. This is an indication for Wiener's Attack. However, this challenge is even simpler than that: FactorDB knows the prime factors of .
Implementation
hard RSA (Rabin Cryptosystem)
Solution
We got in this challenge. There are two possibilities here:
The message is much smaller than the modulus, so we can simply compute
m = sympy.root(c, 2).This is a Rabin cryptosystem.
This challenge falls into category 2.
Implementation
very hard RSA (Common Modulus)
Code Review
Solution
Take a look at this snippet:
Note that same modulus is used twice. Moreover, and are coprime, so this challenge falls into the "common modulus attack" category.
Implementation
Extremely hard RSA (Low Public Exponent Brute-forcing)
Solution
We have this time. Since the public exponent is small, brute-force attack is possible. We can try all (where is an natural number) until we find a perfect cube. Then the cubic root of is exactly the plaintext .
Implementation
God Like RSA
Todo!
Last updated