Information Theory

Total Page:16

File Type:pdf, Size:1020Kb

Information Theory COMM1003 Information Theory Dr. Wassim Alexan Spring 2018 Lecture 4 Cryptology ◆ Cryptology is the most general term and it splits into two parts: Cryptography and Cryptanalysis ◆ Cryptography is the science of secret writing with the goal of hiding the meaning of a message ◆ Cryptanalysis is the science (and sometimes art) of breaking cryptosystems Fig. 1. An overview of the field of Cryptology. (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 2 Cryptology ◆ A naive thinking would be that only intelligence agencies or organized crime would be involved in cryptanalysis, however most cryptanalysis is done by researchers in academia nowadays ◆ Cryptanalysis is of paramount importance for modern cryptosystems: Without people who try to break our crypto methods, we will never know whether they are really secure or not ◆ Symmetric ciphers are what many people assume cryptography is about: Two parties have an encryption and decryption method for which they share a secret key ◆ All cryptography from ancient times until 1976 was exclusively based on symmetric methods ◆ Symmetric ciphers are still in widespread use, especially for data encryption and integrity check of messages Wassim Alexan 3 Cryptology ◆ Asymmetric (or Public–Key) ciphers are an entirely different type of ciphers was introduced in 1976 by Whitfield Diffie, Martin Hellman and Ralph Merkle ◆ In public–key cryptography, a user possess a secret key as in symmetric cryptography but also a public key ◆ Asymmetric algorithms can be used for applications such as digital signatures and key establishment, and also for classical data encryption ◆ Cryptographic Protocols are protocols that deal with the application of cryptographic algorithms ◆ Symmetric and Asymmetric algorithms can be viewed as building blocks with which applications such as secure Internet communication can be realized ◆ The Transport Layer Security (TLS) scheme, which is used in every Web browser, is an example of a cryptographic protocol Wassim Alexan 4 Cryptology ◆ A third class of ciphers is called Hash Functions, nevertheless this class shares some properties with symmetric functions ◆ In practice, the majority of cryptographic applications involve the use of symmetric, asymmetric as well as hash functions. Such cryptosystems are referred to as hybrids schemes Wassim Alexan 5 Symmetric Cryptography ◆ Symmetric cryptography is usually divided into three subclasses: ◆ Classical ciphers ◆ Mechanical ciphers ◆ Modern ciphers ◆ Furthermore, classical ciphers can be classified into a number of smaller subclasses: substitution and transposition ciphers ◆ For mechanical ciphers we will consider the Enigma machine ◆ For modern ciphers we will consider the Data Encryption Standard (DES) and its variants, as well as the Advanced Encryption Standard (AES) Wassim Alexan 6 Symmetric Cryptography ◆ Assume we have two users, Alice and Bob, communicating over an insecure channel ◆ The problem is that Oscar is eavesdropping on their communication ◆ In this situation, symmetric cryptography offers a powerful solution Fig. 2. Communication over an insecure channel. (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 7 Symmetric Cryptography ◆ Alice encrypts her message x using a symmetric algorithm, yielding the ciphertext y ◆ Bob receives the ciphertext and decrypts the message Fig. 3. Symmetric–key cryptosystem (Paar and Pelzl, Cryptography-A Textbook for Students and Practitioners) Wassim Alexan 8 Symmetric Cryptography ◆ The advantage is that if we have a strong encryption algorithm, the ciphertext will look like random bits to Oscar and will contain no information whatsoever that is useful to him ◆ x is called the plaintext, y is called the ciphertext, k is called the key and finally, the set of all possible keys is called the key space ◆ This cryptosystem needs a secure channel for the distribution of the key between Alice and Bob ◆ This could be done by a human messenger, which is then of course a cumbersome method ◆ An example where this method works nicely is the pre–shared keys used in WiFi Protected Access (WPA) encryption in wireless LANs Wassim Alexan 9 Substitution Ciphers ◆ These are probably the most common forms of classical ciphers ◆ They are implemented by replacing each letter of the plaintext (and sometimes punctuation marks and spaces) with another letter (or even a random symbol) ◆ A mono–alphabetic substitution cipher relies on a fixed replacement structure. Such that every letter is only replaced with another letter, throughout the message ◆ Examples: ◆ The Caesar Cipher ◆ The Atbash Cipher ◆ The Pigpen Cipher ◆ The Affine Cipher ◆ The Baconian Cipher ◆ The Hill Cipher Wassim Alexan 10 Substitution Ciphers ◆ A poly–alphabetic substitution cipher does not rely on a fixed replacement structure. Thus allows for each letter in the alphabet to take on different substitutions ◆ Examples: ◆ The Hill Cipher ◆ The Homophonic Cipher Wassim Alexan 11 The General Case ◆ Consider the following substitution key, as in Fig. 4 ◆ Using this substitution, we can encode the plaintext: the c building is the best building in the guc. abcdefghijklmnopqrst u v w x y z BVGQKMNADZCWSEOYFJXH TLPUIR Fig. 4. An example of a simple substitution cipher key. ◆ The ciphertext would be HAK G VTDWQDEN DX HAK VKXH VTDWQDEN DE HAK NTG. ◆ Removing the spaces, we get HAKGVTDWQDENDXHAKVKXH VTDWQDENDEHAKNTG. Wassim Alexan 12 The Caesar Cipher ◆ In the Caesar cipher there is no key ◆ We simply shift each letter by 3 places Fig. 5. An illustration of the 3–place shifting in the Caesar cipher. abcdefghijklmnopqrst u v w x y z defghijklmnopqrstuvw x y z a b c Fig. 6. The full Caesar cipher substitution table. Wassim Alexan 13 Exercise 1 You received the following ciphertext which was encoded with the Caesar cipher WREHRUQRWWREHWKDWLVWKHTXHVWLRQ. Can you perform an attack on it, revealing the message? Wassim Alexan 14 Exercise 1 Solutions Being told that a Caesar cipher generated the given ciphertext, it is very easy to get back the plaintext as tobeornottobethatisthequestion. Adding spaces where appropriate, the plaintext is to be or not to be that is the question. Wassim Alexan 15 The Atbash Cipher ◆ A mono–alphabetic cipher originally used for the Hebrew alphabet ת ש ר ק צ פ עסנמלכיטחחזוהדגב א א ב ג ד ה ו זחחטיכלמנסעפצקרש ת Fig. 7. The original Atbash cipher substitution table. ◆ It is one of the earliest known substitution ciphers to have been used ◆ It is very simple to implement: The first letter is exchanged with the last letter; the second letter is exchanged with the next–to–last letter; ... abcdefghijklmnopqrst u v w x y z ZYXWVUTSRQPONMLKJIHG FEDCBA Fig. 8. The Latin alphabet version of the Atbash cipher substitution table. Wassim Alexan 16 Exercise 2 You received the following ciphertext which was encoded with the Atbash cipher RHYFITVIPRMTGSVYVHGYFITVIIVHGZFIZMGRMXZRIL? Can you perform an attack on it, revealing the message? Wassim Alexan 17 Exercise 2 Solutions Being told that an Atbash cipher generated the given ciphertext, it is very easy to get back the plaintext as isburgerkingthebestburgerrestaurantincairo? Adding spaces where appropriate, the plaintext is is burger king the best burger restaurant in cairo? Wassim Alexan 18 The Pigpen Cipher ◆ This cipher is also often referred to as the Freemasons Cipher ◆ Letters are not replaced by letters, but rather by symbols, as in Fig. 9 ◆ This cipher can be made much harder to break, by using it with a key ◆ Multiple variants could be introduced to this cipher, for example, by using (grid X grid X), instead of the shown arrangement in Fig. 9 (grid grid X X) Fig. 9. An illustration of the Pigpen cipher. Wassim Alexan 19 Exercise 3 You read the following ciphertext on one of the walls of the B building. Do you think it is just a nice graffiti or a secret message? Can you perform an attack on it, revealing the message? Wassim Alexan 20 Exercise 3 Solutions A quick look at the ciphertext reveals right away that it is an encoded message using the Freemasons/Pigpen cipher. It is very easy to get back the plaintext as wheredidiparkmycar Adding spaces where appropriate, the plaintext is where did i park my car Wassim Alexan 21 The Affine Cipher ◆ A mono–alphabetic cipher where the encryption process is based on a mathematical formula E(x) = (a x + b) modm (1) where the integer parameters a and b are the key for this cipher and m is the length of the alphabet ◆ For each letter in the plaintext, we multiply it by a and add the result to b, then we divide it by m and only take the remainder ◆ This remainder value is the reference to the letter in the ciphertext Wassim Alexan 22 The Affine Cipher: An Example ◆ Consider the following plaintext that we are interested in applying the Affine cipher onto affine cipher ◆ Let a = 5 andb = 8 and thus E(x) = (a x + b) modm (2) ◆ The first step is to write up a table matching the letters in the English language with their corresponding reference values, starting with 0 abcdefghijk l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Fig. 10. The Latin alphabet and the reference values corresponding to every plaintext letter. where the integer parameters a = 5 and b = 8 are the key for this cipher Wassim Alexan 23 The Affine Cipher: An Example ◆ The second step is to carry out the calculation as in (2), thus assigning a substitute for each of the plaintext letters Plaintext a b c d e f g h i j k l m n o p q r s t u v w x y z Value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 5x+8 mod 26 8 13 18 23 2 7 12 17 22 1 6 11 16 21 0 5 10 15 20 25 4 9 14 19 24 3 Ciphertext I N S X C H M RWBGLQVAF KPUZEJOT YD Fig.
Recommended publications
  • COS433/Math 473: Cryptography Mark Zhandry Princeton University Spring 2017 Cryptography Is Everywhere a Long & Rich History
    COS433/Math 473: Cryptography Mark Zhandry Princeton University Spring 2017 Cryptography Is Everywhere A Long & Rich History Examples: • ~50 B.C. – Caesar Cipher • 1587 – Babington Plot • WWI – Zimmermann Telegram • WWII – Enigma • 1976/77 – Public Key Cryptography • 1990’s – Widespread adoption on the Internet Increasingly Important COS 433 Practice Theory Inherent to the study of crypto • Working knowledge of fundamentals is crucial • Cannot discern security by experimentation • Proofs, reductions, probability are necessary COS 433 What you should expect to learn: • Foundations and principles of modern cryptography • Core building blocks • Applications Bonus: • Debunking some Hollywood crypto • Better understanding of crypto news COS 433 What you will not learn: • Hacking • Crypto implementations • How to design secure systems • Viruses, worms, buffer overflows, etc Administrivia Course Information Instructor: Mark Zhandry (mzhandry@p) TA: Fermi Ma (fermima1@g) Lectures: MW 1:30-2:50pm Webpage: cs.princeton.edu/~mzhandry/2017-Spring-COS433/ Office Hours: please fill out Doodle poll Piazza piaZZa.com/princeton/spring2017/cos433mat473_s2017 Main channel of communication • Course announcements • Discuss homework problems with other students • Find study groups • Ask content questions to instructors, other students Prerequisites • Ability to read and write mathematical proofs • Familiarity with algorithms, analyZing running time, proving correctness, O notation • Basic probability (random variables, expectation) Helpful: • Familiarity with NP-Completeness, reductions • Basic number theory (modular arithmetic, etc) Reading No required text Computer Science/Mathematics Chapman & Hall/CRC If you want a text to follow along with: Second CRYPTOGRAPHY AND NETWORK SECURITY Cryptography is ubiquitous and plays a key role in ensuring data secrecy and Edition integrity as well as in securing computer systems more broadly.
    [Show full text]
  • Simple Substitution and Caesar Ciphers
    Spring 2015 Chris Christensen MAT/CSC 483 Simple Substitution Ciphers The art of writing secret messages – intelligible to those who are in possession of the key and unintelligible to all others – has been studied for centuries. The usefulness of such messages, especially in time of war, is obvious; on the other hand, their solution may be a matter of great importance to those from whom the key is concealed. But the romance connected with the subject, the not uncommon desire to discover a secret, and the implied challenge to the ingenuity of all from who it is hidden have attracted to the subject the attention of many to whom its utility is a matter of indifference. Abraham Sinkov In Mathematical Recreations & Essays By W.W. Rouse Ball and H.S.M. Coxeter, c. 1938 We begin our study of cryptology from the romantic point of view – the point of view of someone who has the “not uncommon desire to discover a secret” and someone who takes up the “implied challenged to the ingenuity” that is tossed down by secret writing. We begin with one of the most common classical ciphers: simple substitution. A simple substitution cipher is a method of concealment that replaces each letter of a plaintext message with another letter. Here is the key to a simple substitution cipher: Plaintext letters: abcdefghijklmnopqrstuvwxyz Ciphertext letters: EKMFLGDQVZNTOWYHXUSPAIBRCJ The key gives the correspondence between a plaintext letter and its replacement ciphertext letter. (It is traditional to use small letters for plaintext and capital letters, or small capital letters, for ciphertext. We will not use small capital letters for ciphertext so that plaintext and ciphertext letters will line up vertically.) Using this key, every plaintext letter a would be replaced by ciphertext E, every plaintext letter e by L, etc.
    [Show full text]
  • Cryptography in Modern World
    Cryptography in Modern World Julius O. Olwenyi, Aby Tino Thomas, Ayad Barsoum* St. Mary’s University, San Antonio, TX (USA) Emails: [email protected], [email protected], [email protected] Abstract — Cryptography and Encryption have been where a letter in plaintext is simply shifted 3 places down used for secure communication. In the modern world, the alphabet [4,5]. cryptography is a very important tool for protecting information in computer systems. With the invention ABCDEFGHIJKLMNOPQRSTUVWXYZ of the World Wide Web or Internet, computer systems are highly interconnected and accessible from DEFGHIJKLMNOPQRSTUVWXYZABC any part of the world. As more systems get interconnected, more threat actors try to gain access The ciphertext of the plaintext “CRYPTOGRAPHY” will to critical information stored on the network. It is the be “FUBSWRJUASLB” in a Caesar cipher. responsibility of data owners or organizations to keep More recent derivative of Caesar cipher is Rot13 this data securely and encryption is the main tool used which shifts 13 places down the alphabet instead of 3. to secure information. In this paper, we will focus on Rot13 was not all about data protection but it was used on different techniques and its modern application of online forums where members could share inappropriate cryptography. language or nasty jokes without necessarily being Keywords: Cryptography, Encryption, Decryption, Data offensive as it will take those interested in those “jokes’ security, Hybrid Encryption to shift characters 13 spaces to read the message and if not interested you do not need to go through the hassle of converting the cipher. I. INTRODUCTION In the 16th century, the French cryptographer Back in the days, cryptography was not all about Blaise de Vigenere [4,5], developed the first hiding messages or secret communication, but in ancient polyalphabetic substitution basically based on Caesar Egypt, where it began; it was carved into the walls of cipher, but more difficult to crack the cipher text.
    [Show full text]
  • Battle Management Language: History, Employment and NATO Technical Activities
    Battle Management Language: History, Employment and NATO Technical Activities Mr. Kevin Galvin Quintec Mountbatten House, Basing View, Basingstoke Hampshire, RG21 4HJ UNITED KINGDOM [email protected] ABSTRACT This paper is one of a coordinated set prepared for a NATO Modelling and Simulation Group Lecture Series in Command and Control – Simulation Interoperability (C2SIM). This paper provides an introduction to the concept and historical use and employment of Battle Management Language as they have developed, and the technical activities that were started to achieve interoperability between digitised command and control and simulation systems. 1.0 INTRODUCTION This paper provides a background to the historical employment and implementation of Battle Management Languages (BML) and the challenges that face the military forces today as they deploy digitised C2 systems and have increasingly used simulation tools to both stimulate the training of commanders and their staffs at all echelons of command. The specific areas covered within this section include the following: • The current problem space. • Historical background to the development and employment of Battle Management Languages (BML) as technology evolved to communicate within military organisations. • The challenges that NATO and nations face in C2SIM interoperation. • Strategy and Policy Statements on interoperability between C2 and simulation systems. • NATO technical activities that have been instigated to examine C2Sim interoperation. 2.0 CURRENT PROBLEM SPACE “Linking sensors, decision makers and weapon systems so that information can be translated into synchronised and overwhelming military effect at optimum tempo” (Lt Gen Sir Robert Fulton, Deputy Chief of Defence Staff, 29th May 2002) Although General Fulton made that statement in 2002 at a time when the concept of network enabled operations was being formulated by the UK and within other nations, the requirement remains extant.
    [Show full text]
  • Amy Bell Abilene, TX December 2005
    Compositional Cryptology Thesis Presented to the Honors Committee of McMurry University In partial fulfillment of the requirements for Undergraduate Honors in Math By Amy Bell Abilene, TX December 2005 i ii Acknowledgements I could not have completed this thesis without all the support of my professors, family, and friends. Dr. McCoun especially deserves many thanks for helping me to develop the idea of compositional cryptology and for all the countless hours spent discussing new ideas and ways to expand my thesis. Because of his persistence and dedication, I was able to learn and go deeper into the subject matter than I ever expected. My committee members, Dr. Rittenhouse and Dr. Thornburg were also extremely helpful in giving me great advice for presenting my thesis. I also want to thank my family for always supporting me through everything. Without their love and encouragement I would never have been able to complete my thesis. Thanks also should go to my wonderful roommates who helped to keep me motivated during the final stressful months of my thesis. I especially want to thank my fiancé, Gian Falco, who has always believed in me and given me so much love and support throughout my college career. There are many more professors, coaches, and friends that I want to thank not only for encouraging me with my thesis, but also for helping me through all my pursuits at school. Thank you to all of my McMurry family! iii Preface The goal of this research was to gain a deeper understanding of some existing cryptosystems, to implement these cryptosystems in a computer programming language of my choice, and to discover whether the composition of cryptosystems leads to greater security.
    [Show full text]
  • Affine Cipher Project 1 Introduction
    Affine Cipher Project 141KECBZ0H5CRK1HUZK1CGPCR.5PUGUZU1WCU.CM1CUBHUCAK.6.Z5WCP1RK1UCH5 WC0EPU1KECU.C141KEC.UB1KXC,,RBHKV1PCWGRQ15P7CHCUHV1C.6CU9.CRGUG1P Directions: • Answer all numbered questions completely. • Show non-trivial work, and put your final answer in the box provided. • Questions without boxes should be answered in complete sentences in the space provided. 1 Introduction Cryptography is the study of secret codes, or the secure transmission of information that nobody except the desired recipient can read. By the end of this project, you will be able to decipher the quote printed above. The mathematical study of ciphers will lead us through a world in which the number line is a closed curve, and fractions do not exist. This project is designed to help you to: • read and understand definitions and notation • observe patterns and generalize • think logically, analytically, and abstractly • express problems and solutions precisely • follow examples • combine ideas to solve problems and create applications 1 2 Caesar Cipher A cipher is a function or algorithm for translating plaintext into encrypted ciphertext. Throughout history, governments and merchants have used ciphers to safely transmit sensitive information. Julius Caesar is said to have use a simple system of substituting each letter with the letter 3 spots over, wrapping around the alphabet if necessary. Here is the mapping: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # # # # # # # # # # # # # # # # # # # # # # # # # # D E F G H I J K L M N O P Q R S T U V W X Y Z A B C Space and punctuation are discarded.
    [Show full text]
  • Codebusters Coaches Institute Notes
    BEING COVER AGENT FIXED DELAY, PILOT RIGHT PLANE, CATCH SMALL RADIO (CODEBUSTERS) This is the first year CodeBusters will be a National event. A few changes have been made since the North Carolina trial event last year. 1. The Atbash Cipher has been added. 2. The running key cipher has been removed. 3. K2 alphabets have been added in addition to K1 alphabets 4. Hill Cipher decryption has been added with a given decryption matrix. 5. The points scale has been doubled, but the timing bonus has been increased by only 50% in order to further balance the test. 1 TYPES OF PROBLEMS 1.1 ARISTOCRAT (EASY TO HARD DIFFICULTY) http://www.cryptograms.org/tutorial.php An Aristocrat is the typical Crypto-quote you see in the newspaper. Word spaces are preserved. No letter will stand for itself and the replacement table is given as a guide (but doesn’t need to be filled in by the team to get credit). FXP PGYAPYF FIKP ME JAKXPT AY FXP GTAYFMJTGF THE EASIEST TYPE OF CIPHER IS THE ARISTOCRAT A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Frequency 4 1 6 3 1 2 2 2 6 3 3 4 Replacement I F T A Y C P O E R H S 1.2 ARISTOCRATS WITH SPELLING AND/OR GRAMMAR ERRORS (MEDIUM TO VERY HARD DIFFICULTY) For these, either words will be misspelled or grammatical errors introduced. From a student perspective, it is what they might expect when someone finger fumbles a text message or has a bad voice transcription.
    [Show full text]
  • Historical Ciphers • A
    ECE 646 - Lecture 6 Required Reading • W. Stallings, Cryptography and Network Security, Chapter 2, Classical Encryption Techniques Historical Ciphers • A. Menezes et al., Handbook of Applied Cryptography, Chapter 7.3 Classical ciphers and historical development Why (not) to study historical ciphers? Secret Writing AGAINST FOR Steganography Cryptography (hidden messages) (encrypted messages) Not similar to Basic components became modern ciphers a part of modern ciphers Under special circumstances modern ciphers can be Substitution Transposition Long abandoned Ciphers reduced to historical ciphers Transformations (change the order Influence on world events of letters) Codes Substitution The only ciphers you Ciphers can break! (replace words) (replace letters) Selected world events affected by cryptology Mary, Queen of Scots 1586 - trial of Mary Queen of Scots - substitution cipher • Scottish Queen, a cousin of Elisabeth I of England • Forced to flee Scotland by uprising against 1917 - Zimmermann telegram, America enters World War I her and her husband • Treated as a candidate to the throne of England by many British Catholics unhappy about 1939-1945 Battle of England, Battle of Atlantic, D-day - a reign of Elisabeth I, a Protestant ENIGMA machine cipher • Imprisoned by Elisabeth for 19 years • Involved in several plots to assassinate Elisabeth 1944 – world’s first computer, Colossus - • Put on trial for treason by a court of about German Lorenz machine cipher 40 noblemen, including Catholics, after being implicated in the Babington Plot by her own 1950s – operation Venona – breaking ciphers of soviet spies letters sent from prison to her co-conspirators stealing secrets of the U.S. atomic bomb in the encrypted form – one-time pad 1 Mary, Queen of Scots – cont.
    [Show full text]
  • The Mathemathics of Secrets.Pdf
    THE MATHEMATICS OF SECRETS THE MATHEMATICS OF SECRETS CRYPTOGRAPHY FROM CAESAR CIPHERS TO DIGITAL ENCRYPTION JOSHUA HOLDEN PRINCETON UNIVERSITY PRESS PRINCETON AND OXFORD Copyright c 2017 by Princeton University Press Published by Princeton University Press, 41 William Street, Princeton, New Jersey 08540 In the United Kingdom: Princeton University Press, 6 Oxford Street, Woodstock, Oxfordshire OX20 1TR press.princeton.edu Jacket image courtesy of Shutterstock; design by Lorraine Betz Doneker All Rights Reserved Library of Congress Cataloging-in-Publication Data Names: Holden, Joshua, 1970– author. Title: The mathematics of secrets : cryptography from Caesar ciphers to digital encryption / Joshua Holden. Description: Princeton : Princeton University Press, [2017] | Includes bibliographical references and index. Identifiers: LCCN 2016014840 | ISBN 9780691141756 (hardcover : alk. paper) Subjects: LCSH: Cryptography—Mathematics. | Ciphers. | Computer security. Classification: LCC Z103 .H664 2017 | DDC 005.8/2—dc23 LC record available at https://lccn.loc.gov/2016014840 British Library Cataloging-in-Publication Data is available This book has been composed in Linux Libertine Printed on acid-free paper. ∞ Printed in the United States of America 13579108642 To Lana and Richard for their love and support CONTENTS Preface xi Acknowledgments xiii Introduction to Ciphers and Substitution 1 1.1 Alice and Bob and Carl and Julius: Terminology and Caesar Cipher 1 1.2 The Key to the Matter: Generalizing the Caesar Cipher 4 1.3 Multiplicative Ciphers 6
    [Show full text]
  • With Answers
    Module 10.4: Exploring Some Historical Ciphers Gregory V. Bard January 30, 2020 • This is a practice workbook the Affine Cipher, touching on some shift ciphers (such as the Caesar cipher, the ROT-13 cipher), the Atbash cipher, and the Vigen`ereCipher. • The Affine Cipher was introduced in Module 10-2: The Basics of Modular Arithmetic, and some skills from Module 10-3: Modular Inverses are needed. • There is a with-answers version, and a without-answers version. • In the with-answers version of this workbook, the black ink represents the question, and the blue ink represents the answer. Question 10-4-1 Suppose Boris normally communicates with his handlers in Moscow using the affine cipher, and the encryption function c = fB(p) = 7p + 20 mod 26, while Natasha normally uses c = fN (p) = 11p + 8 mod 26. They have a very secret message to send back to Moscow, so they're going to encrypt the message twice, for added security. As you can probably guess, this is equivalent to using the affine cipher only once, but with a different function. • If Boris encrypts the plaintext first, followed by Natasha second, then what would BAT encrypt to? (B, A, T) becomes (1, 0, 19) and encrypts to (fB(1); fB(0); fB(19)) ≡ (1; 20; 23). We encrypt again to (fN (1); fN (20); fN (23)) ≡ (19; 20; 1), which becomes (T, U, B) or TUB. • If Natasha encrypts the plaintext first, followed by Boris second, then what would BAT encrypt to? (B, A, T) becomes (1, 0, 19) and encrypts to (fN (1); fN (0); fN (19)) ≡ (19; 8; 9).
    [Show full text]
  • A Secure Variant of the Hill Cipher
    † A Secure Variant of the Hill Cipher Mohsen Toorani ‡ Abolfazl Falahati Abstract the corresponding key of each block but it has several security problems [7]. The Hill cipher is a classical symmetric encryption In this paper, a secure cryptosystem is introduced that algorithm that succumbs to the know-plaintext attack. overcomes all the security drawbacks of the Hill cipher. Although its vulnerability to cryptanalysis has rendered it The proposed scheme includes an encryption algorithm unusable in practice, it still serves an important that is a variant of the Affine Hill cipher for which a pedagogical role in cryptology and linear algebra. In this secure cryptographic protocol is introduced. The paper, a variant of the Hill cipher is introduced that encryption core of the proposed scheme has the same makes the Hill cipher secure while it retains the structure of the Affine Hill cipher but its internal efficiency. The proposed scheme includes a ciphering manipulations are different from the previously proposed core for which a cryptographic protocol is introduced. cryptosystems. The rest of this paper is organized as follows. Section 2 briefly introduces the Hill cipher. Our 1. Introduction proposed scheme is introduced and its computational costs are evaluated in Section 3, and Section 4 concludes The Hill cipher was invented by L.S. Hill in 1929 [1]. It is the paper. a famous polygram and a classical symmetric cipher based on matrix transformation but it succumbs to the 2. The Hill Cipher known-plaintext attack [2]. Although its vulnerability to cryptanalysis has rendered it unusable in practice, it still In the Hill cipher, the ciphertext is obtained from the serves an important pedagogical role in both cryptology plaintext by means of a linear transformation.
    [Show full text]
  • MAT 302: LECTURE SUMMARY Last Class We Discussed Two Classical Ciphers, Both of Which Turned out to Be Rather Insecure (As Evide
    MAT 302: LECTURE SUMMARY Last class we discussed two classical ciphers, both of which turned out to be rather insecure (as evidenced by your cracking them manually during lecture): • The Scytale cipher • The Caesar (aka shift) cipher We began today’s lecture by writing the latter down in mathematical notation. To this end, it is convenient to use the set A = f0; 1; 2;:::; 25g to represent the English alphabet, i.e. 0 represents A, 1 represents B, etc. The Caesar Cipher. The Caesar cipher (or shift cipher) consists of a key k 2 Z, an encryption function ek : A −! A x 7−! x + k (mod 26) and a decryption function dk : A −! A x 7−! x − k (mod 26): The Caesar cipher is insecure because the space of all possible keys is rather small (how many are there?), so it is a trivial matter for Oscar to check all possible keys. We next discussed a variant of this, whose key space is somewhat larger: the affine cipher. The Affine Cipher. The affine cipher consists of a key (a; b) 2 Z2, an encryption function e(a;b) : A −! A x 7−! ax + b (mod 26) and a decryption function d(a;b) : A −! A x 7−! a−1(x − b) (mod 26) Actually, as stated this isn’t well-defined: a−1 doesn’t always exist (mod 26). Recall that a−1 is the element of A satisfying a−1a ≡ 1 (mod 26): For example, 0 has no (multiplicative) inverse (mod 26). Less trivially, 2 has no multiplicative inverse.
    [Show full text]