1 / 72

Conventional Cryptography

Conventional Cryptography. Classical Encryption Techniques. Topics. Introduction to Cryptography Encryption / Decryption Basic Terminologies Cryptography Types Classical Cryptographic Techniques Stenography Mono-alphabetic & Poly-alphabetic Caesar Cipher Transposition Cipher OTPs

ulmer
Télécharger la présentation

Conventional Cryptography

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Conventional Cryptography Classical Encryption Techniques

  2. Topics • Introduction to Cryptography • Encryption / Decryption • Basic Terminologies • Cryptography Types • Classical Cryptographic Techniques • Stenography • Mono-alphabetic & Poly-alphabetic • Caesar Cipher • Transposition Cipher • OTPs • Rotor Machines

  3. Encryption / Decryption • The process of disguising a message (plaintext) into an unintelligible form (ciphertext) by an encryption algorithm and a secret variable, called a key • The process of transforming ciphertext back into plaintext using the encryption algorithm and a key

  4. Cryptography • Cryptography is the study of secret (crypto-) writing (-graphy) concerned with developing algorithms which may be used to: • Conceal the context of some message from all except the sender and recipient (privacy or secrecy), and/or • Verify the correctness of a message to the recipient (authentication or integrity) • Basis of many technological solutions to computer and communications security problems. • Cryptography may be part of a security solution, but it is never the whole solution. At best, it transforms a more general security problem into a key management problem.

  5. Crypto Systems Classification • Two requirements for secure use of symmetric encryption: • a strong encryption algorithm • a secret key known only to sender / receiver Y = EK(X) X = DK(Y) • Assume encryption algorithm is known • Implies a secure channel to distribute key • The way in which the plaintext is processed • Block cipher • Stream cipher

  6. History of Cryptography • Ancient Cipher • Have a history of some 4000 years • Ancient Egyptians encoded some hieroglyphic writings on monuments • Ancient Hebrews enciphered certain words in the scriptures using the ATBASH cipher • Greek writings show the first discussions of the use of secret writings.

  7. Hieroglyphic Writings

  8. Basic Terminologies • cryptology • the field encompassing both cryptography and cryptanalysis • cryptography • the art or science encompassing the principles and methods of transforming an intelligible message into one that is unintelligible, and then retransforming that message back to its original form. • cryptanalysis (codebreaking) • the study of principles and methods of transforming an unintelligible message back into an intelligible message without knowledge of the key. • plaintext • the original intelligible message • ciphertext • the transformed message

  9. Basic Terminologies (Contd.) • cipher • Mathematical algorithm for transforming an intelligible message into unintelligible by transposition and/or substitution methods • key • Critical information used by the cipher, known only to the sender & receiver • encipher (encrypt) • the process of converting plaintext to ciphertext using a cipher and a key • decipher (decrypt) • the process of converting ciphertext back into plaintext using a cipher and a key • code • an algorithm for transforming an intelligible message into an unintelligible one using a code-book

  10. Symbols Used P plaintext C ciphertext E encryption function D decryption function E(P) = C encrypting plaintext yields ciphertext D(C) = P decrypting ciphertext yields plaintext D(E(P)) = P decrypting encrypted plaintext yields plaintext K Key

  11. Cryptographic Concept • Encryption C = EK(P) • Decryption P = EK-1(C) • EK is chosen from a family of transformations known as a cryptographic system. • The parameter that selects the individual transformation is called the key K, selected from a keyspace K.

  12. The Key ! • All modern algorithms use a key to control encryption and decryption • The key used for decryption can be different from the encryption key, but for most algorithms they are the same.

  13. Key Management Problems • Key management is the hardest part of cryptography • Two classes of keys • Short-term session keys (sometimes called ephemeral keys) • Generated automatically and invisibly • Used for one message or session and discarded • Long-term keys • Generated explicitly by the user • Long-term keys are used for two purposes • Authentication (including access control, integrity, and non-repudiation) • Confidentiality (encryption) • Establish session keys • Protect stored data

  14. Key Lifetimes and Key Compromise • Authentication keys • Public keys may have an long lifetime (decades) • Conventional keys have shorter lifetimes (a year or two) • If the key is compromised • Revoke the key • Effects of compromise • Authentication: Signed documents are rendered invalid unless time-stamped. • Confidentiality: All data encrypted with it is compromised.

  15. Cryptography Types • Symmetric cryptography • Use the same key for encryption and decryption • Asymmetric cryptography • More popularly known as Public Key Cryptography • Use different keys for encryption and decryption

  16. Symmetric Cryptography

  17. Asymmetric Cryptography

  18. Comparison of SK and PK Cryptography

  19. Cryptanalysis • Cryptanalysis is the process of breaking an encrypted message without knowledge of key • Several different types of attacks can be identified: • Ciphertext only • only known: algorithm and some ciphertext • use statistical attacks only • Purpose is to recover plaintext and/or key • must be able to identify when have plaintext • Known plaintext • know (or strongly suspect) some plaintext-ciphertext pairs • use this knowledge in attacking cipher and recover key

  20. Cryptanalytic Attacks Contd.. • Chosen plaintext (differential cryptanalysis) • can select plaintext and obtain corresponding ciphertext – more powerful than known plaintext attack • Picks patterns that may reveal info/structure of key • Chosen ciphertext (less probable attack) • can select ciphertext and obtain corresponding plaintext • Chosen plaintext-ciphertext (Chosen Text) • can select plaintext and obtain corresponding ciphertext, or select ciphertext and obtain plaintext

  21. Cryptology • Cryptology is the branch of mathematics that studies the mathematical foundations of cryptographic methods. • Cryptology comes from the Greek words Kryptos, meaning hidden, and Graphen, meaning to write. Cryptology is actually the study of codes and ciphers. • Cryptology = both cryptography and cryptanalysis

  22. Algorithm Secrecy • Some cryptographic methods rely on the secrecy of the algorithms; such algorithms are only of historical interest and are not adequate for real-world needs. • Kerchoff’s Principle: If the strength of your new cryptosystems relies on the fact that the attacker does not know the algorithm's inner workings,you are sunk. Security through Obscurity Does Not Work !!!

  23. Cipher Security • unconditional security • With all computing power available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext • computational security • given limited computing resources (eg time needed for calculations is greater than age of universe), the cipher cannot be broken within the useful lifetime of the information

  24. Key Strengths

  25. Steganography • Simply takes one piece of information and hides it within another. • Stenography can also be used to place a hidden "trademark" in images, audio, and software, a technique referred to as watermarking. • More • http://members.tripod.com/steganography/stego/info.htm • http://www.belmont.cc.oh.us/Majors/Steno.html

  26. Classical Cryptographic Techniques Two basic components in classical ciphers: substitution and transposition • Substitution ciphers - has letters replaced by others • Monoalphabetic • Polyalphabetic • Transposition ciphers - has letters arranged in a different order

  27. Caesar Cipher – History • A Monoalphabetic Substitution Cipher • 2000 years ago Julius Ceasar used a simple substitution cipher, now known as the Caesar cipher • First attested use in military affairs (Gallic Wars) • General Caeser Algorithm • C = E(p) = (p + k) mod (26) • p = D(C) = (C – k) mod (26) • Replace each letter by 3rd letter on, eg. • e.g. SSUET is cipher as V V X H W

  28. Ceasar Cipher (contd.) • More generally can use any shift from 1 to 25 • i.e. replace each letter of message by a letter a fixed distance away • Specify key letter as the letter a plaintext A maps to • e.g. a key letter of F means • A map A to F, B to G, ... Y to D, Z to E • i.e. shift letters by 5 places • Hence have 25 useful ciphers

  29. Example: Caesar Cipher • Replace each letter of message by a letter a fixed distance away • e.g. use the 3rd letter on • L FDPH L VDZ L FRQTXHUHG (Cipher) • i came i saw i conquered (Plain) • i.e. Mapping in above case is as • ABCDEFGHIJKLMNOPQRSTUVWXYZ • DEFGHIJKLMNOPQRSTUVWXYZABC • Caesar Cipher as: • Encryption Ek : i -> i + k mod 26 • Decryption Dk : i -> i - k mod 26

  30. Cryptanalysis: Caesar Cipher • Exhaustive key search • Given some ciphertext, just try every shift of letters: • LIZHZLVKWRUHSODFHOHWWHUV Original Ciphertext KHYGYKUJVQTGRNCEGNGVVGTU Shift 1 JGXFXJTIUPSFQMBDFMFUUFST Shift 2 IFWEWISHTOREPLACELETTERS Shift 3 PlaintextHEVDVHRGSNQDOKZBDKDSSDQR Shift 4 GDUCUGQFRMPCNJYACJCRRCPQ Shift 5MJAIAMWLXSVITPEGIPIXXIVW Shift 25 • Class Room Task • Break ciphertext "GCUA VQ DTGCM"

  31. Arbitrary Substitution • A dramatic increase in the key space is achieved by allowing an arbitrary substitution. • There will be 26! or greater than 4 x 1026 possible keys. • The cryptanalysis can be exploited after looking at the regularities of the language. • This approach is referred as Frequency Distribution Cryptanalysis.

  32. Monoalphabetic Cipher contd. • Monoalphabetic substitution ciphers do not change relative letter frequencies • Calculate letter frequencies for ciphertext and compare counts/plots against known values.

  33. Example Cryptanalysis on Monoalphabetic Cipher • Given ciphertext: • Count relative letter frequencies (see text) and guess P & Z are e and t and guess ZW is ‘th’ and hence ZWP is ‘the’ using frequency diagrams. • Proceeding with trial and error finally get:

  34. Playfair Cipher • Not even the large number of keys in a monoalphabetic cipher provides security • One approach to improving security was to encrypt multiple letters instead of single letter at a time. • This approach will destroy to some extent the frequency structure of the letters. • ThePlayfair Cipheris one such example • Invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair

  35. Playfair Cipher • Invented by Sir Charles Wheatstone, in 1854. • Developed for Telegraph Secrecy • Based on the 5*5 matrix of letters constructed using a keyword. • The matrix is constructed by filling in the letters of the keyword (minus duplicates). • Then filling in the remainder of the matrix with the remaining letters in alphabetic order. • More… • http://raphael.math.uic.edu/~jeremy/crypt/contrib/hong.html • http://members.magnet.at/wilhelm.m.plotz/Doc/Playfair.html • http://www.math.temple.edu/~renault/cryptology/playfair.html • http://www.mactech.com/progchallenge/9909Challenge.html

  36. Playfair: Rules of Enciphering • Repeating plaintext letters are separated by a filler letter, such as x. • BALOON as BA LX LO ON • Plaintext letters that fall in same row of the matrix are each replaced by the letter to the right. • AR in arch as RM • Plaintext letters that fall in same column are each replaced by the letter beneath. • MU in mute as CM • Otherwise, each plaintext letter is replaced by the letter that lies in its corresponding row and column. • SH in shell as PB Refer to the matrix given in Text book on page 34.

  37. Using "playfair example" as the key, (assuming I and J are interchangeable) the table becomes:

  38. Encrypting the message "Hide the gold in the tree stump": HI DE TH EG OL DI NT HE TR EX ES TU MP

  39. Hill Cipher • Developed by the mathematician Lester Hill in 1929. • Implemented in the form of a machine using gears and chains like those used with bicycles. • The fact that it is impractical for hand use, while it predates the computer age. • More • http://math.vassar.edu/Classes/280/matrixcode.html • http://home.ecn.ab.ca/~jsavard/crypto/ro020103.htm

  40. HILL Cipher

  41. HILL Cipher contd. • If the determinant of the key matrix is zero then the inverse does not exist. Hence this key combination can be used for encryption but not decryption. Such keys are called weak keys. • E.g.

  42. HILL Cipher contd. • Known plaintext can be used to find the key

  43. Polyalphabetic Cipher • An approach to improving security is to use multiple cipher alphabets, hence the name Polyalphabetic ciphers • Makes cryptanalysis harder since have more alphabets to guess and because flattens frequency distribution • Use a key to select which alphabet is used for each letter of the message • ith letter of key specifies ith alphabet to use • Use each alphabet in turn • Repeat from start after end of key is reached

More Related