Rsa block and vernam stream ciphers, Computer Network Security

Assignment Help:

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 summarysheets.zip 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:

00000001011111110001011100011111100010001111000000

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.


Related Discussions:- Rsa block and vernam stream ciphers

Design a network layout, QUESTION: (a) Below is a capture of an Ethern...

QUESTION: (a) Below is a capture of an Ethernet II frame which contains an IPv4 packet and a TCP segment. Give the source MAC address for the frame in hexadecimal; the sourc

Security and basics steps in writing thesis, how can i start thesis? Please...

how can i start thesis? Please mention so of examples?

Explain the operation of the matchmaker middle agent, Question 1: (a) E...

Question 1: (a) Explain the operation of the "matchmaker" middle agent. (b) Describe why broker middle agents are more efficient in terms of the time taken for a service to

Public key cryptography encryption, What do you understand by the term encr...

What do you understand by the term encryption? Also describe the public key cryptography Encryption: Encryption is a method of converting plain text into cipher text. Using thi

Major difference between a virus and a worm, Question: (a) State wheth...

Question: (a) State whether the following statements are TRUE or FALSE. Justify your answer. i. A good site security policy will require that users use computer generated p

Increasingly significant impact on society, Question: (a) African gove...

Question: (a) African governments are slowly shifting to more transparent ICT regulations. However, but limited spectrum availability remains a key barrier to sustaining lon

Address resolution with closed-form computation, ADDRESS RESOLUTION WITH CL...

ADDRESS RESOLUTION WITH CLOSED-FORM COMPUTATION For networks use reliable addressing, it is possible to select an address that creates closed-form address resolution possible.

What are the intermediate systems and how they work, Question: a) Expla...

Question: a) Explain what the following intermediate systems are and how they work? i. Repeater ii. Bridge b) A service is formally specified by a set of primitives (op

What is the maximum achievable data rate, Question: a) How many bits pe...

Question: a) How many bits per second can be sent on a noiseless 4 MHz channel if four-level digital signals are used? b) If a binary signal is sent over a 3 KHz channel who

Important network security services, Question: (a) Consider that you en...

Question: (a) Consider that you enter the given URL in the address bar of a popular web client and that both the client and server accepts HTTP version 1.1. i. What can be t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd