Information and Computer Security CPIS 312 Lab 3

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

CAP Cryptographic Analysis Program
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Intro To Encryption Exercise 1. Monoalphabetic Ciphers Examples:  Caesar Cipher  At Bash  PigPen (Will be demonstrated)  …
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 5 Wenbing Zhao Department of Electrical and Computer Engineering.
CPSC CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques.
Chapter 2 – Classical Encryption Techniques
Introduction to Cryptography
Cryptography Week-6.
Security in Computing Cryptography (Introduction) Derived from Greek words: ‘Kruptos’ (hidden) and ‘graphein’ (writing.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Computer System Security CSE 5339/7339
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Hill Cipher Developed by the mathematician Lester Hill in The encryption algorithm takes m successive plain text and substitute for them m cipher.
ITMS – 3153 Information Systems Security
Bit Cipher 1. Example of bit Cipher 2 Practical Stream Cipher 3.
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Cryptography (Traditional Ciphers)
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Security in Computing Cryptography (Traditional Ciphers)
24-Nov-15Security Cryptography Cryptography is the science and art of transforming messages to make them secure and immune to attacks. It involves plaintext,
Vigenère Tableau Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Information and Computer Security CPIS 312 Lab 8 1 Asymmetric Key Algorithms RSA Algorithm TRIGUI Mohamed Salim.
Chapter Two: Classic Cryptography
Information and Computer Security CPIS 312 Lab 1
Information and Computer Security CPIS 312 Lab 6 & 7 1 TRIGUI Mohamed Salim Symmetric key cryptography.
Information Security CPIT 425 Instructor: Bashair Alrashed LAB1.
1 Introduction to Cryptography Chapter-4. Definitions  Cryptography = the science (art) of encryption  Cryptanalysis = the science (art) of breaking.
Lecture 3 1. TRANSPOSITION CIPHERS 2 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging.
CPIS 312 Chapter Three: Symmetric KEY CRYPTO By Dr. Daniyal Alghazzawi 2011 Term 2.
@Yuan Xue Quick Review.
Chapter 8: Network Security
Row Transposition Ciphers
Practical Questions Theoretical Questions
Network Security.
Columnar Transposition
History and Background Part 4: Transposition Ciphers
Cryptography and Network Security
Introduction Of System Security
Computer and Data Security 4th Class
Information and Computer Security CPIS 312 Lab 2
Taehyung Kim HPC Lab. POSTECH
Vernam Cipher Group Members: Muhammad Awais Muhammad Hasnain khan
Cryptography.
- Stream Cipher and Block Cipher - Confusion & Diffusion
Chapter 8: Network Security
Unit 2 “Implementation of a RC5 block cipher algorithm and implementing an attack on it”
Rivest, Shamir and Adleman
ICS 454: Principles of Cryptography
Analysis of the RSA Encryption Algorithm
Section 2: Cryptography
Network Security.
Running Key Cipher The security of polyalphabetic substitution cipher reside in key length. In running-key cipher, the length of key must be equal the.
. Columnar Transposition
Types of Cryptanalysis attacks
Chapter 8: Network Security
Information and Computer Security CPIS 312 Lab 4 & 5
Symmetric Encryption or conventional / private-key / single-key
ICS 555: Block Ciphers & DES Sultan Almuhammadi.
Elect. Codebook, Cipher Block Chaining
Feistel Cipher Structure
Chapter 8: Network Security
Presentation transcript:

Information and Computer Security CPIS 312 Lab 3 Classical Encryption TRIGUI Mohamed Salim

Lab Objectives Students will learn how Columnar algorithm works. Students will try to apply Columnar algorithm practically and they will be able to know how each letter is encrypted using different key. Students will learn how to adjust some parameters of Columnar algorithm, changing key and notice the affects on the cipher text. Students will learn how to work with Transposition encryption and decryption algorithm and they should select a suitable programming language to implement it.

Lab Outcomes At the end of this lab, students will be able to work with Columnar algorithm by testing it practically during the lab. Students will be able to work with Transposition encryption and decryption algorithm and they will be asked to implement it.

Traditional symmetric key ciphers

One-Time Pads

One-Time Pads To decrypt: (Ci – Ki) mod 26 Choose a random bit string as the key Convert the plaintext into a bit string Compute the XOR of these two strings, bit by bit To decrypt: (Ci – Ki) mod 26 Note on rules of mod on negative number: “The mod function is defined as the amount by which a number exceeds the largest integer multiple of the divisor that is not greater than that number” (http://mathforum.org/library/drmath/view/52343.html) Modula op always return non-negative number E.g., (19-76) mod 26 = (-57) mod 26 = (-78+21) mod 26 = 21

One-Time Pads Plaintext V E R N A M C I P H Numeric Equivalent 21 4 17 13 12 2 8 15 7 + Random Number 76 48 16 82 44 3 58 11 60 5 47 88 = Sum 97 52 33 95 19 75 51 105 = mod 26 18 23 25 1 Ciphertext t a h r s p i x m z b Ciphertext t a h r s p i x m z b Numeric Equivalent 19 7 17 18 15 8 23 12 25 1 - One-time pad 76 48 16 82 44 3 58 11 60 5 47 88 = Difference -57 -48 -9 -65 -26 -50 -37 -22 -87 = mod 26 21 4 13 2 Plaintext V E R N A M C I P H

Columnar cipher is a more complex transposition write letters of message out in rows over a specified number of columns Number of columns = key length then reorder the columns according to some key before reading off the rows

Columnar cipher Plaintext (M)= ATTACK POSTPONED UNTIL TWO AM Key: 4312567 Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ 7 6 5 2 1 3 4 Column Out p k c a t A Plaintext e n o s l i u d x m w

Columnar cipher Plaintext (M)= THIS IS A MESSAGE TO SHOW HOW COLUMNAR WORKS Key: 351462 Ciphertext: IETHUO SAHCAS TAGOOR SSOOMR HMEWLW ISSWNK 2 6 4 1 5 3 Column Out s i h t Plaintext a e m o g c w n u l k r

Columnar cipher Ciphertext(C): EVLNX ACDTX ESEAX ROFOX DEECX WIREE Key: 632415 Plaintext (M): WE ARE DISCOVERED FLEE AT ONCE 5 1 4 2 3 6 Column Out d e r a w Ciphertext v o c s i l f n t x

Example import java.io.*; class encryptCeasar{ public static void main(String[] args){ try{ FileReader fr = new FileReader(args[0]); BufferedReader br = new BufferedReader(fr); String plaintext = br.readLine(); plaintext = plaintext.toUpperCase(); int shiftKey = Integer.parseInt(args[1]); shiftKey = shiftKey % 26;

Example String cipherText = ""; for (int i=0; i<plaintext.length(); i++){ int asciiValue = (int) plaintext.charAt(i); if (asciiValue < 65 || asciiValue > 90){ cipherText += plaintext.charAt(i); Continue;} int basicValue = asciiValue - 65; int newAsciiValue = 65 + ((basicValue + shiftKey) % 26) ; cipherText += (char) newAsciiValue;} System.out.print(cipherText);} catch(Exception e){e.printStackTrace();}} }

We are studying information and computer security Homework Encrypt the following plaintext using Columnar transposition: We are studying information and computer security Use your first name as keyword