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.
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.
Related questions
Question

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

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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
