0 Up votes0 Down votes

29 views12 pagesOct 20, 2014

© © All Rights Reserved

PDF, TXT or read online from Scribd

© All Rights Reserved

29 views

© All Rights Reserved

- Hakin9_EN_05_2014 (1)
- Chapter 09
- Network Security & Cryptography m.susmitha ( i.t )
- Mobile Data Security
- Cryptography PKI Encryption
- TB-ASBE- Secure Key Agreement for Data Access Control Using Tree Based Attribute-set-based Encryption
- 091207
- QuantumCryptography..
- Ch 34508510
- TMMK Tweet Archive
- Converntional Cryptography
- B.E_CSE
- Computer
- Cryptography
- Crypto
- Image Encryption based on FEAL algorithm
- ISAU10092.04.pdf
- WhatSapp Vulnerability
- ACPN
- good.pdf

You are on page 1of 12

Instructor: Eng. Khalil Alkhateeb & Eng. Manal Alomar

Lab Objectives

2

The aim of this lab is to introduce the basic concepts of

cryptography and to familiarize the student with the following

concepts:

Cryptosystems

Cryptanalysis

For better understanding of these concepts, the students are

asked to implement and break the Caesar cipher using the

JAVA programming language.

Cryptography

3

Cryptography: is a compound greek word meaning "secret

writing".

Cryptography involves converting plaintext into ciphertext

through a process known as encryption.

Ciphertext is converted back to plaintext by decryption.

Usually the algorithms are public, but an input, called the key, is

secret.

The key for encryption does not necessarily have to be the

same as the key for decryption.

Cryptosystem & Cryptanalysis

4

Cryptosystem (cipher system) is a five-tuple (P, C, K, E, D):

P: finite set of possible plaintexts.

C: finite set of possible ciphertexts.

K: the key space, finite set of possible keys.

For all k in K, there is an encryption rule e

k

in E and a corresponding

decryption rule d

k

in D.

Each e

k

: P C and d

k

: C P are functions such that d

k

(e

k

(x)) = X for all

plaintext X in P.

Cryptanalysis is recovering a plaintext from a given ciphertext

without knowing the key or recovering the key.

Properties of a Good Cryptosystem

5

Each e

k

function should be efficiently computable.

An opponent, upon seeing the ciphertext string Y should be

unable to determine the key that was used or the plaintext

string X.

An exhaustive key search should be infeasible

the keyspace should be very large.

Types of Cryptosystems

6

Cryptosystems can be broadly classified into:

Symmetric-key systems.

Public-key systems.

A symmetric-key system, or secret-key system :

The sender and the receiver of a message, share a single common key

that is used to encrypt and decrypt messages.

A public-key system uses two keys:

A public key to encrypt the messages.

A private key to decrypt them.

Shift Cipher

7

Shift cipher encrypts ordinary English text by setting up a

correspondence between alphabetic characters and residues

modulo 26 as follows A 0, B1, , Z 25.

Shift Cipher is defined by P = C = K = Z

26

.

For 1 k 25, define

Is this a Cryptosystem?

A B C D E F G H I J K L M

0 1 2 3 4 5 6 7 8 9 10 11 12

N O P Q R S T U V W X Y Z

13 14 15 16 17 18 19 20 21 22 23 24 25

Caesar code

8

is a shift cipher code.

The story of the code begins: When Julius Caesar sent messages to his

trusted acquaintances.

He didn't trust the messengers, so he replaced every A by a D, every B

by a E, and so on through the alphabet.

Only someone who knew the ''shift by 3'' rule could decipher his

messages.

Implement the Caesar cipher

Your functions should be able to encrypt/decrypt strings with uppercase

letters, and leave any other symbol unchanged (e.g. blanks, commas,).

Cryptanalysis

9

Given ciphertext, just try all shifts of letters.

In this case you need to recognize when have plaintext.

C = GCUA VQ DTGCM

Key 1 fbtz up csfbl

Key 2 easy to break

Write a function that performs Exhaustive Search on an encrypted

message and returns a decrypted message.

Chi-square Test

10

The statistical data about English letter frequencies shows that in

a text of 1000 letters, the various English alphabets occur with

about the following relative frequencies:

The chi-square statistic allows comparing how closely a shift of

the English frequency distribution matches the frequency

distribution of the secret message.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

73 9 30 44 130 28 16 35 74 2 3 35 25 78 74 27 3 77 63 93 27 13 16 5 19 1

Chi-square Test

11

Here's an algorithm for computing the chi-square statistic:

1. Let ef(c) stand for the English frequency of some letter of the alphabet

2. Let mf(c) stand for the frequency of some letter of the message

3. For each possible shift s between 0 and 25:

A. For each letter c of the alphabet Compute :

