This project implements the Data Encryption Standard (DES) algorithm from scratch in C# using Visual Studio. It provides functionality to encrypt and decrypt text-based PDF files. A GUI application allows users to input a file, encrypt it, and then decrypt it using the DES algorithm, following the OOP paradigm.
-
Encrypt and Decrypt PDF Files
- Accepts a text-based PDF file as input for encryption or decryption.
- Generates encrypted or decrypted PDF files as output.
-
Custom DES Implementation
- DES Key Scheduling with 16 rounds of keys.
- The first 8 characters of full name(MAHNOORI) are used as the 64-bit master key.
-
Neat GUI Application
- Simple interface to select files, execute encryption/decryption, and save outputs.
-
No External Libraries for DES
- The DES algorithm, including key scheduling and bit-level operations, is implemented from scratch.
- Install Visual Studio (2022 or later).
- Install .NET Framework or .NET Core SDK compatible with your project.
- Clone or download the project files.
- Open the solution (
DES_Encryption.sln
) in Visual Studio. - Build the project (
Ctrl+Shift+B
) to generate the executable file. - Run the application (
F5
).
- Launch the application.
- Select the input PDF file containing text.
- Choose to either encrypt or decrypt the file.
- Save the resulting encrypted or decrypted PDF.
-
Key Scheduling:
Generates 16 round keys from the 64-bit master key derived from the first 8 characters of the user’s full name. -
Encryption/Decryption Process:
- Split the data into 64-bit blocks.
- Perform an initial permutation (IP).
- Apply 16 rounds of Feistel cipher using the generated round keys.
- Execute a final permutation (IP-1).
-
File Handling:
Reads the text from the input PDF, processes it using DES, and writes the output to a new PDF.