Decrypt Cryptotexts: GBLVMUB JOGPSNBUJLZ VMNIR RPNBMZ EBMFLP OFABKEFT Decrypt: VHFUHW GH GHXA VHFUHW GH GLHX, VHFUHW GH WURLV VH
Total Page:16
File Type:pdf, Size:1020Kb
PROLOGUE - I. Decrypt cryptotexts: Part IV GBLVMUB JOGPSNBUJLZ Secret-key cryptosystems VMNIR RPNBMZ EBMFLP OFABKEFT prof. Jozef Gruska IV054 4. Secret-key cryptosystems 2/99 PROLOGUE - II. CHAPTER 4: SECRET-KEY (SYMMETRIC) CRYPTOGRAPHY Decrypt: In this chapter we deal with some of the very old, or quite old, classical (secret-key or symmetric) cryptosystems and their cryptanalysis that were primarily used in the pre-computer era. VHFUHW GH GHXA These cryptosystems are too weak nowadays, too easy to break, especially VHFUHW GH GLHX, with computers. However, these simple cryptosystems give a good illustration of several of the VHFUHW GH WURLV important ideas of the cryptography and cryptanalysis. Moreover, most of them can be very useful in combination with more modern VHFUHW GH WRXV. cryptosystem - to add a new level of security. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 3/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 4/99 BASICS CRYPTOLOGY - HISTORY + APPLICATIONS Cryptology (= cryptography + cryptanalysis) has more than four thousand years long history. Some historical observation People have always had fascination with keeping information away from others. Some people – rulers, diplomats, military people, businessmen – have always had needs to keep some information away from others. BASICS Importance of cryptography nowadays Applications: cryptography is the key tool to make modern information transmission secure, and to create secure information society. Foundations: cryptography gave rise to several new key concepts of the foundation of informatics: one-way functions, computationally perfect pseudorandom generators, zero-knowledge proofs, holographic proofs, program self-testing and self-correcting, . prof. Jozef Gruska IV054 4. Secret-key cryptosystems 5/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 6/99 APPROACHES and PARADOXES in CRYPTOGRAPHY SECRET-KEY (SYMMETRIC) CRYPTOSYSTEMS - CIPHERS The cryptography deals with problem of sending a message (plaintext, ciphertext, cleartext), through an insecure channel, that may be tapped by an adversary Sound approaches to cryptography (eavesdropper, cryptanalyst), to a legal receiver. Secret-key (symmetric) cryptosystems scheme: Shannon’s approach based on information theory (Enemy could not have enough information to break a given cryptosystem). key source Current approach based on complexity theory. (Enemy could not have enough computation power to break a given cryptosystem). Very recent a new approach has been developed that is based on the laws and legal limitations of quantum physics. (Enemy would need to break laws of nature in sender cryptotext receiver C order to break a given cryptosystem). encryption decryption plaintext plaintext Paradoxes of modern cryptography: Positive results of modern cryptography are based on negative results of computational complexity theory. Computers, that were designed originally for decryption, seem to be now more useful adversary for encryption. ? prof. Jozef Gruska IV054 4. Secret-key cryptosystems 7/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 8/99 SECRET-KEY (PRIVATE-KEY - SYMMETRIC) COMPONENTS of CRYPTOSYSTEMS: CRYPTOSYSTEMS Plaintext-space: P – a set of plaintexts (messages) over an alphabet Cryptotext-space: C – a set of cryptotexts (ciphertexts) over alphabetP ∆ A secret-key (private-key or symmetric) Key-space: K – a set of keys cryptosystem is the one where the sender and the Each key k K determines an encryption algorithm e and an decryption ∈ k recepient share a common and secret key. algorithm dk such that, for any plaintext w, ek (w) is the corresponding cryptotext and Security of such a cryptosystem depends solely on w d (e (w)) or w = d (e (w)). the secrecy of shared key. ∈ k k k k Note: As encryption algorithms we can use also randomized algorithms. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 9/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 10/99 SECRET-KEY CRYPTOGRAPHY BASICS - SUMMARY SECURITY of CRYPTOSYSTEMS There are three fundamentally different ways a Symmetric cryptography relies on three algorithms: cryptosystem/cipher can be seen as secure. Key generating algorithm which generates a secret key Unconditional security: is in the case it can be proven in a cryptographically (pseudo)random way. that the cryptosystem cannot be broken no Encryption algorithm which transforms a plaintext into matter how much power has the enemy a cryptotext using a secret key. (eavesdropper). Decryption algorithm which transforms a cryptotext into Computational security is in the case it can be proven the original plaintext using the same secret key. that no eavesdropper can break the Secret key cryptosystems provide secure cryptosystem in polynomial (reasonable) time.. transmission of messages along insecure channel provided the secret keys are transmitted over an Practical security is in the case no one was able to break extra secure channel. the cryptosystem so far after many years and many attempts. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 11/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 12/99 WHO ARE CODEBREAKERS - DEVELOPMENTS CRYPTO VIEW of MODERN HISTORY The vision of codebreakers has changed through the history, depending on the tools used for encryption and cryptoanalysis. Old times view:Cryptology is a black art and First World War was the war of chemists crypanalysis communicate with dark spirits and even are followers of the devil. (deadly gases). Pre-computers era view: Codebreakers or Second World War was the war of physicists cryptanalysts are linguistic alchemists - a mystical tribe (atomic bombs). attempting to discover meaningful texts i n the Third World War will be the war of apparently meaningless sequences of symbols. Current view Codebreakers and cryptanalysts are informaticians (cryptographers and artists that can superbly use modern mathematics, cryptanalysts). informatics and computing supertechnology for decrypting encrypted messages. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 13/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 14/99 BASIC TYPES of CLASSICAL SECRET-KEY PARTICULAR CRYPTOSYSTEMS CIPHERS Substitution ciphers: are ciphers where units of plaintext are replaced by parts of cryptotext according a fixed rule. Simple substitution ciphers operates on single letters. Monoalphabethic (simple) substitution ciphers: are defined by a single fixed permutation π with encoding PARTICULAR CRYPTOSYSTEMS eπ(a1a2 ... an) = π(a1)π(a2) . π(an) Polyalphabetic (simple) substitutions systems may use different permutations at different positions of the plaintext. Polygraphic (digraphic) substitution ciphers operate on larger, for instance o, the length two) substrings of the plaintext. Transposition ciphers do not replace but only rearrange order of symbols in the plaintext - sometimes in a complicated way. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 15/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 16/99 CAESAR (100 - 42 B.C.) CRYPTOSYSTEM - SHIFT CIPHER I SHIFT CIPHER SC(k) - SC(3) is called CAESAR SHIFT Example e2(EXAMPLE) = GZCORNG, SHIFT CIPHER is a simple monoalphabetic cipher e3(EXAMPLE) = HADPSOH, that can be used to encrypt words in any alphabet. e1(HAL) = IBM, e3(COLD) = FROG In order to encrypt words in English alphabet we use: ABCDEFGHIJKLMNOPQRSTUVWXYZ Example Find the plaintext to the following cryptotext obtained by the encryption with Key-space: K = 1, 2,..., 25 SHIFT CIPHER with k = ?. { } For any key k K, the encryption algorithm e for Decrypt the VHFUHW GH GHXA, VHFUHW GH GLHX, ∈ k cryptotext: VHFUHW GH WURLV, VHFUHW GH WRXV. SHIFT CIPHER SC(k) substitutes any letter by the letter Numerical version of SC(k) is defined, for English, on the set 0, 1, 2,..., 25 by the { } occurring k positions ahead (cyclically) in the alphabet. encryption algorithm: ek (i) = (i + k)(mod 26) The decryption algorithm dk for SC(k) substitutes any letter by the one occurring k positions backward Numerical version of the cipher Atbash used in the Bible. e(i) = 25 i (cyclically) in the alphabet. − prof. Jozef Gruska IV054 4. Secret-key cryptosystems 17/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 18/99 EXAMPLE VATSYAYANA CIPHER - SC(2) Vatsyayana was a Hindu philosopher, believed to be the Decrypt: author of Kamasutra and to live in the period 400 BCE - VHFUHW GH GHXA 200 CE. VHFUHW GH GLHX, According to his Kamasutra, a girl needs to learn certain VHFUHW GH WURLV arts and certain tricks: to cook,to read and write, and how VHFUHW GH WRXV. to send her lover secret messages which no one else would Solution: be able to decipher. Secret de deux Vatsyayana even described such a cipher which is actually secret de Dieu, SC(2). secret de trois secret de tous. This system is now believed, by some, to be the oldest cipher used. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 19/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 20/99 POLYBIOUS CRYPTOSYSTEM - I POLYBIOUS CRYPTOSYSTEM - II It is a digraphic cipher developed by Polybious in 2nd POLYBIOUS can be used to encrypt words of the English alphabet without J. century BC. Key-space: Polybious checkerboards 5 5 with 25 English letters and with rows + × Polybious was a Greek soldier, historian and for 17 years a columns labeled by symbols. slave in Rome. Encryption algorithm: Each symbol is substituted by the pair of symbols denoting the row and the column of the checkerboard in which the symbol is placed. Observation: Romans were able to created powerful optical information communication networks that allowed Example: F G H I J them to deliver information and orders very fast along long A A B C D E distances and this way to control efficiently huge territory B F G H I K C L M N O P and made their armies flexible because they could deliver D Q R S T U information and messages much faster than using horses. E V W X Y Z KONIEC BJCICHBIAJAH → It is expected that Romans already used Polybious Decryption algorithm: ??? cryptosystem. prof. Jozef Gruska IV054 4. Secret-key cryptosystems 21/99 prof. Jozef Gruska IV054 4. Secret-key cryptosystems 22/99 KERCKHOFF’s PRINCIPLE BASIC REQUIREMENTS for GOOD CRYPTOSYSTEMS (Sir Francis R.