ASM 200: Caesar Cipher (35 pts)

What You Need

Purpose

To practice writing simple 32-bit assembly code.

Background

The Caesar Cipher shifts letters in the alphabet, like this:
A → B
B → C
C → D

 ...
  
Y → Z
Z → A

ASM 200.1: Caesar (5 pts)

Write a program that shifts letters forward by 3 in the alphabet.

Use that program to encrypt this plaintext:

CAESAR
The ciphertext is the flag.

Hint: example code to modify text is here.

ASM 200.2: Caesar (15 pts)

Write a program tries every shift amount from 1 to 25, wrapping around if the letters go past Z.

Use that program to decrypt this ciphertext:

QRMMNWCNGC
The plaintext is the flag.

ASM 200.3: Alternating Caesar (15 pts)

The ciphertext below was constructed in this manner:
  • Shift the first letter forward in the alphabet
  • Shift the second letter backward in the alphabet
  • Shift the third letter forward in the alphabet
  • Shift the fourth letter backward in the alphabet
  • etc.
The shift amount is constant, between 1 and 25.
GTWRHKHQLF
Find the plaintext. That's the flag.

Sources

System calls in the Linux kernel. Part 1.
X86 Assembly/Interfacing with Linux
Linux System Call Table (32-bit)
List of Linux/i386 system calls
Assembly Programming Tutorial


Posted 7-16-2020
Hint added to ASM 200.1 7-17-2020