Vernam cipher in assembly

Description

  • Michal Ondrejka

  • GitHub

  • december, 2021

This project showcases my implementation of a modified version of the Vernam cipher algorithm using the MIPS64 assembly language. The Vernam cipher is a substitution cipher that replaces each character of a message with another character determined by an encryption key.br
The program is designed to encrypt messages consisting of lowercase letters (a-z) and digits (0-9) of the English alphabet. The encryption key has a fixed length of two characters, which cyclically repeat for each character of the message. The characters are represented using their ASCII codes for encryption purposes.
The encryption process begins by reading the message character by character from left to right. The first character of the key shifts the corresponding message character forward, while the second character of the key shifts the character backward. The shifting is done in a cyclic manner, ensuring that the shift wraps around the alphabet if necessary. If a digit is encountered during encryption, the process terminates, and the encrypted text is displayed as the final result.
To accomplish this, the program utilizes the EduMIPS64 simulator, which provides a platform for executing MIPS64 symbolic instructions. The simulation environment allows for testing and verification of the encryption algorithm, ensuring its correctness and efficiency.