Encrypt text files with AES and DES, alternating per block.
Hybrid Cryptography Algorithm is a small Windows app that shows how a hybrid cipher works: it encrypts a text file block by block, switching between AES and DES for each block, and decrypts it back with one combined key.
⚠️ For learning only. DES is broken and the keys aren't generated securely, so don't use it to protect real data. SECURITY.md lists every weakness.
- Hybrid encryption: AES-128 and DES in turns, one 16-byte block at a time.
- One key for both: a fresh random AES and DES key for each encryption, shown as a single hybrid key.
- Any text: works with every language and emoji, since text is handled as UTF-8 bytes.
- File in, file out: pick a
.txtfile, save the result where you want. - Single exe: nothing to install, no settings, no logs.
Grab the latest zip from the Releases page.
| File | Contents |
|---|---|
hybrid-cryptography-algorithm-<version>-windows-x64.zip |
HybridCryptographyAlgorithm.exe, LICENSE, THIRD_PARTY_LICENSES.txt |
Unzip it and run HybridCryptographyAlgorithm.exe.
- Windows 10 or 11, 64-bit
- Nothing to install: the .NET runtime is inside the exe, which is why it's about 70 MB
- The exe isn't code-signed, so Windows SmartScreen may warn you the first time: choose More info, then Run anyway
- Encrypt: double-click the box on the left, pick a
.txtfile, and press Encrypt. Save the cipher file. - The hybrid key and the cipher file's path fill in on the right. Copy the key somewhere if you want to decrypt later.
- Decrypt: with the key and a cipher file on the right, press Decrypt and save the result. It matches the original text exactly.
Buttons at the top right: ⓘ About, minimize, close. Drag the window by its background to move it.
- A random 16-byte AES key and 8-byte DES key are made.
- The text is turned into UTF-8 bytes and cut into 16-byte blocks; the last one can be shorter.
- Blocks are encrypted in turns, both in CBC mode with PKCS7 padding:
- block 1 → AES
- block 2 → DES
- block 3 → AES, and so on
- Each encrypted block becomes Base64, and the blocks are joined with
..
- The hybrid key is split back into the DES and AES keys.
- The cipher text is split at each
.. - Blocks are decrypted in the same turns, AES first, and the bytes are joined back into text.
Base64(DES key) + Base64(AES key)
12 characters 24 characters
You need the whole key, and the cipher file, to get the text back.
- Your text and keys stay on your PC. The app reads only the file you pick, writes only where you save, and keeps no history or logs.
- Update check: a few seconds after it opens, and when you click Check for updates in About, the app asks GitHub for the latest release. That one request tells GitHub your IP address and the app's version, nothing else. It never downloads anything: if a new version is out, the ⓘ button gets a dot, and About offers to open the release page.
Details are in SECURITY.md.
- Development guide: running from source, checks, the cipher format, and publishing a release.
You need the .NET 8 SDK on Windows.
git clone https://github.com/m51v5/HybridCryptographyAlgorithm.git
cd HybridCryptographyAlgorithm
dotnet run --project src/HybridCryptographyAlgorithm
Or open HybridCryptographyAlgorithm.sln in Visual Studio 2022 and press F5.
- The app saves nothing of its own. To remove it, delete the exe; your encrypted and decrypted files stay where you saved them.
- Third-party licenses, including the .NET runtime's, are in
THIRD_PARTY_LICENSES.txtin the zip.
Originally created as part of a Security and Cryptography course during university, focusing on the hybrid encryption logic rather than the UI.
Developed by @m51v5 as a university project in the Information Security course (3rd year) at the University of Information Technology and Communications (UoITC).
- Found a bug or have an idea? Open an issue.
- Want to help? Read the contributing guide and the code of conduct.
- Found a security problem? See SECURITY.md.
- Other ways to reach me: m51v5.com/contact.

