29 views

Uploaded by Khalil Al-khateeb

- IJAIEM-2013-04-27-079
- CS402_CourseBook
- CCCC.docx
- A Study of Cryptography
- En Cryptolog y
- PROBLEMS
- ICT Development
- Information Hiding in CSS: A Secure Scheme Text-Steganography Using Public Key Cryptosystem
- ICT Development_
- Security Mechanism for Online Transactions Using Mobile Agents
- TINY Algorithm
- Handycipher: a Low-tech, Randomized, Symmetric-key Cryptosystem
- Quantum Cryptography Edited
- A Contemporary Polyalphabetic Cipher Using Comprehensive Vigenere Table
- MSIS Exam SSI809 2015 16 Solution
- 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
- ajas57777-782
- Biometric Encryption: E-Commerce Security Using Cryptography Techniques

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.

- IJAIEM-2013-04-27-079Uploaded byAnonymous vQrJlEN
- CS402_CourseBookUploaded byBarham A. Ahmad
- CCCC.docxUploaded byGeorge Kariuki
- A Study of CryptographyUploaded byankit_uiet
- En Cryptolog yUploaded bylipika008
- PROBLEMSUploaded byEl- Tally
- ICT DevelopmentUploaded byshivpreetsandhu
- Information Hiding in CSS: A Secure Scheme Text-Steganography Using Public Key CryptosystemUploaded byijcisjournal
- ICT Development_Uploaded byshivpreetsandhu
- Security Mechanism for Online Transactions Using Mobile AgentsUploaded byDr Riktesh Srivastava
- TINY AlgorithmUploaded byramachandra
- Handycipher: a Low-tech, Randomized, Symmetric-key CryptosystemUploaded bygxsteph
- Quantum Cryptography EditedUploaded byCody Mosblech
- A Contemporary Polyalphabetic Cipher Using Comprehensive Vigenere TableUploaded byWorld of Computer Science and Information Technology Journal
- MSIS Exam SSI809 2015 16 SolutionUploaded byS
- 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
- ajas57777-782Uploaded byComputerElectronics
- Biometric Encryption: E-Commerce Security Using Cryptography TechniquesUploaded byJASH MATHEW
- Implementation of De-Duplication AlgorithmUploaded byIRJET Journal
- On the Performance of Symmetrical and Asymmetrical Encryption for Real-Time Video Conferencing SystemUploaded byijcsis
- 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
- Syllabus - Cryptography Study_GuideUploaded byDionisio
- syllbusUploaded byharitrohit
- A Critical Reassessment OfUploaded byijcisjournal
- Answer CCNA Security Chapter 7 Test – CCNAS v1.1 _ Invisible AlgorithmUploaded byIcostyle
- 2 ijecs.pdfUploaded byBalu

- As 2805.6.5.2-2000 Electronic Funds Transfer - Requirements for Interfaces Key Management - TCU InitializatioUploaded bySAI Global - APAC
- 4th Exam - dmUploaded byizangel
- Eighth Semester Syllabus GBTUUploaded byDiptesh Kanojia
- Manual for the Solution of Military CiphersUploaded byDruid_ian
- A Robust Technique to Encrypt and Decrypt Confidential Data within ImageUploaded byinventionjournals
- CodeUploaded byjacksonzchen
- A Novel Approach in Image Encryption Using AES AlgorithmUploaded byAnonymous lPvvgiQjR
- NETWORK SECURITY USING ENCRYPTION TECHNIQUESUploaded byAnonymous vQrJlEN
- Cryptanalysis of the EnigmaUploaded byyepitsdiana
- 7 Basic CryptographyUploaded byPratiwi Putriyan
- INS_521437Uploaded byAshwani Jha
- encryptionUploaded byMohamed Kiwan
- ASSOCIATION OF CRYPTOGRAPHY AND STEGANOGRAPHYUploaded byIJeete
- DocumentationUploaded byankit
- ARTIFICIAL NEURAL CRYPTOGRAPHY DATAGRAM HIDING TECHNIQUES FOR COMPUTER SECURITY OBJECTS REGISTERUploaded byIAEME Publication
- e 124450Uploaded bywww.irjes.com
- Secure Disclosure of Trespassing Mechanisms using Digital Signature AlgorithmUploaded byIntegrated Intelligent Research
- Network SecurityUploaded byPulkit Khalis Sehgal
- NEW ALGORITHM FOR WIRELESS NETWORK COMMUNICATION SECURITYUploaded byijcisjournal
- 65-75Uploaded byThrizz Febridoni
- Library of Computer Security Related AlgorithmsUploaded byHaritha Greeny
- Assignment 1.docxUploaded byVinayak Nadar
- International Journal of Engineering Research and Development (IJERD)Uploaded byIJERD
- 555_Spring12_topic03Uploaded bytcskumar
- Groebert Automatic.identification.of.Cryptographic.primitives.in.SoftwareUploaded byassimilat
- 1_Crypto (1)Uploaded bygarg
- Extensible Messaging GatewayUploaded byvijeshvnair
- Cryptography and Network SecurityUploaded byMary Helen
- Cryptography (ANDDF)Uploaded bydandi
- The Cryptoclub Using Mathematics to Make and Break Secret CodesUploaded bysarma5153