Skip to content
gaetsiffertPublic

About

Pedagogical reduced-size implementation of the IDEA cipher in Python, with CLI usage and unit tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IDEA Mini

IDEA Mini is a small pedagogical implementation of the IDEA cipher.

The project follows the structure of IDEA with reduced sizes to keep the code readable:

  • 16-bit block
  • 32-bit key
  • 4-bit words
  • 4 full rounds + 1 output transformation round

This project is not a security library and must not be used to protect real data. Its purpose is to clearly demonstrate:

  • subkey generation
  • the modular arithmetic used by IDEA
  • the encryption / decryption flow
  • a simple CLI and automated tests

Usage

Installation:

python3 -m pip install -r requirements.txt

Run the demo:

python3 idea_mini.py demo

Encrypt a block:

python3 idea_mini.py encrypt --block 9cac --key dc6f3f59

Decrypt a block:

python3 idea_mini.py decrypt --block 6d28 --key dc6f3f59

Tests

python3 -m unittest discover -s tests -v

Structure

  • idea_mini.py: implementation, subkey generation, and CLI
  • tests/test_idea_mini.py: unit tests and round-trip tests
  • requirements.txt: project dependencies

About

Pedagogical reduced-size implementation of the IDEA cipher in Python, with CLI usage and unit tests.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages