Skip to content

C implementation of the Simplified AES (SAES) which is a simplified version of AES (Advanced Encryption Standard) that works on Data and Key with length 16 bits

Notifications You must be signed in to change notification settings

mostsfamahmoud/Simplified-AES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplified AES Implementation

Overview

This repository contains a C implementation of Simplified AES (SAES) encryption and decryption algorithms. The code provides functionality to encrypt and decrypt 16-bit data using a 16-bit key.

File Structure

  • SAES.c - Contains the SAES implementation.
  • SAES.h - Header file for SAES with function declarations and necessary definitions.
  • SAES_test.c - Test harness for the SAES implementation.

Features

  • Educational Focus: The code emphasizes clarity and simplicity, serving as an educational resource for understanding the fundamental concepts of AES encryption.

  • Command-Line Interface: Includes a user-friendly command-line interface for effortless encryption and decryption of data using custom keys, enhancing usability and accessibility.

  • Modular Architecture: Utilizes a modular structure with separate functions for key expansion, substitution, and mixing columns. This design choice promotes readability and allows for easy expansion or modification.

Installation

Clone this repository:

    git clone https://github.com/mostsfamahmoud/Simplified-AES.git
    cd Simplified-AES/

How To Use

Compilation

To compile the code, use a C compiler such as GCC:

  gcc SAES.c SAES_test.c -o SAES_test.exe

Running Tests

The provided test cases can be executed using the batch file run_mytestcases.bat:

  ./run_mytestcases.bat

This batch file reads test cases from mytestcases.txt, executes the SAES test program with the given parameters, and displays the results.

Test Cases

The test cases cover various scenarios of encryption and decryption with valid and invalid inputs.

  • Each test case format: Operation Key Data
  • Operations: ENC for encryption, DEC for decryption.
  • Key and Data should be 4-character hexadecimal strings.
  • Invalid inputs will display error messages.

Simple Usage

Example test cases and their expected output:

  ENC A73B 6F6B -> C2AA
  DEC AB89 -> ERROR: Invalid number of parameters
  ...

Documentation

Simplified AES - Description

Acknowledgements

Feedback

If you have any feedback, please reach out to me at mostafamahmoud.cse@gmail.com

🔗 Links

linkedin

About

C implementation of the Simplified AES (SAES) which is a simplified version of AES (Advanced Encryption Standard) that works on Data and Key with length 16 bits

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published