Ho Jun Hui Nicholas 1005001
Lawrence Kevin Sagaya Anthony 1005002
Melodie Chew En Qi 1005319
Tan Li Ling 1005403
Adelle Chan Min Hui 1005418
Challengers are expected to solve a riddle to get a phrase (a string) and convert that string into an integer. However the integer is very large, and the key (an integer) is the first 20 digits of the integer. Alternatively, challengers can decrypt paragraph 2 encrypted with the Playfair cipher to obtain the info for the flag.
Riddle: Alice, a very stingy potato, is dehydrated from skating under the scorching sun for too long. What is Alice now? (Tips: A punny phrase)
present.py
, the PRESENT algorithmpadding.py
, the padding we used for our present cipher- Separate .bmp file containing encrypted original image
- Separate .txt file containing 3 paragraphs in the following order:
- A plaintext that gives information regarding the subsequent two ciphertext paragraphs
- A paragraph of ciphertext encrypted with a Playfair cipher (key matrix is also given in code)
- Another paragraph of ciphertext which has been encrypted with Vigenère, that contains the youtube link with the flag.
vigenere.py
, the Vigenère algorithmplayfair_go_and_do_yourself.py
, a template containing the code to help decrypt the ciphertext containing the clue.
The challenge comprises of two sections:
Section One contains 2 stages
Stage 1: The challenger will obtain key1 (int) hidden in the riddle.
Alternatively: The correct permutation and answer to the riddle can be found in the ciphertext (para3) encrypted by the Playfair cipher, within the .txt file (beginHere.txt
).
Stage 2: The challenger will then use key1 to decrypt an encrypted image (e4sourceimg3.bmp
) to get a permutation of key2 (int).
Section Two contains 2 stages Stage 1: The challenger has to find out the correct permutation of key2 through brute-force. (eg: If the numbers obtained is 123, the key could be 123,321,213…etc)
Stage 2: The challenger will have to use the correct permutation of key2 to decrypt the ciphertext(para 2) encrypted by Vigenere cipher within the .txt file (beginHere.txt
).
If decrypted correctly, the challenger will obtain a link which displays a video hiding the flag.
https://www.youtube.com/watch?v=WstOprNWMpA
Loacted at 23:15 of the youtube video
fcs22{YOUhaveBEENrickROLLED}
Riddle: Alice, a very stingy potato, is dehydrated from skating under the scorching sun for too long. What is Alice now? (Tips: A punny phrase)
Answer: “a chipskate”
Convert answer to bytes
int(b ‘a chipskate’, 8)
117418753981402449363170405
80 bit key: 11741875398140244936 (first 20 characters of answer of riddle )
Image decrypted with present.py using padding.py
Decrypted image:
Obtain key2: 2315
Use playfair to decrypt paragraph 2. You will get back the following paragraph, spaces not included.
"The answer to the riddle is a chipskate The ciphertext below is actually a link and it is encrypted using the Vignere cipher The link is encrypted in blocks of four bytes Moreover the Vignere cipher key is a permutation of the four numbers that you have obtained from observing the decrypted image to obtain the four numbers you simply have to count the number of each meme character and permutate the numbers to get the correct Vignere cipher key"
Note:playfair only takes in alphabets!
Use Vigenere to decrypt paragraph 3:
Key for vigenere = key2 = 2315
https://www.youtube.com/watch?v=WstOprNWMpA
Watch Video from Vignere.
Flag appears in video at 23:15min
An alternative solution is to bypass the riddle and solve the playfair cipher first to get riddle’s answer, which allows them to solve the key for the vigenere using the image.