How simeuda/file_encryption_program works
This is a C++ command-line file encryption program. The user selects a file, algorithm, key and block mode; the program streams the file through the chosen mode and replaces it with the transformed output. DES and Triple DES are the implemented ciphers, and the menu hashes text or file input to derive keys using HES. The README also describes parallel processing, but says it is not yet implemented; the queue is not active in the sampled workflow. Links reflect shown calls or documented capabilities; unsampled implementation details are left unconnected.
Main entry points: main.cpp CLI workflow · mode.cpp Mode base · DES.cpp DES · crypto.h Cipher interface
Components 17
Application workflow
- CLI workflow
main.cpp - File streaming
main.cpp - Menu and key input
src/interface/menu.cpp
Cipher implementations
- Cipher interface
include/cryptologic/crypto.h - DES
src/cryptologic/DES/DES.cpp - Feistel rounds
src/cryptologic/DES/feistel.cpp - Triple DES
src/cryptologic/DES/Triple_DES.cpp
Block modes
Key hashing
- Hash interface
include/cryptologic/HASH/HASH.h - Hash engine
src/cryptologic/HASH/HASH.cpp - HES
src/cryptologic/HASH/HES/HES.cpp
Other components
- User
Connections 22
- User → CLI workflow: selects workflow
README.md - CLI workflow → Menu and key input: requests choices
main.cpp - Menu and key input → HES: hashes key input
src/interface/menu.cpp - HES → Hash interface: implements
- CLI workflow → File streaming: streams file
main.cpp - CLI workflow → ECB: dispatches
main.cpp - CLI workflow → CBC: dispatches
main.cpp - CLI workflow → CFB: dispatches
main.cpp - CLI workflow → OFB: dispatches
main.cpp - CLI workflow → CTR: dispatches
main.cpp - DES → Cipher interface: implements
src/cryptologic/DES/DES.cpp - Triple DES → Cipher interface: implements
- DES → Feistel rounds: inherits rounds
- Triple DES → DES: uses DES objects
src/cryptologic/DES/Triple_DES.cpp - Hash engine → Hash interface: implements
src/cryptologic/HASH/HASH.cpp - Hash engine → DES: uses cipher
- Mode base → Cipher interface: holds cipher
- ECB → Mode base: extends base
- CBC → Mode base: extends base
- CFB → Mode base: extends base
- OFB → Mode base: extends base
- CTR → Mode base: extends base