Part 2: Encryption Objective: Develop a program that encrypts a plaintext file by XORing 128-bit blocks of the file with a key repeatedly until the entire file is encrypted. Details: • The plaintext file will be a book from Project Gutenberg. • The encryption method should use the XOR operation on the file, 128 bits at a time, with the key. • Each 128-bit block is XORed with the same key. • The program should work from the command line and accept three parameters: o The name of the key file o The name of the plaintext file o The desired name of the resulting ciphertext file Note: This encryption method is not supposed to be secure.

icon
Related questions
Question
Part 2: Encryption
Objective:
Develop a program that encrypts a plaintext file by
XORing 128-bit blocks of the file with a key repeatedly
until the entire file is encrypted.
Details:
• The plaintext file will be a book from Project
Gutenberg.
• The encryption method should use the XOR
operation on the file, 128 bits at a time, with the key.
• Each 128-bit block is XORed with the same key.
• The program should work from the command line
and accept three parameters:
o The name of the key file
o The name of the plaintext file
o The desired name of the resulting ciphertext file
Note:
This encryption method is not supposed to be secure.
Usage:
$ ./bad_streamcipher_enc kf pt ct
Transcribed Image Text:Part 2: Encryption Objective: Develop a program that encrypts a plaintext file by XORing 128-bit blocks of the file with a key repeatedly until the entire file is encrypted. Details: • The plaintext file will be a book from Project Gutenberg. • The encryption method should use the XOR operation on the file, 128 bits at a time, with the key. • Each 128-bit block is XORed with the same key. • The program should work from the command line and accept three parameters: o The name of the key file o The name of the plaintext file o The desired name of the resulting ciphertext file Note: This encryption method is not supposed to be secure. Usage: $ ./bad_streamcipher_enc kf pt ct
9:46
$ ./bad_streamcipher_dec kf ct pt2
description
Part 4: Cryptanalysis
Details:
Done
Objective:
Outline a method for breaking the encryption scheme
implemented in Part 2 and, optionally, develop a solution
to demonstrate breaking the encryption under certain
assumptions.
(
• Provide a method to break the scheme under known
plaintext attack (KPA) assumptions.
• Bonus: Code a solution to break an arbitrary
ciphertext under KPA assumptions and demonstrate
that it works.
1
• Bonus: Code a solution that breaks the encryption
under ciphertext-only assumptions and demonstrate
that it works.
• Compile a report written in Markdown with proper
formatting of code and text to present your solution
and findings.
Submission Guidelines
Ensure to test your programs thoroughly to confirm
Transcribed Image Text:9:46 $ ./bad_streamcipher_dec kf ct pt2 description Part 4: Cryptanalysis Details: Done Objective: Outline a method for breaking the encryption scheme implemented in Part 2 and, optionally, develop a solution to demonstrate breaking the encryption under certain assumptions. ( • Provide a method to break the scheme under known plaintext attack (KPA) assumptions. • Bonus: Code a solution to break an arbitrary ciphertext under KPA assumptions and demonstrate that it works. 1 • Bonus: Code a solution that breaks the encryption under ciphertext-only assumptions and demonstrate that it works. • Compile a report written in Markdown with proper formatting of code and text to present your solution and findings. Submission Guidelines Ensure to test your programs thoroughly to confirm
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer