29 views

Uploaded by Khalil Al-khateeb

- A Study of Cryptography
- En Cryptolog y
- CCCC.docx
- PROBLEMS
- IJAIEM-2013-04-27-079
- CS402_CourseBook
- Quantum Cryptography Edited
- TINY Algorithm
- Handycipher: a Low-tech, Randomized, Symmetric-key Cryptosystem
- A Contemporary Polyalphabetic Cipher Using Comprehensive Vigenere Table
- MSIS Exam SSI809 2015 16 Solution
- Security Mechanism for Online Transactions Using Mobile Agents
- ICT Development
- ICT Development_
- Information Hiding in CSS: A Secure Scheme Text-Steganography Using Public Key Cryptosystem
- ajas57777-782
- Biometric Encryption: E-Commerce Security Using Cryptography Techniques
- 1_Crypto.pptx
- Egal Issues Affecting E-Commerce - A Review of the Indian Information Technology Act 2000
- IEEE 2017 Enhanced RSA Algorithm With Varying Key Sizes for Data Security in Cloud

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.

- A Study of CryptographyUploaded byankit_uiet
- En Cryptolog yUploaded bylipika008
- CCCC.docxUploaded byGeorge Kariuki
- PROBLEMSUploaded byEl- Tally
- IJAIEM-2013-04-27-079Uploaded byAnonymous vQrJlEN
- CS402_CourseBookUploaded byBarham A. Ahmad
- Quantum Cryptography EditedUploaded byCody Mosblech
- TINY AlgorithmUploaded byramachandra
- Handycipher: a Low-tech, Randomized, Symmetric-key CryptosystemUploaded bygxsteph
- A Contemporary Polyalphabetic Cipher Using Comprehensive Vigenere TableUploaded byWorld of Computer Science and Information Technology Journal
- MSIS Exam SSI809 2015 16 SolutionUploaded byS
- Security Mechanism for Online Transactions Using Mobile AgentsUploaded byDr Riktesh Srivastava
- ICT DevelopmentUploaded byshivpreetsandhu
- ICT Development_Uploaded byshivpreetsandhu
- Information Hiding in CSS: A Secure Scheme Text-Steganography Using Public Key CryptosystemUploaded byijcisjournal
- ajas57777-782Uploaded byComputerElectronics
- Biometric Encryption: E-Commerce Security Using Cryptography TechniquesUploaded byJASH MATHEW
- 1_Crypto.pptxUploaded byAbbas Shaikh
- Egal Issues Affecting E-Commerce - A Review of the Indian Information Technology Act 2000Uploaded bylover_heartbreaker20
- IEEE 2017 Enhanced RSA Algorithm With Varying Key Sizes for Data Security in CloudUploaded byakash rawat
- A Critical Reassessment OfUploaded byijcisjournal
- syllbusUploaded byharitrohit
- 2 ijecs.pdfUploaded byBalu
- Answer CCNA Security Chapter 7 Test – CCNAS v1.1 _ Invisible AlgorithmUploaded byIcostyle
- On the Performance of Symmetrical and Asymmetrical Encryption for Real-Time Video Conferencing SystemUploaded byijcsis
- Implementation of De-Duplication AlgorithmUploaded byIRJET Journal
- Syllabus - Cryptography Study_GuideUploaded byDionisio
- TYBSc IT SyllabusUploaded byRohit R Rahate
- IBS EcommerceWebsite v1.04 Jan05Uploaded bykamijafri
- The Affine Cipher is Another Example of a Monoalphabetic Substituiton CipherUploaded byMaria Pein

- Attitude Toward CriminalsUploaded byagnes
- Work Breakdown StructureUploaded bySaqib Iqbal
- Using the OracleAS 10Uploaded bydbwalya
- Lab ReportUploaded byFarisRazzak
- Radiometric Dating - A.SnellingUploaded by7ett_
- Cooling Tower Handbook_FINAL.pdfUploaded byOscarJimenez1987
- CBM Sample Test PaperUploaded byimran3000
- form 12-student internship evaluationUploaded byapi-236881554
- Who Needs a Case Formulation and WhyUploaded byferreira.pipe3240
- 10.1007_978-1-84882-952-7_1Uploaded bykhalala
- bio 20 - oct 20Uploaded byapi-301939115
- Cattell, A shortened basic English version form of the 16 pf questionnaireUploaded byMr_AB
- Tests for One ROC CurveUploaded byscjofyWFawlroa2r06YFVabfbaj
- Fuselage LoadsUploaded byheltonsilva13
- Travis (1959) Towards a New Concept of TonalityUploaded byLógica Usb
- Bruce Rauner approval rating pollUploaded byChadMerda
- Chapter 2 MicroeconUploaded byLucasStark
- whitepaper_lyophilizationUploaded bysiruslara6491
- FPA-13 Exam Prep Guide BetaUploaded byradqudah
- The Great Harmonia - V - The Thinker - Andrew Jackson DavisUploaded byRobert Bayer
- african security architecture.pdfUploaded byPaul Soi
- students module f unit 1 lesson 1 exp 1Uploaded byapi-240724606
- Omicron CMC356 Relay Test With Advanced Protection Software DatasheetUploaded bykra_am
- Crisis ManagementUploaded bymihaela_sora7273
- Angelelli Predication Theory Classical vs ModernUploaded byecrcau
- NASA Facts Marshall Space Flight Center, Huntsville AlabamaUploaded byBob Andrepont
- Strategic Marketing Plan For Aman Bank in LibyaUploaded byIOSRjournal
- lecture1_chile_SGAs.pdfUploaded byMarcos Peñailillo Escarate
- 61800357 MCGRATH MCGRATH Alister E Teologia Sistematica Historica e Filosofica QUESTIONARIOUploaded byRobert Collins
- Crm Middleware1Uploaded bymkumarshahi