Cryptology Chapter 1 – Origins, Examples, Ideas in Cryptology Cryptology is secret writing. Making transmitted information secure from eavesdroppers and tampering. 1.1 A Crypto-Chronology o Cryptography – the science and art of designing and using methods of message concealment. Kings in antiquity shaving a slaves head, tattoo a message, and concealing with hair growth. During WWI Germans used invisible ink. During WWII Roosevelt and Churchill communicated over transatlantic cable using synchronization of two identical sound recordings. o Cryptanalysis –the activity of breaking a message concealment method. o Cryptanalyst – person who engages in the above activity. o Cryptology – interaction between cryptography and cryptanalysis. o Data Encryption Standard (DES) o Modified Hieroglyphics – 1900 B.C. Egyptian tomb writing made different enough to cause intrigue, rather then encryption. o Atbash 500 B.C. Reversing the order of letters in a word. The word abc would become zyx. A is replaced with Z, B with Y, and so forth through the entire alphabet. o Spartan Scytale (pronounced si’-ta-lee) 500 B.C. A long strip of paper (one letter wide) is wrapped around a cylindrical tube. A message is then written across the strips. The messenger delivers the message to an individual who has the same diameter cylinder which allows them to decipher the message. o Polybius’ Checkerboard, 205 – 123 B.C. The letters of the alphabet are arranged in a table whose outer edges are numbered. Each letter is represented by a two digit number. (Ex: 35 is P). The first digit represents the row, and the second digit the column. o Caesar Cipher 50 B.C. A shift cipher. A becomes D, B becomes E, etc. o Nomenclators 1400 A Nomenclator is a code book. It is divided into two parts. One converts words into code. The second converts code into words. An example of the first part is a phone book. It converts names to phone numbers. o Alberti’s Cipher Disk Two movable disks are positioned one inside the other both containing the letters of the alphabet. o Polyalphabetic substitution Like the shift cipher, except that after a few words the wheel is moved. Part of the message contains where to place the wheel. Early Writings on Cryptology o Shihab al-Din abu etc. in an encyclopedia included work on cryptanalysis (15th century) o Johannes Trithemius, published 1518 posthumously, discussed a form of the polyalphabet substitution o Porta’s Digraphic System, 1535-1615 Special symbols were used to represent pairs of letters. It obscures letter frequency o Hill Cipher – Pairs of letters are substituted for other pairs of letters. o Block Ciphers – A block of any number of letters is used to represent a single character or another block of characters. o Stream Ciphers – Each single character of plaintext is transformed into a corresponding ciphertext character. o Blaise de Vigenere, 1523-1596 The picture to the right is an example of a Vigenere Square. To encipher a message: For each letter in the message find its column. Then go down along the side to the row that begins with that letter. Then proceed across the row to the selected column. The letter is coded with that entry. Deciphering, you find the letter in the row. Then go along the side to the column that is that letter. Then proceed down until you reach the row. The letter is coded with that entry. o Francis Bacon’s Bilateral Cipher, 1623 The letters of the alphabet are represented by binary. Instead of 0 and 1, Bacon uses a and b. A is aaaaa, B is aaaab, C is aaaba, etc. o Thomas Jefferson’s Wheel Cypher o o o o Consisted of 36 concentric wooden disks, each about 1/6 inch thick and 2 inches in diameter. Each disk consisted of the alphabet in random order. Each disk moves independently. Move the disks so that the message you want to encode appears. Then copy down another line of letters. Send this message. The receiver aligns the wheel according to this line of code, then finds the row that makes sense. The Telegraph, 1844: A Glimpse of Error correcting Codes A table consisting of rows and columns contains the code. Each letter of the message is placed into one box of the table. A route, shown is 3, is selected. The coded message can then be decoded by knowing the correct route and decoding the message. The Vernam One-Time Tape, 1917 Plaintext is combined with a random key. The sender and receiver are the only ones that have both of these. The two must be of equal length. When combined, letter by letter, then divided by some number, the remainder gives the coded message. ADFGVX, 1918 The rows and columns of a 6x6 table are named by these six letters. The entries in each box are filled with letters and digits (36 total). Here, the digit 2 is represented by FG. A message is then written out so that each line of the message contains the same number of letters. Suppose we put the letters in 4 per row. Above all the letters place a word, for example spam. Now write a permutation of this word and move the columns according to the permutation. Then write out the entire code as a string of letters involving ADFGVX. Cryptology and Mathematics Linked, 1920s Cryptology got financial support from George Fabyan in 1917 at Riverbank Laboratory in Geneva, Illinois. Lester Hill’s “Cryptography in Algebraic Alphabet” (1929) indicated the link between mathematics and cryptology. During WW II cryptologists broke both the Japanese and German secret codes. o o o o William F. Friedman broke the Japanese code. Especially helpful at Midway which turned the war in our favor. German engineer Arthur Scherbius designed the enigma machine. The allies broke the code and it is estimated that 2 years were saved in the European war theater. The allies never broke the code. They were eventually able to read the code because of operator mistakes, procedural flaws, and obtaining code books and an enigma machine. Information Theory: The Mathematics of Language and Cryptology, 1949 In 1949, Claude Shannon, in the Bell Systems Technical Journal, defined ad examined the idea of information capacity and entropy of a signal. He defined the concept of perfect security. He looked at languages and the probability of breaking security. Data Encryption Standard, 1977 With the growth of industry and commerce after WW II and the use of telephones and other electronic devices to transmit data in binary form, security became a serious issue. In 1975 the National Bureau of Standards obtained proposals for standards, the NSA modified them, and in 1977 the data encryption standard was set. The standard has been efficient and is difficult to break. It is based on a 56 bit key. Public-Key Cryptography, 1978 DES – Data Encryption Standard How do you distribute the keys among the parties using the cryptosystem? In 1976, Merkle and Hellman proposed the method. The basic idea is this: You have a large number that is the product of two primes. The large number is given to everyone that wants it. The two primes are kept secret. The primes are what makes the information secret. Here is the basic idea again: Two parties want to exchange encrypted information. o Party A selects an encryption key and a decryption key. o Party A publishes the encryption key, but keeps the decryption key secret. o Party B does the same. o Party A calls party B and says I want to use encryption X with key K. o Party B agrees and they transmit information. o Anyone else will have to find the answer by trial and error which in essence takes a very long time. The Beginning of the Twenty-First Century Obviously security is important today: ATMs, purchasing over internet, email, etc. Cryptographic Protocols Integrity: Determine whether a message between parties has been altered. Authenticity: Determine whether a message is in fact from the party it claims to be. Nonrepudiation: Ensuring agreements are not repudiated (brake agreements) o The Future Y2K and Beyond The Advanced Encryption Standard (AES) will replace the DES. It meets the following requirements: Use symmetric (secret-key) cryptography. It would be a block cipher. In cryptography, a block cipher is a symmetric key cipher which operates on fixedlength groups of bits, termed blocks, with an unvarying transformation. When encrypting, a block cipher might take (for example) a 128-bit block of plaintext as input, and output a corresponding 128-bit block of ciphertext. The exact transformation is controlled using a second input — the secret key. Decryption is similar: the decryption algorithm takes, in this example, a 128-bit block of ciphertext together with the secret key, and yields the original 128-bit block of plaintext. To encrypt messages longer than the block size (128 bits in the above example), a mode of operation is used. Block ciphers can be contrasted with stream ciphers; a stream cipher operates on individual digits one at a time, and the transformation varies during the encryption. The distinction between the two types is not always clear-cut: a block cipher, when used in certain modes of operation, acts effectively as a stream cipher. It would operate on 128 bit blocks of plaintext and allow for three sizes of key: 128, 192, 256 bit. The replacement is currently underway as of 2002. (When book was written) Number theory plays an important role in cryptography. Zero-Knowledge protocols. Here is a story that describes this protocol. In this story, Peggy has uncovered the secret word used to open a magic door in a cave. The cave is shaped like a circle, with the entrance on one side and the magic door blocking the opposite side. Victor says he'll pay her for the secret, but not until he's sure that she really knows it. Peggy says she'll tell him the secret, but not until she receives the money. They devise a scheme by which Peggy can prove that she knows the word without telling it to Victor. First, Victor waits outside the cave as Peggy goes in. We label the left and right paths from the entrance A and B. She randomly takes either path A or B. Then, Victor enters the cave and shouts the name of the path he wants her to use to return, either A or B, chosen at random. Providing she really does know the magic word, this is easy: she opens the door, if necessary, and returns along the desired path. Note that Victor does not know which path she has gone down. However, suppose she did not know the word. Then, she would only be able to return by the named path if Victor were to give the name of the same path that she had entered by. Since Victor would choose A or B at random, he would have a 50% chance of guessing correctly. If they were to repeat this trick many times, say 20 times in a row, her chance of successfully anticipating all of Victor's requests would become vanishingly small. Thus, if Peggy reliably appears at the exit Victor names, he can conclude that she is very likely to know the secret word. Oblivious Transfer Channel: You send two messages at a time, and a coin flip decides which of the two messages to transmit to the receiver. For the receiver, it makes it very unlikely that the sender is fraudulent. Elliptic cure cryptography: based on algebraic abstractions of certain types of geometric curves. Quantum cryptography: Use atomic states for encryption. No one as of this date has been able to create a device to do this. Biometrics: Use machines that recognize unique characteristic features of individuals. Cryptology and Mathematics: Functions o The concept of function is fundamental to cryptology: defining, evaluating, and inverting functions. o Definition 1.2.1 – A function is a rule by which each element of one set, called the domain, is associated with exactly one element of another set. f used as function notation. x is representative of element of domain. f(x) is the corresponding value in what is called the range. o The domain can represent many things: numbers, strings of characters, collection of functions, etc. o The function can be: a verbal description, a graph, an algorithm, a formula, etc. Example: suppose x is a string of characters and f is a function that shifts all the characters one letter right. Then: f(arm) = bsn f(string) = tusjoh o It is possible that some things are not in the domain: Example: The domain consists of all words that have an even number of characters, and f is the function of switching ad joint letters 1 and 2, 3 and 4, etc. o Example: A function can have more than one variable. Example: f(x, n) where x is the string and n is the number of letters to shift right. ex: f(“amessage”, 2) = coguucig. o Sometimes a function may depend on two variables, but dependence on one is more important than the other. The less important one is written as a subscript. o A function is 1-1 if each element in range is paired with only one element in the domain. All 1-1 functions have inverses: (f-1) The range of the inverse function is the domain of the original. o The fundamental connection between math and cryptology: For each key (128, 192, or 256 bit), an encryption method defines a 11 function and the decryption is its inverse. Encryption – evaluating a function for a given key. Decryption – evaluating an inverse function for the same key. o The composition of functions is the process of performing encryption twice. The inverse function would require two decryptions. o Permutations A permutation of n ordered objects is a way of reordering them. Crypto: Models, Maxims, and Mystique o General Concepts and Terminology Often Alive and Bob are used as names of two things that want to communicate. Eve and Oscar are their opponents. The key permits encipherment of messages between Alive and Bob. Eve and Oscar try to determine the key from the message. Codes are messages that are generally not human readable. Ex: JPEG encoding, ASCII, scan codes, etc. The purpose of a code is not for concealment but to make it easily transmittable. The term steganography is the activity of hiding the existence of a message. Ex: Invisible ink. (use lemon juice. Message becomes visible when paper is heated.) The Mona Lisa method is hiding information in a picture by altering its bit information slightly, not enough for the human eye to detect. When you apply cryptographic methods you make people aware of a message. This may cause one to determine what the message is concealing. Genearlly, a public key cryptographic algorithm requires one key for encipherment and another key for decipherment. The decryption key cannot be deduced from the encryption key in a reasonable amount of time. Each entity using the algorithm generates its own encryption/decryption key par and publicizes the encryption key. o A Maxim of Cryptography and Methods of Attack Kerckhoffs’ maxim: The strength of a cipher system depends on keeping the key information secret, not the algorithm. Ciphertext-Only Attack The attacker has access to ciphertexts only. They then try to deduce the message. Known-Plaintext Attack