Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program to encrypt and decrypt binary files using S-DES (Simplified DES) in the Cipher Block Chaining mode. The program takes the input of

image text in transcribed

image text in transcribed

Create a program to encrypt and decrypt binary files using S-DES (Simplified DES) in the Cipher Block Chaining mode. The program takes the input of an initial key and an initial vector, reads the plaintext or ciphertext from a file, conducts the encryption or decryption, and writes the resulting ciphertext or plaintext into a second file. You can use any of your preferred programming languages and operating systems. If the programming language is not C/C++/Java/Python, you will need to demo your code on your own computer. Your program must following the following input and output formats. Input Format: The program should take a command in the following format. (java) mycipher-m mode -k initial_key - initial_vector -p plaintext_file -c ciphertext_file mode: can be only encrypt or decrypt initial_key: 10-bit initial key initial_vector: 8-bit initial vector plaintext_file: a binary (not text) file to store the plaintext ciphertext_file: a binary (not text) file to store the ciphertext Output Format: The program should print output in the following format. kl=subkey 1 k2=subkey 2 plaintext=all bytes of the plaintext separated by blanks, starting from the first byte ciphertext= all bytes of the ciphertext separated by blanks, starting from the first byte Sample Screen Shot: Administrator: Command Prompt 16161616 - filctc le2 Cenycipher -n encrunt -k 1111111101 - k1-81011111 K2-11111186 plaintext-00000961 20160811 Ciphertext-1111010 001011 C: Sample Test Cases (attached in Canvas): mycipher-m encrypt -k 0111111101 - 10101010 -p fl-cf3 k1=01011111 k2=11111100 plaintext=00000001 00100011 ciphertext=11110100 00001011 mycipher-m decrypt -k 0101010101 - 00000000-p f4-cf2 k1=00011011 k2=10101100 ciphertext=00000001 plaintext=01101000 where f1 is a binary file with two bytes 012316, PSP- Ele Projects Edit Search View formet Tools HTML_Settings Window Help D. SI Il CXPIMO L. 2.2 5001 0203 0405 0607 0909 000 0000 OEOT 0123456789ADDET 0223 COCOS 0 HEX Owe and f2 is a binary file with one byte 01.6. PSP Ele Projects at Search Yew Ford Tools HTM Settings Window Help 001 0203 0405 0607 0909 6108 OCOD DEF0123456789ABCDEF 00000000 ) H er Owne Decrypting the attached file cipher.jpx with the command "mycipher-m decrypt -k 1010010001 -1 10101010 -p plain.jpg -c cipher.jpx" will result in the following plain.jpg file. Create a program to encrypt and decrypt binary files using S-DES (Simplified DES) in the Cipher Block Chaining mode. The program takes the input of an initial key and an initial vector, reads the plaintext or ciphertext from a file, conducts the encryption or decryption, and writes the resulting ciphertext or plaintext into a second file. You can use any of your preferred programming languages and operating systems. If the programming language is not C/C++/Java/Python, you will need to demo your code on your own computer. Your program must following the following input and output formats. Input Format: The program should take a command in the following format. (java) mycipher-m mode -k initial_key - initial_vector -p plaintext_file -c ciphertext_file mode: can be only encrypt or decrypt initial_key: 10-bit initial key initial_vector: 8-bit initial vector plaintext_file: a binary (not text) file to store the plaintext ciphertext_file: a binary (not text) file to store the ciphertext Output Format: The program should print output in the following format. kl=subkey 1 k2=subkey 2 plaintext=all bytes of the plaintext separated by blanks, starting from the first byte ciphertext= all bytes of the ciphertext separated by blanks, starting from the first byte Sample Screen Shot: Administrator: Command Prompt 16161616 - filctc le2 Cenycipher -n encrunt -k 1111111101 - k1-81011111 K2-11111186 plaintext-00000961 20160811 Ciphertext-1111010 001011 C: Sample Test Cases (attached in Canvas): mycipher-m encrypt -k 0111111101 - 10101010 -p fl-cf3 k1=01011111 k2=11111100 plaintext=00000001 00100011 ciphertext=11110100 00001011 mycipher-m decrypt -k 0101010101 - 00000000-p f4-cf2 k1=00011011 k2=10101100 ciphertext=00000001 plaintext=01101000 where f1 is a binary file with two bytes 012316, PSP- Ele Projects Edit Search View formet Tools HTML_Settings Window Help D. SI Il CXPIMO L. 2.2 5001 0203 0405 0607 0909 000 0000 OEOT 0123456789ADDET 0223 COCOS 0 HEX Owe and f2 is a binary file with one byte 01.6. PSP Ele Projects at Search Yew Ford Tools HTM Settings Window Help 001 0203 0405 0607 0909 6108 OCOD DEF0123456789ABCDEF 00000000 ) H er Owne Decrypting the attached file cipher.jpx with the command "mycipher-m decrypt -k 1010010001 -1 10101010 -p plain.jpg -c cipher.jpx" will result in the following plain.jpg file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

=+6. Why should they buy this product/service?

Answered: 1 week ago