CS6160 Assignment 2 solved

$30.00

Original Work ?
Category: Tags: , , You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (1 vote)

Breaking RC4: A Cryptanalysis Assignment.

Consider an RC4 scheme with a word size of 𝑛 = 5, where the internal state consists of a table 𝑆 containing 2 words. We use a fixed-size key which is 5 bytes long. 𝑛 = 32 𝐾 In this assignment, you will be provided with 2 distinct ciphertexts, all generated from the 24 same plaintext using 2 different random keys, each 5 bytes in size, based on the RC4 scheme 24 described above.

The plaintext consists of a 6-digit passcode containing digits ranging from 0 to 9. In this assignment, your task is to examine the vulnerabilities of the RC4 scheme and exploit them, using the provided list of ciphertexts, to retrieve the encrypted passcode.

Pseudocode for ciphertexts generation: KeyScheduleAlgorithm(𝐾): For 𝑖 = 0 to 2 𝑛−1 𝑆[𝑖] = 𝑖 𝑗 = 0 𝑙 = LENGTH(𝐾) For 𝑖 = 0 to 2 𝑛−1 𝑗 = (𝑗 + 𝑆[𝑖] + 𝐾[𝑖 𝑚𝑜𝑑 𝑙]) 𝑚𝑜𝑑 2 𝑛 SWAP(𝑆[𝑖], 𝑆[𝑗]) RETURN 𝑆 PseudoRandomGeneration(𝑆, 𝑚): 𝑖 = 0 𝑗 = 0 KeyStream[𝑚] For 0 to 𝑚 − 1 𝑖 = (𝑖 + 1) 𝑚𝑜𝑑 2 𝑛 𝑗 = (𝑗 + 𝑆[𝑖]) 𝑚𝑜𝑑 2 𝑛 SWAP(𝑆[𝑖], 𝑆[𝑗]) KeyStream[𝑖] = 𝑆[(𝑆[𝑖] + 𝑆[𝑗]) 𝑚𝑜𝑑 2 𝑛 ] RETURN KeyStream CiphertextGeneration(passcode): 𝑚 = LENGTH(passcode) NumberOfKeys = 2 24 Ciphertexts[ NumberOfKeys ] For 𝑖 = 0 to NumberOfKeys – 1 𝐾[5] = Random key of size 5 bytes 𝑆[2 = KeyScheduleAlgorithm( ) 𝑛 ] 𝐾 KeyStream[𝑚] = PseudoRandomGeneration(𝑆, 𝑚) Ciphertexts[𝑖] = passcode ⊕ KeyStream RETURN Ciphertexts Provided materials: ● 4096 text files, each containing 4096 ciphertexts.

Deliverables: 1) Your program file should be named as Prog_Asgn_2_.cpp or Prog_Asgn_2_.py 2) Document your observations, provide a brief description of your approach, and include the cracked passcode in a PDF file. 3) Combine your program file and report into a zip archive file and name it as Prog_Asgn_2_.zip. Upload this zip file.

References: ● https://www.usenix.org/system/files/conference/usenixsecurity13/sec13-paper_alfardan.p df ● Section 3.9: https://toc.cryptobook.us/book.pdf.