At the first look on the register form, there will be a small challenge requires us to solve Roman emperor's cipher
To solve this challenge just simply bruteforce the key of Caesar Cipher to find the plaintext
And the key is 13, our flag is DONOR MOMENT BLOOD CAMERA
One register, we move on to RSA section challenge.
This challenge this simply ask us to find the solution to 101^17 mod 22663
Just simply run pow(101,17,22663)
in python
This challenge require us to using RSA to encrypt the number 12 with e = 65537, p = 17 and q = 23
We just simply using the RSA encryption algorithm
C = m^e mod n
And the answer is 301
This challenge ask us the totient of N base on
p = 857504083339712752489993810777 and
q = 1029224947942998075080348647219
To find the totient of N, we just use a simple formula (p-1)*(q-1)
And our answer for challenge starter 3 is 882564595536224140639625987657529300394956519977044270821168
In this challenge we have to find the private key of d base on
So d = e^-1 mod φ (n)
So our private key is: 121832886702415731577073962957377780195510499965398469843281
About this challenge, we have the private key we've just calculate in the challenge starter 4.
Base on everything we have, now we just put it in the algorithm m = c^d mod n
Our flag is 13371337
This challenge ask us to Sign the flag crypto{Immut4ble_m3ssag1ng} using your private key and the SHA256 hash function.
And this challenge provide us n and d
In PyCryptodome library have a lot of powerful function which we can use, in this challenge we use function SHA256 from Crypto.Hash library to hash our message and use it as the cipher text. Before we use our hashed-message to calculate the message we send, we have to change the hash value into the number that can be used with RSA math and once again, we use the PyCryptodome library which is bytes_to_long
function.
Our answer is
The first challenge in Prime Part 1 requires us to
There are a lot of powerful tools to factorize the prime number which I choose is http://factordb.com/
Just put the number into the site and leave it do the rest
So our answer is: 19704762736204164635843
This challenge provide us a python file which is inferius.py
and a output.txt
text file which is output of python file.
So the e number of really small, but in this challenge I don't use the exploitation of small exponent. I just factorize the n
number to find p
and q
, to do this I use factordb
(site above), after that leave the rest to the calculation work to find the flag.
And our flag is: crypto{N33d_b1g_pR1m35}
The challenge give us only a single output.txt
text file.
This is what we get from the challenge.
After using factordb
tool to factorize the n
number, I realize that n=p*1
, so what we have is p=n
and q=1
Our flag is: crypto{0n3_pr1m3_41n7_pr1m3_l0l}
This is what we get from the challenge, and the challenge give us a hint, which is:
If you're stuck, look again at the formula for Euler's totient.
After take a look at Euler's totient formula, there is an interest thing that I've found.
After taking square of n
number, we will get the p
and q
which is p=q
. So to calculate phi
number, we use phi=(p-1)*q
Our flag is: crypto{squar3_r00t_i5_f4st3r_th4n_f4ct0r1ng!}
In this challenge, the real problem is there are a lot of prime factor number, like they said, it's about 30.
Put it on the factordb
to get all the prime number.
This is all of the prime number we get after factorize the n
number.
So the phi
number is calculate base on this: phi=(p-1)*(q-1)
. So all we have to do is initializing phi=1
and multi all the prime_number-1
Our flag is: crypto{700_m4ny_5m4ll_f4c70r5}