Caesar++ is a crypto challenge that was part of the MetaRed CTF 2022 (2nd STAGE).

``````ujlwnywzxqcqfgxlvutynwoahpigu
``````

To solve the challenge, we had to decrypt the given ciphertext. The challenge description also gave us a hint that this message was found inside the bust of a famous Roman historical figure.

## First approach

The first thing that came to my mind was to try to decrypt the message using a simple Caesar cipher with progressing rotations (Caesar++).

``````#!/usr/bin/env python

chars = "abcdefghijklmnopqrstuvwxyz"

data = "ujlwnywzxqcqfgxlvutynwoahpigu"
print(data)

print("-" * 40)

print("first guess:")
for x in range(26):
for i in range(len(data)):
x = x % 26
rot = chars[x:]+chars[:x]
rot_char = rot[chars.find(data[i])]
print(rot_char, end="")
x += 1
print()
``````

The output was:

``````ujlwnywzxqcqfgxlvutynwoahpigu
----------------------------------------
first guess:
uknzrdcgfzmbrtlalllrhrkxfoihw
vloasedhgancsumbmmmsislygpjix
wmpbtfeihbodtvncnnntjtmzhqkjy
xnqcugfjicpeuwodoooukunairlkz
yordvhgkjdqfvxpepppvlvobjsmla
zpsewihlkergwyqfqqqwmwpcktnmb
aqtfxjimlfshxzrgrrrxnxqdluonc
brugykjnmgtiyashsssyoyremvpod
csvhzlkonhujzbtitttzpzsfnwqpe
dtwiamlpoivkacujuuuaqatgoxrqf
euxjbnmqpjwlbdvkvvvbrbuhpysrg
fvykconrqkxmcewlwwwcscviqztsh
gwzldposrlyndfxmxxxdtdwjrauti
hxameqptsmzoegynyyyeuexksbvuj
iybnfrqutnapfhzozzzfvfyltcwvk
jzcogsrvuobqgiapaaagwgzmudxwl
lbeqiutxwqdsikcrccciyibowfzyn
mcfrjvuyxretjldsdddjzjcpxgazo
ndgskwvzysfukmeteeekakdqyhbap
oehtlxwaztgvlnfuffflblerzicbq
pfiumyxbauhwmogvgggmcmfsajdcr
qgjvnzycbvixnphwhhhndngtbkeds
rhkwoazdcwjyoqixiiioeohuclfet
silxpbaedxkzprjyjjjpfpivdmgfu
tjmyqcbfeylaqskzkkkqgqjwenhgv
``````

No luck, but that would be too easy anyway.

## Solution

We the put the ciphertext into https://www.dcode.fr/cipher-identifier: Trithemius Cipher. Then we used the “BRUTEFORCE” option:

``````↗+25    THISISPROGRESSIVECAESARCIPHER
↘+1     VLOASEDHGANCSUMBMMMSISLYGPJIX
↘+7     BRUGYKJNMGTIYASHSSSYOYREMVPOD
``````

We just had to subtract 1 from the rotation value to get the flag.

``````for x in range(26):
for i in range(len(data)):
x = x % 26
rot = chars[x:]+chars[:x]
rot_char = rot[chars.find(data[i])]
print(rot_char, end="")
x -= 1
print()
``````

Output:

``````uijtjtqsphsfttjwfdbftbsdjqifs
vjkukurtqitguukxgecguctekrjgt
wklvlvsurjuhvvlyhfdhvduflskhu
xlmwmwtvskviwwmzigeiwevgmtliv
ymnxnxuwtlwjxxnajhfjxfwhnumjw
znoyoyvxumxkyyobkigkygxiovnkx
aopzpzwyvnylzzpcljhlzhyjpwoly
bpqaqaxzwozmaaqdmkimaizkqxpmz
cqrbrbyaxpanbbrenljnbjalryqna
drscsczbyqboccsfomkockbmszrob
estdtdaczrcpddtgpnlpdlcntaspc
ftueuebdasdqeeuhqomqemdoubtqd
guvfvfcebterffvirpnrfnepvcure
hvwgwgdfcufsggwjsqosgofqwdvsf
iwxhxhegdvgthhxktrpthpgrxewtg
jxyiyifhewhuiiylusquiqhsyfxuh
kyzjzjgifxivjjzmvtrvjritzgyvi
lzakakhjgyjwkkanwuswksjuahzwj
mablblikhzkxllboxvtxltkvbiaxk
nbcmcmjlialymmcpywuymulwcjbyl
ocdndnkmjbmznndqzxvznvmxdkczm
pdeoeolnkcnaooeraywaownyeldan
qefpfpmoldobppfsbzxbpxozfmebo
rfgqgqnpmepcqqgtcaycqypagnfcp
sghrhroqnfqdrrhudbzdrzqbhogdq
thisisprogressivecaesarcipher
``````

## Flag

The flag is “CTFUA{thisisprogressivecaesarcipher}”.