Python implementation of the Data Encryption Standard algorithm, completed as the final project for Math 587 - Introduction to Cryptography at USC. Group members: Weston Watts, Caroline Boozer, Ellis McLarty, Andrew Eldridge.
Encryption and decryption methods are exposed as REST API endpoints using the Flask-RESTful library.
Clone repo
git clone https://github.com/andrew-eldridge/data-encryption-standard.gitOpen project directory
cd data-encryption-standardInstall required Python packages
pip install -r requirements.txtRun API script (optional flag log for detailed output logs)
python des.py [-log]Base address: 127.0.0.1:5000/api/v1
Provides a random 64-bit key to be used for input in the encryption/decryption functions.
Request: N/A
Response:
{
"key": "0111001000010100111110101000100101100100101001100110111001001011"
}Encrypts given 64-bit (8 character plaintext) message with provided 64-bit (binary) key. Returns corresponding 64-bit (binary) cipher.
Request:
{
"message": "hllowrld",
"key": "1101010010111111010100111100011111000010010010110100110100000101"
}Response:
{
"cipher": "1101001011010011110110010001100011000010011000110110011100101111"
}Decrypts given 64-bit (binary) cipher with provided 64-bit (binary) key. Returns corresponding 64-bit (8 character plaintext) message.
Request:
{
"cipher": "1101001011010011110110010001100011000010011000110110011100101111",
"key": "1101010010111111010100111100011111000010010010110100110100000101"
}Response:
{
"message": "hllowrld"
}