CTF Write-Up

entièrement en français et réalisé par ThaySan.

View on GitHub

[Cryptography] Coupé-décalé - 25pts

coupe_decale.png

title: Coupé-décalé

category: Cryptography

difficulty: Facile

point: 25

author: Marie-Jeanne

description:

J’espère que vous avez une bonne vue.

Le flag que vous allez trouver n’est pas au format CYBN

Vous pouvez l’ajouter entre CYBN{}

Solution

Le titre est assez explicit :

Il suffit de faire un César sur chaque ligne, la clé de chiffrement utilisée est notée à droite de la ligne, on prend donc son inverse dans 26 :

( 1) C 			=> (25) B
( 2) TC 		=> (24) RA
( 3) YRO 		=> (23) VOL
( 4) IJPE 		=> (22) EFLA
( 5) LJXYS 		=> (21) GESTN
( 6) UCEUAY 		=> (20) OWYOUS
( 7) LLTLPSM 		=> (19) EEMEILF
( 8) ICBIRWCB 		=> (18) AUTAJOUT
( 9) NAMNBCRA 		=> (17) ERDESTIR
(10) ODCOXDBO 		=> (16) ETSENTRE
(11) NLSBFPXZE 		=> (15) CAHQUEMOT

En python :

from string import ascii_uppercase as charset
lines = ["C", "TC", "YRO", "IJPE", "LJXYS", "UCEUAY", "LLTLPSM", "ICBIRWCB", "NAMNBCRA", "ODCOXDBO", "NLSBFPXZE"]
print(''.join([charset[(charset.index(c) + 26-i-1) % len(charset)] for i in range(len(lines)) for c in lines[i]]))
# BRAVOLEFLAGESTNOWYOUSEEMEILFAUTAJOUTERDESTIRETSENTRECAHQUEMOT

FLAG : CYBN{NOW-YOU-SEE-ME}