🏳️
Bag of Flags
  • Home
  • 2023
    • 🅿️picoCTF 2023
      • money-ware
      • repetitions
      • two-sum
      • ReadMyCert
      • rotation
      • hideme
      • PcapPoisoning
      • who is it
      • Reverse
      • timer
      • Safe Opener 2
      • findme
      • MatchTheRegex
      • SOAP
    • 🐦magpieCTF 2023
      • Space Plan
      • Space Exploration
      • So Meta
      • There is no flag
      • Momma says to play fair
      • Rubis
      • What is the password?
      • Eavesdropper
      • Shredded
      • Missing Flag
      • This outta be large enough right?
      • No Password Here
      • Chocolate Chips with Zero-G
      • Education Comes First
    • 🌴ISSessions CTF 2023
      • Basic Permissions
      • Crack Me
      • File Detective
      • Word Vomit
      • Fileception
      • Coding Time
      • Ghost File
      • CryptoTools1
      • CryptoTools2
      • 1337
      • ROT++
      • RunedMyDay
      • RSA_2
      • The Man Who Sold the World
      • VaultChallenge
      • Lost Media
      • Decontamination
      • Decade Capsule
      • Password in A Haystack
  • 2022
    • 🏁UW CTF S22
      • 0s and 1s
      • simple image
      • Helikopter
      • Meow
      • Google Form
      • Strings, literally
      • WASM
      • Audio
      • Pwn0
      • YATD
      • steg
      • Passwords
      • Vitalik
  • Practice
    • 🧠CryptoHack
      • Introduction
        • Finding Flags
        • Great Snakes
      • General
        • ASCII
        • Hex
        • Base64
        • Bytes and Big Integers
        • XOR Starter
        • XOR Properties
        • Favourite byte
        • You either know, XOR you don't
        • Greatest Common Divisor
Powered by GitBook
On this page
  • Description
  • ROT--
  • Flag
  1. 2023
  2. ISSessions CTF 2023

ROT++

Description

Standard Caesar ciphers are too easy! This cipher was encrypted by starting at 0 and incrementing the shift for each subsequent character in the string. Write a simple program to decrypt this cipher!

Hint 1: The ‘alphabet’ for this challenge is A-Z followed by 0–9.

Hint 2: retroCTF{?????_??_???_????}

ROT--

We are given a text file with the cipher RPV47_ny_0wx_ol4b

As described, this was encrypted with a modified Caesar cipher where the shift starts at 0 and increases by 1 for each subsequent character

  • Start with a shift of 0 and increase for each character, then undo the shift

  • We are also given the alphabet used, which doesn't include underscores so we can safely ignore those

# Alphabet consists of all uppercase so conver cipher
cipher = 'RPV47_ny_0wx_ol4b'.upper()

# Alphabet
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' # Length of 36

flag = ''
shift = 0

for ch in cipher:
    # Alphabet has no underscores
    if ch == '_':
	flag += '_'
    else:
        # Reverse the shift
        flag += alphabet[alphabet.find(ch) - shift % 36]
        shift += 1
		
print(flag)

Flag

retroCTF{ROT13_IS_TOO_EASY}

Previous1337NextRunedMyDay

Last updated 2 years ago

🌴