Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help to code this in java. I need key.txt, decodedmessages.txt and java code. Please add comments on it. thanks In this programming assignment, you

Need help to code this in java. I need key.txt, decodedmessages.txt and java code. Please add comments on it. thanks

image text in transcribed

image text in transcribed

image text in transcribed

In this programming assignment, you will be responsible for determining a cryptographic key that is used to encrypt the given cipher texts provided. In order to complete this programming assignment, you need to understand the problems inherent to the use of a single key to encrypt multiple messages The objective of the project is to demonstrate, from an attackers perspective, how insecure the use of a single key is over multiple messages. Your goal is to develop a program, in the language you are most comfortable in, to retrieve the key used to encrypt multiple messages as well as decrypt said messages and an extra provided message Messages Many Time Pad Let us see what goes wrong when a stream cipher key is used more hex-encoded with the same stream cipher key than once. Below are eleven ciphertexts that are the result of encrypting eleven plaintexts with a stream cipher, all Hint: XOR the ciphertexts together, and consider what happens when a space is XORed with a character in [a-zA-Z] ciphertext #1 9d6e7a7d155295eef8512c 0 87da56084f743aaa9985ee3848 a768c3484d2e 2ea 6b3f4e5483f61 2d55987ff4782f360bd4809bab835fale65f8459c6814472508cc7172241ee70c34fb9e7c8c4 c 246132845d5d7 3 d 0 7 0 d e 9 9 a 7 3 e fe 1 e 9 e e 6 2 7 e a 8 f 4 a a a e 1 4 7 0 8 7 cce6c8cd08813f81caf9d7 1204 8 6b16 ciphertext #2: 8968617d0f1b97e5ee51280f3aec72caf106bdb48d44a 68291339e35db86b6f56f2140548bf25 3cd1593e 8498baa34ba4f02fda070e25075b04387681b473610cc7f75614ae21a3efb867 3e2031cc5b5a2 3c17ad9cda334ef10 ciphertext #3: 8f6f3779154f99e8e014375c34a267c1e745bbad895fe391c526873383cfale86632575481e80 3c41c93f94d97a738f54d02a9ec66bb1360b44ed3210206254fcc627b240bfb1d389978 09 3d2f2a9b4b1327c17edf99b224fe1e9ee66effc649a 3b5430c7c9a2a91d7c51bab14 e9d57d395 66a5634c4340c858c5a93fff89e0394f3f49363ce3c6ee6f26B2 9 a 8 2 e 2 9 fb 9 ca 0 a 8 6 5 7 c48ad2c 60eaf70a6b44918a40630392171ca29b87cd9e9e 037c6ad2bcibe08c61ba6223a8bac0a024741 b71b270a0579abld0308ce9b54b391a6a49ebacfc5eb5b57dd56cafob1694544cfa6e ciphertext #4: 9a697e6b415897fef902205c34a267d6fa42abbe 9 8 5 f e 3 9 3 972f963598c1b fc7a3b4 17e2f10 1c51488f94199b667154009b9eb7df40721ac4a96315647340 6cc 62707406ea0 43cb586789c09 3f2f658d48433fc07ccacdaf23f54dd9a 853e4df41ace6130e 61986f8cd48156b11daad1692d4 33518349d2d0ec09a4ddafdf59e0882a4ffdd7cdd896bf7bb663ea83f37f59ca0e17a7a4aa96c 25fee50d2b0d93de5f6719d91700e19e97 d18 6d7077c2985f856ef8035ab7c66bdbadfee2a664 e77bf66ac078 8bac1748eacb45936196004a2b0e 955b6a8798166e4 Target ciphertext (decrypt this one): 866e786a0042d4ab f 2 1 e 3 0 5 c3 5 a d 6 5 c 1b 5 4 2 bbbe8f55b3848032c6359fc3e2e96b21421196a10 7c90195a 30 89 6bc61f5490 6abae35fd196fb1519b2d1206320b892b7c7719e60e37b69773 8 c07 76292a9c5d132ac66a8bd1a728bb5882e 629 Hints OTP the message if necessary. Should the key be used more than once the key can be retrieved and A one time pad works by XORing a key with a given plaintext. The key is looped to fit messages exposed. Message 1 XOR key Cipher 1 Message 2 XOR key-Cipher 2 (Cipher 1) XOR (Cipher 2)- (Message 1) XOR (Message 2) Crib Dragging Despite the insecurity that results from the XOR of two cipher texts. The resultant text is quite illegible. This is where crib dragging comes in, crib dragging is where you take frequently used words and xor them with the result of (Cipher 1) XOR (Cipher 2). If the word is contained in one message then you will get the legible text of the other message. This portion will take some guessing as you may receive incomplete words or parts of sentences. Guess the rest of the word and then use that as the new crib. You wll be uncovering the two, or more, of the messages involved simultaneously. When you have one completed message you can then use that to recover the original key. In this programming assignment, you will be responsible for determining a cryptographic key that is used to encrypt the given cipher texts provided. In order to complete this programming assignment, you need to understand the problems inherent to the use of a single key to encrypt multiple messages The objective of the project is to demonstrate, from an attackers perspective, how insecure the use of a single key is over multiple messages. Your goal is to develop a program, in the language you are most comfortable in, to retrieve the key used to encrypt multiple messages as well as decrypt said messages and an extra provided message Messages Many Time Pad Let us see what goes wrong when a stream cipher key is used more hex-encoded with the same stream cipher key than once. Below are eleven ciphertexts that are the result of encrypting eleven plaintexts with a stream cipher, all Hint: XOR the ciphertexts together, and consider what happens when a space is XORed with a character in [a-zA-Z] ciphertext #1 9d6e7a7d155295eef8512c 0 87da56084f743aaa9985ee3848 a768c3484d2e 2ea 6b3f4e5483f61 2d55987ff4782f360bd4809bab835fale65f8459c6814472508cc7172241ee70c34fb9e7c8c4 c 246132845d5d7 3 d 0 7 0 d e 9 9 a 7 3 e fe 1 e 9 e e 6 2 7 e a 8 f 4 a a a e 1 4 7 0 8 7 cce6c8cd08813f81caf9d7 1204 8 6b16 ciphertext #2: 8968617d0f1b97e5ee51280f3aec72caf106bdb48d44a 68291339e35db86b6f56f2140548bf25 3cd1593e 8498baa34ba4f02fda070e25075b04387681b473610cc7f75614ae21a3efb867 3e2031cc5b5a2 3c17ad9cda334ef10 ciphertext #3: 8f6f3779154f99e8e014375c34a267c1e745bbad895fe391c526873383cfale86632575481e80 3c41c93f94d97a738f54d02a9ec66bb1360b44ed3210206254fcc627b240bfb1d389978 09 3d2f2a9b4b1327c17edf99b224fe1e9ee66effc649a 3b5430c7c9a2a91d7c51bab14 e9d57d395 66a5634c4340c858c5a93fff89e0394f3f49363ce3c6ee6f26B2 9 a 8 2 e 2 9 fb 9 ca 0 a 8 6 5 7 c48ad2c 60eaf70a6b44918a40630392171ca29b87cd9e9e 037c6ad2bcibe08c61ba6223a8bac0a024741 b71b270a0579abld0308ce9b54b391a6a49ebacfc5eb5b57dd56cafob1694544cfa6e ciphertext #4: 9a697e6b415897fef902205c34a267d6fa42abbe 9 8 5 f e 3 9 3 972f963598c1b fc7a3b4 17e2f10 1c51488f94199b667154009b9eb7df40721ac4a96315647340 6cc 62707406ea0 43cb586789c09 3f2f658d48433fc07ccacdaf23f54dd9a 853e4df41ace6130e 61986f8cd48156b11daad1692d4 33518349d2d0ec09a4ddafdf59e0882a4ffdd7cdd896bf7bb663ea83f37f59ca0e17a7a4aa96c 25fee50d2b0d93de5f6719d91700e19e97 d18 6d7077c2985f856ef8035ab7c66bdbadfee2a664 e77bf66ac078 8bac1748eacb45936196004a2b0e 955b6a8798166e4 Target ciphertext (decrypt this one): 866e786a0042d4ab f 2 1 e 3 0 5 c3 5 a d 6 5 c 1b 5 4 2 bbbe8f55b3848032c6359fc3e2e96b21421196a10 7c90195a 30 89 6bc61f5490 6abae35fd196fb1519b2d1206320b892b7c7719e60e37b69773 8 c07 76292a9c5d132ac66a8bd1a728bb5882e 629 Hints OTP the message if necessary. Should the key be used more than once the key can be retrieved and A one time pad works by XORing a key with a given plaintext. The key is looped to fit messages exposed. Message 1 XOR key Cipher 1 Message 2 XOR key-Cipher 2 (Cipher 1) XOR (Cipher 2)- (Message 1) XOR (Message 2) Crib Dragging Despite the insecurity that results from the XOR of two cipher texts. The resultant text is quite illegible. This is where crib dragging comes in, crib dragging is where you take frequently used words and xor them with the result of (Cipher 1) XOR (Cipher 2). If the word is contained in one message then you will get the legible text of the other message. This portion will take some guessing as you may receive incomplete words or parts of sentences. Guess the rest of the word and then use that as the new crib. You wll be uncovering the two, or more, of the messages involved simultaneously. When you have one completed message you can then use that to recover the original key

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions