A Java-based cryptographic utility that reverses the AES-128 round key generation process to reconstruct the original 128-bit encryption key and all previously generated round keys. Designed for cryptographic research, forensic analysis, debugging, and educational purposes.
- 📖 Overview
- ✨ Features
- 🚀 Getting Started
- ⚡ Usage
- 📘 How It Works
- 🛠️ Project Structure
- 🗺️ Roadmap
- 🤝 Contributing
- 📜 License
AES-128 uses a key schedule to generate a series of round keys from the original 128-bit key. This tool performs the inverse key expansion process, allowing users to:
- Reconstruct the original AES-128 key from the final round key.
- Retrieve all 10 round keys used in AES-128 encryption.
- Analyze AES key scheduling for research and educational purposes.
- Inverse Key Expansion – Reverses the AES-128 key schedule.
- Custom RoundKey Object – Stores round number and corresponding byte array for clean organization.
- Forensic & Educational Applications – Supports learning, validating, and investigating cryptographic systems.
- Java JDK 8+
- Basic knowledge of AES key scheduling (recommended)
git clone https://github.com/tmfontan/AESRoundKeyInverter.git
cd AESRoundKeyInverter
javac RoundKey.java InverseKeyGeneration.java
java InverseKeyGeneration
The tool prompts for input key data or round keys, then reconstructs:
- The original AES-128 encryption key
- All 10 round keys used in the AES-128 encryption process
Example Output:
Original Key: 2b7e151628aed2a6abf7158809cf4f3c
Round Key 1: a0fafe1788542cb123a339392a6c7605
Round Key 2: f2c295f27a96b9435935807a7359f67f
...
Round Key 10: d014f9a8c9ee2589e13f0cc8b6630ca6
AES-128 performs key expansion to derive round keys:
Key Expansion (Forward):
Original Key --> Round Key 1 --> Round Key 2 --> ... --> Round Key 10
Inverse Expansion (This Tool):
Round Key 10 --> Round Key 9 --> ... --> Original Key
Diagram:
- RoundKey.java – Defines the data structure for holding round numbers and their byte arrays.
- InverseKeyGeneration.java – Contains the logic for reversing AES-128 key scheduling and retrieving the original key.
Planned enhancements and future improvements:
- Add support for AES-192 and AES-256 key inversion.
- Implement a GUI version for easier visualization.
- Provide unit tests for improved reliability.
- Add export functionality to save reconstructed keys.
- Include performance benchmarks.
Contributions are welcome! To get started:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
. - Make your changes and commit:
git commit -m "Add feature"
. - Push to your branch:
git push origin feature-name
. - Submit a pull request.
Please ensure your contributions align with the project’s coding standards and include updates to documentation if necessary.
This project is licensed under the MIT License.
This project is intended solely for educational and authorized security testing purposes. Do not use it for unauthorized access, decryption, or illegal activities.