B. The ChiSquare(s) value for this shift equals to the sum of all this values.

We thereby get 26 different chi-square values.

The shift s for which the number ChiSquare(s) is smallest is the most

likely candidate for the shift that was used to encipher the message

Assignment

12

Write a function that performs a frequency analysis on the

encrypted message and returns a decrypted message that

matches the frequency of the letters in English using Chi-

Square test.

1 week after the practical class.

- Hakin9_EN_05_2014 (1)Uploaded byPRekha
- Chapter 09Uploaded bymaged abbass
- Network Security & Cryptography m.susmitha ( i.t )Uploaded bygauthamsagar
- Mobile Data SecurityUploaded byARVIND
- Cryptography PKI EncryptionUploaded byMorshed Chowdhury Zishan
- TB-ASBE- Secure Key Agreement for Data Access Control Using Tree Based Attribute-set-based EncryptionUploaded byEditor IJRITCC
- 091207Uploaded byvol1no3
- QuantumCryptography..Uploaded byalisnowkiss6570
- Ch 34508510Uploaded byAnonymous 7VPPkWS8O
- TMMK Tweet ArchiveUploaded byMartin Burrett
- Converntional CryptographyUploaded bychhavi90
- B.E_CSEUploaded byankurwadhokar
- ComputerUploaded byTemitayo Oyin
- CryptographyUploaded byMoumita Aich
- CryptoUploaded bykattaswamy
- Image Encryption based on FEAL algorithmUploaded byeditor3854
- ISAU10092.04.pdfUploaded byIJIRIS - INTERNATIONAL JOURNAL OF INNOVATIVE RESEARCH IN INFORMATION SECURITY
- WhatSapp VulnerabilityUploaded byzoya
- ACPNUploaded byBhaskar Rao P
- good.pdfUploaded bySandeep Pandey
- Secure Image TransmissionUploaded byAnonymous 1aqlkZ
- Network SecurityUploaded bykse_o
- 07814199Uploaded bykanna_dhasan25581
- Ch 13 Reliability of Authenticated Key.pdfUploaded bymaheshnagarkar
- Security of Health Related Sensitive Data using Modern CryptographyUploaded byInternational Journal of Innovative Science and Research Technology
- 07163223Uploaded byCristinel Tanase
- International Journal on Cryptography and Information Security (IJCIS)Uploaded byijcisjournal
- Affine CipherUploaded bymazhar
- International Journal on Cryptography and Information Security (IJCIS)Uploaded byijcisjournal
- oopmprojectreport.docxUploaded byBhumit Malvi

- Bubble SortUploaded byRollin Revie
- CSC 204 - Final Study GuideUploaded byFVCproductions
- Digital Electronics Lab ManualUploaded bykunaraj
- MANUAL calculadora Texas Instruments TI-34Uploaded byRafael Leyva Huitron
- Sand Handling for Heavy OilUploaded byJose Marquez
- Phasor Diagram and Phasor Algebra Used in AC CircuitsUploaded bybinok19
- ISM_T11_C02_CUploaded byDavid Andres
- FrontiersEEC_2014Uploaded byWilber Yela
- x264 Options Analysis 08Uploaded bynicolargo
- PSD Computation using modified Welch algorithmUploaded byijsret
- CL 2 20182019 - QuestionsUploaded byMuhammad Ikhwan
- Lab 3 Flocculation and FiltrationasUploaded byJared Coffin
- Instrumentation and Process Control Rr322301Uploaded byNizam Institute of Engineering and Technology Library
- De Thi Hsg Cap Tinh Anh 12Uploaded byChi Minh
- bt3Uploaded bySowmya Gangadhar
- NABL 164 -Guidelines for Inter-Laboratory Comparison for Calibration Laboratories Where Formal PT Programs are not Available.pdfUploaded byzilangamba_s4535
- PhD Tesi Deredita 2012Uploaded bya_zf2001
- Prediction of the Vibration Levels Generated by Pyrotechnic Shocks Using an Approach by Equivalent Mechanical ShockUploaded byGanesh Tamang
- IMO Demo Sample PaperUploaded bySudarshan Chaudhary
- Business CommunicationUploaded byMoniruzzaman
- harqUploaded byRishi Sethi
- Investment AppraisalUploaded byhelton_bsb
- Programmable Logic ArrayUploaded byLê Văn Lợi
- Marketing AnalyticsUploaded byNoor Mohamed
- appendix i - engineering design in ngss - final v2 3Uploaded byapi-301186414
- Corelation and RegressionUploaded byJaydev Chakraborty
- sukhwanthesiswsignatures.pdfUploaded bymanly2909
- OscillatorUploaded byludihemicar
- unit 2 examUploaded byapi-325599202
- math 1030 skittles term projectUploaded byapi-340538273

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.