Cyber Security Essentials - Project
Lost Key
Group-13 :
Ganesh Chowdavaram
Sindhuja Bollikonda
Krishi Jyothirmai Vadaparthi
Chetana Ramya Malampati
Introduction(Overview)
Challenge: Lost key ([Link] )
Mustard Brightpants is an archaeologist who has been excavating ruins in Egypt for the past 25 years. In one of his
discoveries, he found a sphere-shaped trinket that has a strange combination of letters and numbers printed around it.
Alongside it was a scroll containing a riddle in a strange language, and a keypad. The sphere's contents might finally
solve the mystery behind the downfall of the mythical city of Outlandis. Could you help Mr. Brightpants solve the
riddle and find the correct key to unlock the sphere?
Find Key for the Flag is The requirement.
Methods
● This Challenge has two files: One python file [Link] and another text file output.
● After analyzing the [Link] file it’s clear that it used the elliptic curve cryptography and the
encryption mechanism.
● In the Output file, there are G(Base point), Gn(Encrypted Point), Cipher Text and IV(initialization
vector). The output file is the one obtained after executing the [Link] file.
● So, to get the flag, we need to reverse this and decrypt the Cipher text in the output file.
● So, to get the flag, we need to reverse this and decrypt the Cipher text in the output file.
● But we need the unknown value n which can be calculated using the coefficients of the elliptic curve.
But to solve this we need a lot of computational power with normal python environment. So, used
Sagemath which is designed to solve these types of computation problems.
● General Form of Elliptic Curve in Weirstrass Form
● After comparing the values we get the values of a2, a3, a4, a6 which are the coefficients of the elliptic curve
a2 = 208913474430283759938044884583915265967
a3 = 3045783791
a4 = 177776968102066079765540960971192211603
a6 = 308081941914167831441899320643373035841
and the value of P which is already in the encrypt file.
Design of Code for Decryption
Code to get n value in Sagemath
Python Code to Decrypt the Ciphertext
Results(Outcome)
The Flag for the Lost Key:
HTB{uns4f3_3ll1pt1c_curv3s_l3d_t0_th3_c0ll4ps3_0f_0u7l4nd1s}
HACKTHEBOX result
Final Result
Any Questions?