PicoCTF Mod26 Write Up

picoCTF – Mod 26

This challenge gives what looks like, based on the format of the flag previously discovered in PicoCTF Obedient Cat Write Up, an encrypted version of the flag cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_uJdSftmh}. So where next?

Well the braces, and possibly the underscores and apostophes, have not been changed but we know the flag probably starts with picoCTF so it seems as though the alphanumeric characters have been encrypted. This points to an encytption that only encrypts alphanumerics. Mmm. What else? The only other information we have really is the title of the CTF. What does MOD26 refer to? Google is your friend as usual and it leads us to the Caesar Cipher. This in turn leads us to ROT13.

Running the cypher text through rot13.com yields the clear text flag.

Flag

A couple of questions spring to mind coming out of this:

  • Why is this challenge called MOD 26? Because mod 26 rotates any ‘over shift’ off the end of the alphabet back to the start of the alphabet
  • Why is it ROT 13 rather than another number? Using a rotation of 13 allows for both encryption and decryption with the same algorithm as it’s symmetric about the middle of the alphabet

Of course the next step is to implement a ROT13 encypter/decrypter in code.