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

Protocols for secure communications-cryptography, Protocols for Secure Comm...

Protocols for Secure Communications Securing Internet Communication by using S-HTTP and SSL Secure Socket Layer (SSL) protocol is a protocol that uses public key encryption t

Unguided media, Unguided Media This is the wireless media that transfe...

Unguided Media This is the wireless media that transfer electromagnetic waves without using a physical media. Waves are broadcast through the air. This is performing through r

What do you understand by demilitarized zone, Problem 1: What does the ...

Problem 1: What does the SNMP access policy show? SNMP community diagram SNMP access policy Problem 2: Does there exist any formal functional specificat

Introduction to cryptography, INTRODUCTION TO CRYPTOGRAPHY Cryptography...

INTRODUCTION TO CRYPTOGRAPHY Cryptography The word cryptography is derived from Greek words kryptos, which means hidden and graphein, meaning to write, this is the process of

Advantages and disadvantage of packet filtering firewall, Advantages and Di...

Advantages and Disadvantage of Packet Filtering firewall   Advantages One screening router can help protect entire network One key advantage of packet filter

Internet protocol (ipv6), SUCCESS OF IP:  IP has accommodated dramatic...

SUCCESS OF IP:  IP has accommodated dramatic modification since real design. But basic rules are still appropriate today. There are many new kinds of hardware. SCALING:

Explain why spreadsheets are so useful, Question: Spreadsheet packages ...

Question: Spreadsheet packages are widely used in Business. a) Explain why spreadsheets are so useful. b) Spreadsheet files are sometimes saved for use by other software

Nessus vulnerability, You see two IP addresses. The IP address 192.168.58.1...

You see two IP addresses. The IP address 192.168.58.130 is the one of Bt4. The IP address 192.168.58.133 has ports 135 and 445 open; which indicates that it is a Windows machine. S

Operation of the signature based intrusion detection system, Question : ...

Question : (a) State whether the following statement is FALSE or TRUE: It is always better to have various access points to the Internet so that if a hacker takes one down you

Calculate the false rejection, Divide the user data into 6 equal sets. Use ...

Divide the user data into 6 equal sets. Use the first set for the enrollment phase of your system, and the rest for the verification phase. Use the following formula to calculate 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