Newport Blake CTF 2023

32+32=64 [100 pts]

 Challenge Description

Challenge Description:

64 is too much, but 32 isn’t. 32+32=64?

32_1.txt 32_2.txt


We’re given two base64 strings. Each of them, when base64 decoded, returns another base64 string.

I immediately thought about the title. 32+32=64… perhaps if we decode each one 32 times and concatenate those strings, we’ll get a base64 string that we can decode to get the flag!

Turns out, my conjecture was actually write. Writing a short script gets us the flag!

import base64

f1 = open('crypto/32+32=64/32_1.txt', 'r').read()
f2 = open('crypto/32+32=64/32_2.txt', 'r').read()

for i in range(32):
    f1 = base64.b64decode(f1)
for j in range(32):
    f2 = base64.b64decode(f2)

print((f1 + f2).decode('ascii'))
nbctf{h0pE_y0U_h4d_fUn}