Tags: rot crypto
Rating:
1. Analyze the ciphertext
`Ypw'zj tpmwfe ...`
```
Y = Y + 0
p = o + 1
w = u + 2
' = ' + 3
z = v + 4
j = e + 5
= + 6
t = s + 7
p = o + 8
m = l + 9
w = v + 10
f = e + 11
e = d + 12
...
```
2. Decode for ROT-i
```
file = open('challenge.txt').readline().strip()
cipher = list(file)
upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lower = upper.lower()
i = 0
for c in cipher:
if c in upper:
x = upper.index(c) - i
print(upper[x], end = '')
elif c in lower:
x = lower.index(c) - i
print(lower[x], end = '')
else:
print(c, end = '')
i = (i + 1) % 26
```
3. Here is the result
`You've solved the beginner crypto challenge! The flag is DUCTF{crypto_is_fun_kjqlptzy}. Now get out some pen and paper for the rest of them, they won't all be this easy :).`
4. Here is the flag
`DUCTF{crypto_is_fun_kjqlptzy}`