Rsa block and vernam stream ciphers, Computer Network Security

RSA Block and Vernam Stream Ciphers

This assignment involves writing two small Python scripts and a report. Before you start you must download the ?le from the course web page, unzip it and print the summary sheet with your name on it. The ?le Name Ver.pdf tells you which sheet has your name on it. There are two parts to the assignment:

Part 1 - Recovery of an encrypted 'word' using a forward search attack. A 5 character 'word' containing random capital letters has been encrypted using the RSA algorithm. The word was encrypted in two 24 bit blocks by using the ASCII values of the characters (6510 to 9010 ) and padding the last block with a space (ASCII 3210 ). Every block was formed by concatenating the 8 bit binary patterns of each of the characters in the block. Thus creating two 24-bit intergers (actually 23-bit integers, as the MSB is zero). You are provided with the public key used for the encryption and with the decimal values of the encrypted blocks - see your summary sheet. You are required to use a forward search using a Python dictionary/hash table to recover the 'word' that was encrypted.[25]

Part 2 - Decryption of a jpeg ?le that has been encrypted using a Vernam cipher. Download the byte compiled Python module randbit.pyc from the module web page. The function nextbit() in this module can be used to generate a random bit stream using one of a series of di?erent generators. Below is an example of its use to generate and display 50 random bits.

 import sys

 from randbit import *

# for information on nextbit() type randbit.nextbit in the help environment

# of idle or in the standard python shell

 seed = 98071

for i in range(50):

seed,bit = nextbit(7,seed) # call to nextbit, using generator 7, which returns

# a modified value of the seed and a 'random' bit

sys.stdout.write(bit)# print bit without crlf print Output from above:


The seed and generator that you are to use in this part of the assignment are given in your summary sheet. Extract your encrypted jpeg ?le (see summary sheet) from the archived ?le on the module web page. Your jpeg has been encrypted, one byte at a time, with a Vernam cipher using a random bit stream generated using the seed and generator that you have been assigned. Random bytes were created by concatenating 8 bits at a time from the random bit stream, with the MSB of each byte being the ?rst of the 8 bits taken from the stream. You are to decrypt and display the ?le, which should be a picture of three printable ASCII characters.

NOTE: the Departmental machines are running Python 2.4 and randbit.pyc was complied with this version of Python.

Posted Date: 2/14/2013 7:36:59 AM | Location : United States

Related Discussions:- Rsa block and vernam stream ciphers, Assignment Help, Ask Question on Rsa block and vernam stream ciphers, Get Answer, Expert's Help, Rsa block and vernam stream ciphers Discussions

Write discussion on Rsa block and vernam stream ciphers
Your posts are moderated
Related Questions
Hello i have submitted an assignment and i am still waiting to know if it has been accepted or not the ref number is TicketID: EM201381BRY525CN, the due date is for monday 27th of

You are free to design the format and structure of the routing table kept locally by each node and exchanged among neighboring nodes. 1. Upon the activation of the program, each

Question (a) A CRC is constructed to generate a 4-bit FCS for an 11-bit message. The divisor polynomial is X 4 + X 3 + 1 (i) Encode the data bit sequence 00111011001 using po

PARITY BIT: A parity bit is an extra bit transmitted with data item select to give the resulting bit odd or even parity. For example an even parity data packet 10100001 has p

Consider a computer system with three users: Alice, Bob and Cindy. Alice owns the file alicerc, and Bob and Cindy can read it. Cindy can read and write the file bobrc, which Bob ow

ADDRESS RESOLUTION AND PROTOCOL ADDRESSES Address resolution (ARP) is a network interface layer protocol. Protocol addresses are used in all upper layers. Address resolution s

Project Name : Computer Adaptive Test Role : Day to Day interaction with Client. Involved in Requirement Gathering, Estimation.Involved with Stellent design and architectur

RING topology all computers are connected in loop. A ring topology is a network topology in which every node connects to exactly two other devices, forming a single continuous pa

ROUTING TABLE For efficiency, information about forwarding is saved in a routing table, which is started at system initialization and must be updated as network topology modif

Designing and coding of Job search mechanism: Project Title: FREEHIVE (Sep 2005- Nov 2006) Role             : Developer Domain         : Social Network Client