LAB#3 CLASSICAL ENCRYPTION CPIT 425. This diagram is taken from Dr.Omaima slides.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Computer Science 101 Data Encryption And Computer Networks.
By: Mr Hashem Alaidaros MIS 326 Lecture 6 Title: E-Business Security.
 Caesar used to encrypt his messages using a very simple algorithm, which could be easily decrypted if you know the key.  He would take each letter.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
CYPHER INDEX n Introduction n Background n Demo INTRODUCTION n Cypher is a software toolkit designed to aid in the decryption of standard (historical)
CPSC CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
Expert System for Analyzing Simple Ciphers: Properties of Cipher Texts Carolyn Rucci Advisor: Ralph Morelli 1 year project.
Encryption. Introduction Computer security is the prevention of or protection against –access to information by unauthorized recipients –intentional but.
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
David Froot.  How do we transmit information and data, especially over the internet, in a way that is secure and unreadable by anyone but the sender.
Polyalphabetic Substitution Ciphers. First Steps Towards Complexity  If one alphabet is good, then two alphabets must be better!  By doubling the number.
Cryptography Programming Lab
CS110: Computers and the Internet Encryption and Certificates.
Crypto Laboratory Winter Alexander Grechin and Zohar Rogel Under supervision of Zvika Berkovich.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
Bit Cipher 1. Example of bit Cipher 2 Practical Stream Cipher 3.
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
Abstract: Cryptology is a combination of the processes of keeping a message secret (cryptography) and trying to break the secrecy of that message (cryptoanalysis).
Information Security By:-H.M.Patel. Information security There are three aspects of information security Security service Security mechanism Security.
Encryption on the Internet Eirik Albrigtsen. Encryption & Decryption Text Unreadable Text key + encryption method Unreadable Text Text key + decryption.
Web Tools for Classical Cryptology Tristan Beeble.
CSCI 391: Practical Cryptology Substitution Monoalphabetic 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,
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Security PART VII.
MAT 1000 Mathematics in Today's World Winter 2015.
Encryption CS110: Computer Science and the Internet.
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
Introduction to Cryptography Lecture 8. Polyalphabetic Substitutions Definition: Let be different substitution ciphers. Then to encrypt the message apply.
Cryptography.
Invitation to Computer Science 5 th Edition Chapter 8 Information Security.
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
ROT13 cipher. The ROT13 cipher is a substitution cipher with a specific key where the letters of the alphabet are offset 13 places. Example: all 'A's.
Introduction to Cryptography Lecture 4. Caesar Cipher Gaius Julius Caesar (100 B.C.- 44 B.C.) General Politician Dictator of Rome Creator of Caesar Cipher.
Encryption. LEARNING OBJECTIVES: BY THE END OF THE LESSON YOU SHOULD KNOW. What encryption is and why it is important The basics of encryption techniques.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
Chapter Two: Classic Cryptography
Information and Computer Security CPIS 312 Lab 1
Lecture 2 Classical Cipher System SIMPLE SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY
CHAPTER 14 ENCRYPTION AND DECRYPTION Sajina Pradhan
Information Security CPIT 425 Instructor: Bashair Alrashed LAB1.
Intelligent Data Systems Lab. Department of Computer Science & Engineering Practices 컴퓨터의 개념 및 실습 4 월 11 일.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
Affine Cipher.
Teaching with Python Lukasz Ziarek SUNY Buffalo
SUBSTITUTION CIPHERS A substitution technique is one in which the letters/number/symbols of plain text are replaced by other letters/numbers/symbols.
Information and Computer Security CPIS 312 Lab 2
Polyalphabetic Ciphers
Outline Some Basic Terminology Symmetric Encryption
Networks Encryption.
Five-minute starter task
PART VII Security.
Encryption with Keys and Passwords
Encryption on the Internet
Simple Encryption- Lesson 5
Suppose I want to add all the even integers from 1 to 100 (inclusive)
2016 REPORT.
Homework #1 Chap. 1, 3, 4 J. H. Wang Oct. 2, 2018.
Digital Communications
Double Transpositions
Homophonic Substitution Cipher
Basics Of Symmetric Encryption
Symmetric Encryption or conventional / private-key / single-key
2016 REPORT.
Presentation transcript:

LAB#3 CLASSICAL ENCRYPTION CPIT 425

This diagram is taken from Dr.Omaima slides

Definitions  cipher = an algorithm to transform a normal message into one that is unrecognizable  encrypt (encode) = to convert plaintext to ciphertext using a cipher and a key  decrypt (decode) = to convert ciphertext back into plaintext using a cipher and a key  key = critical information used by the cipher, known only to the sender & receiver

Caesar Cipher  Here is a Caesar cipher using the shift parameter 3 as the key: key Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC Ex: Plaintext: the quick brown fox jumps over the lazy dog Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ

Caesar Cipher  The general Caesar algorithm is: C i = (M i +k) mod 26 M i = (C i -k) mod 26

Vigenère Cipher  The general Vigener algorithm is: C i = M i +k i mod 26 M i = C i -k i mod 26

Vigenère Cipher  The Vigenère square or Vigenère table

Vigenère Cipher  Ex: encrypt the sentence “This is an example of the Vigenere cipher” using the key “vector”: Plaintext:This is an example of the Vigenere cipher Key:vectorvectorvectorvector … Ciphertext:olklwjvrgqodkpghtkcixbuviitxqzklgk

Lab Work  Lab work is a Java implementation of the Caesar cipher.  The program reads the input message from the standard input, and outputs the ciphertext on the standard output.  The program reads the key from standard input. It is an integer in the range from 0 to 25 inclusive, and one must use the same key for encryption and decryption.

Lab Work What to do:  Using the above ideas and CaesarCipher_lab.java file to Complete the program which used to implement the Caesar Cipher algorithm (when ever you see TO DO:, add your code) Possible improvements:  Modify the code to read the plaintext and write the ciphertext in file.

Lab Work (Input/Output)

Homework#1 What to do/submit:  Modify the Caesar Cipher code to implement the Substitution (Poly) Cipher.  Write a Java program with a text field, a button and a text area as shown in the following figure. The user should enter the key word in the text field. When the button “Encrypt / Decrypt” is clicked, the text area will display the encrypted and the decrypted text from the input text file(in.txt)  Read the plaintext from a text file(in.txt) and write the ciphertext(encrypted text) to another text file(out1.txt) and then write the text after decryption to another text file (out2.txt).  Read the key word from the standard input.  Submit a soft copy + a report contains the following:  Cover page (student name- ID- CPIT425Lab – HW#1)  Substitution (Poly) Cipher java source code.  Print the output of your code (text files: out1.txt and out2.txt).  Add COMMENTS to your code

Homework#1  Read this text from the input file: The Vigenere cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution. The Vigenere cipher has been reinvented many times. The method was originally described by Giovan Battista Bellaso. Consequently, many people have tried to implement encryption schemes that are essentially Vigenere ciphers, only to have them broken.

Homework Policy  Due date : next lab.  Any late deliveries will NOT be accepted.  In the case of cheating, you will get zero degree.