Download presentation
Presentation is loading. Please wait.
Published byGregory Lambert Modified over 8 years ago
1
Introduction to Cryptography Hyunsung Kim, PhD kim@kiu.ac.kr University of Malawi, Chancellor College Kyungil University February, 2016
2
Cryptography Crypto + graphy Crypto : hidden, secret Graphy : writing, study Cryptography : Practice and study of techniques for secure communication in the presence of third parties called adversaries 2/26
3
3/26 Course material Title : An introduction to cryptography and cryptanalysis Author : Edward Schaefer, Santa Clara University Link : http://math.scu.edu/~eschaefe/book.pdf Course material : http://ce.kiu.ac.kr/~hskim/crypto.html http://ce.kiu.ac.kr/~hskim/crypto.html Auxiliary book Cryptography and Network Security Principles and Practice, William Stallings http://www.inf.ufsc.br/~bosco/ensino/ine5680/material-cripto-seg/2014-1/Stallings/Stallings_Cryptography_and_Network_Security.pdf
4
4/26 Course Configuration Part 1 : Introduction Vocabulary Concepts History Crash course in number theory Running time of algorithms Part II : Cryptography Simple Cryptosystems Symmetric Key Cryptography Finite Fields Public Key Cryptography Part III : Applications on Cryptography Part IV : Cryptanalysis
5
5/26 Contents 1. Terms to be used frequency 2. Concepts 3. History
6
Terms to be used frequency A plaintext message, or simply a plaintext, is a message to be communicated A ciphertext message or simply a ciphertext, is disguised version of a plaintext message Encryption is the process of creating a ciphertext from a plaintext Decryption is the process of turning a ciphertext back into a plaintext To encode a plaintext changes the plaintext into a series of bits (usually) or numbers (traditionally) Decoding turns bits or numbers back into plaintext 6/26
7
Terms to be used frequency Plaintext, ciphertext, encryption, decryption, encode, decoding 7/26 …...……...… plaintextplaintext Insecure channel encode encode AliceBob …...… ciphertext encryption …...… ciphertext decode decode decryption A bit is simply a 0 or a 1. There is nothing secret about encoding
8
Terms to be used frequency A stream cipher operates on a message symbol-by- symbol, or nowadays bit-by-bit A block cipher operates on blocks of symbols A digraph is a pair of letters and a trigraph is a triple of letters A transposition cipher rearranges the letters, symbols or bits in a plaintext A substitution cipher replaces letters, symbols or bits in a plaintext with others without changing the order 8/26
9
Terms to be used frequency 9/26 Stream cipher Block cipher
10
Terms to be used frequency Transposition cipher Substitution cipher 10/26
11
Terms to be used frequency A product cipher alternates transposition and substitution An algorithm is a series of steps performed by a computer (nowadays) or a person (traditionally) to perform some tasks A cryptosystem consists of an enciphering algorithm and a deciphering algorithm 11/26
12
Terms to be used frequency A symmetric key cryptosystem requires a secret shared key. Two users must agree on a key ahead of time In a public key cryptosystem, each user has an encrypting key which is published and a decrypting key which is not Cryptanalysis is the process by which the enemy tries to turn ciphertext into plaintext 12/26
13
Symmetric key cryptosystem, public key cryptosystem Terms to be used frequency 13/26 …...……...… plaintextplaintext algorithm AliceBob …...……...… algorithm Exposable to attacker Kept in secret
14
Cryptosystems Those that have been broken (most) Those that have not yet been analyzed (because they are new and not yet widely used) Those that have been analyzed but not broken RSA Discrete log cryptosystems Triple-DES AES 14/26
15
Cryptanalysis Possible ways an enemy can turn ciphertext into plaintext Methods Steal/purchase/bribe to get key Exploit sloppy implementation/protocol problems (hacking) Examples : someone used spouse’s name as key, someone sent key along with message 15/26
16
The Goal of Cryptography 16/26 Integrity Confidentiality Availability Security
17
The Goal of Cryptography Confidentiality : Keeping data secret from all but Alice and Bob Data integrity : Ensuring that data has not been altered by unauthorized means Data origin authentication : Collaborating the source of data - Bob should be able to verify that data purportedly sent by Alice indeed originated with Alice Entity authentication : Collaborating the identity of an entity - Bob should be convinced of the identity of the other communicating entity Non-repudiation : Preventing an entity from denying previous commitments or actions - when Bon receives a message purportedly from Alice, not only is Bob convinced that the message originated with Alice, but Bob can convince a neutral third party of this; thus Alice cannot deny having sent the message to Bob 17/26
18
Concepts Encryption and decryption should be easy for the proper users, Alice and Bob. However, decryption should be hard for Eve Security and practicality of a successful cryptosystem are almost always tradeoffs. Practicality issues : Time, Storage Must assume that the enemy will find out about the nature of a cryptosystem and will only be missing a key 18/26
19
History-Spartan Scytale Cipher 400 B.C. Spartan Example of transposition cipher Letters were written on a long thin strip of leather wrapped around a cylinder 19/26
20
History-Caesar Cipher Shift all letters three to the right In our alphabet that would send A->D B->E, … Z->C Example of substitution cipher Ex) Encrypting ‘I LOVE U’ becomes ‘L ORYH X’ becomes ‘L ORYH X’ Here the encrypting key is 3 Here the encrypting key is 3 20/26
21
History-Playfair Cipher 1910’s British Playfair cipher One of the earliest to operate on digraphs Example of substitution cipher Playfair cipher Uses 5*5 table containing a key word or phrase Ex) Let us encrypt the message ‘Hide the gold in the tree stump’ using a key ‘chancellor college’ 21/26
22
History-Playfair Cipher Generation of the key table First fill in the spaces in the table with the letters of the keyword (dropping any duplicate letters) Fill the remaining spaces with the rest of the letters of the alphabet in order (usually omitting "Q" to reduce the alphabet to fit; other versions put both "I" and "J" in the same space) The key can be written in the top rows of the table, from left to right, or in some other pattern, such as a spiral beginning in the upper-left-hand corner and ending in the center. The keyword together with the conventions for filling in the 5 by 5 table constitute the cipher key 22/26 CHANCELLOR COLLEGE CHAN CX E L O R G A~Z (I/J) A X B DFI/JKM PQSTU VWXYZ
23
History-Playfair Cipher Preparation of input To encrypt a message, one would break the message into digrams (groups of 2 letters) such that, for example, "HelloWorld" becomes "HE LL OW OR LD", and map them out on the key table If needed, append an uncommon monogram to complete the final digram. The two letters of the digram are considered as the opposite corners of a rectangle in the key table. If both letters are the same (or only one letter is left), add an "X" after the first letter. Encrypt the new pair and continue 23/26 Plaintext : Hide the gold in the tree stump Digrams : HI DE TH EG OL DI NT HE TR EE ST UM P HI DE TH EG OL DI NT HE TR EX ES TU MP HI DE TH EG OL DI NT HE TR EX ES TU MP
24
History-Playfair Cipher Encryption algorithm 1.If the letters appear on the same row of your table, replace them with the letters to their immediate right respectively 2.If the letters appear on the same column of your table, replace them with the letters immediately below respectively 3.If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. The order is important – the first letter of the encrypted pair is the one that lies on the same row as the first letter of the plaintext pair 24/26 CHANE L O R G B DFI/JKM PQSTU VWXYZ Digrams : HI DE TH EG OL DI NT HE TR EX ES TU MP
25
History-Playfair Cipher Decryption algorithm To decrypt, use the INVERSE (opposite) of the last 3 rules, and the 1st as-is (dropping any extra "X"s) 25/26
26
History-Playfair Cipher Example Let us encrypt the message ‘the security is on your hands’ using a key as your name Steps 1.Generate a key table 2.Preparation of input with digrams 3.Encrypt the input 4.Decrypt the ciphertext 26/26
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.