Networking Has Become a Very Important Aspect of Every One's Life If We Consider the Rate of Internet Usage, We Usually Send

Total Page:16

File Type:pdf, Size:1020Kb

Networking Has Become a Very Important Aspect of Every One's Life If We Consider the Rate of Internet Usage, We Usually Send View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by UTHM Institutional Repository i ROBUST CAESAR CIPHER AGAINST FREQUENCY CRYPTANALYSIS USING BI-DIRECTIONAL SHIFTING. ABDULKADIR HASSAN DISINA A thesis submitted in partial fulfillment of the requirement for the award of the Degree of Master of Computer Science Faculty of Computer Science and Information Technology Universiti Tun Hussein Onn Malaysia March 2014 vi CONTENTS TITLE i DECLARATION ii DEDICATION iii ABSTRACT iv ABSTRAK v CONTENTS vi LIST OF TABLE x LIST OF FIGURES xi LIST OF LIST OF ABBREVIATION xii LIST OF APPENDICES xiii CHAPTER 1 INTRODUCTION 1.1 Overview 1 1.2 Problem Statement 3 1.3 Motivation 4 1.4 Objectives 5 1.5 Scope 5 1.6 Contribution 6 1.7 summary 7 CHAPTER 2 LITERATURE REVIEW 2.1 Introduction 8 2.2 Overview of the cipher 8 2.3 Types of Cryptographic Algorithm 10 vii 2.3.1 Symmetric Key Cryptography 10 2.3.2 Asymmetric Key Cryptography 10 2.3.3 Chosen key Type 11 2.4 Types of Cipher 11 2.4.1 Stream Cipher 12 2.4.1.1 Mono or Homo Alphabetic 12 2.4.1.2 Poly Alphabetic 13 2.4.2 Block Cipher 13 2.4.3 Chosen Cipher Type 13 2.5 Permutation 14 2.6 Related Work 14 2.7 Components of Stream Cipher 16 2.7.1 Plaintext (Message) 17 2.7.2 Encryption 17 2.7.3 Key 17 2.7.4 Decryption 18 2.8 Types of Operation for Stream Cipher 18 2.8.1 Substitution 19 2.8.2 Transposition 19 2.8.3 Mixed Cipher 19 2.9 ASCII Character 20 2.10 Attacks on Symmetric Cipher 21 2.10.1 Known-plaintext Attack 21 2.10.2 Chosen Plaintext Attack 21 2.10.3 Differential Cryptanalysis 22 2.10.4 Frequency Analysis 22 2.10.5 Cryptanalysis 23 2.11 Stages of Cryptanalysis 24 2.11.1 Identification 24 2.11.2 Breaking 25 2.11.3 Settings 25 viii 2.12 Kerchhoffs’s Principles 25 2.13 Shannon’s Principles 26 2.13.1 Confusion 26 2.13.2 Diffusion 26 2.14 Summary 27 CHAPTER 3 METHODOLOGY 3.1 Introduction 28 3.2 Proposed Frame work 28 3.2.1 Logical Frame Work 29 3.2.2 Encryption 32 3.2.3 Decryption 33 3.3 Flow Chart 34 3.4 Interface Design 35 3.5 Frequency Analysis 36 3.6 Comparison with Other Techniques 36 3.7 Method of Validation 37 3.8 Summary 37 CHAPTER 4 IMPLEMENTATION 4.1 Introduction 38 4.2 Implementation of Robust Caesar Cipher 39 4.2.1 Variables and Arrays 39 4.2.2 Encryption 40 4.2.2.1 Even Position Shift 40 4.2.2.2 Odd Position Shift 42 4.2.2.1 Swap Function (Switch Position) 43 4.2.3 Decryption 44 4.2.3.1 Even Position Shift 44 4.2.3.2 Odd Position Shift 45 4.2.4 Interface Design 45 4.3 Summary 47 ix CHAPTER 5 SECURITY ANALYSIS 5.1 Introduction 48 5.2 Analysis of the Algorithm 48 5.2.1 Key Scheduling Algorithm 49 5.2.2 Confusion 49 5.2.3 Diffusion 50 5.2.4 Frequency Analysis 50 5.2.4.1 Test 1 51 5.2.4.2 Test 2 52 5.2.4.3 Test 3 53 5.2.4.4 Test 4 54 5.2.4.5 Test 5 54 5.2.5 Comparison with Previous Work 56 5.2.6 Attack Scenario 57 5.2.6.1 Ciphertext Only Attack 57 5.2.6.2 Chosen Plaintext Attack 57 5.2.6.3 Known Ciphertext Attack 58 5.3 Comparison of Result with SD-aree 58 5.4 Summary 59 CHAPTER 6 CONCLUSION AND FUTURE WORK 6.1 Conclusion 60 5.2 Future Work 61 REFERENCES 62 APPENDICES 64 x LIST OF TABLES 3.1 Printable ASCII characters 29 3.2 Printable ASCII standard table 30 3.3 Shift forward table 31 3.4 Shift backward table 31 3.5 Comparison with previous techniques 36 5.1 Comparison of results with previous algorithm 56 xi LIST OF FIGURES 2.1 Modified Caesar cipher 15 2.2 Components of Caesar chipper 16 2.3 Printable ASCII characters 20 2.4 Frequency Analysis table 23 3.1 Proposed new Algorithm 29 3.2 Encryption Algorithm 32 3.3 Decryption Algorithm 33 3.4 Flow chart 34 3.5 Interface Design 35 4.1 Variable Declaration 39 4.2 Encryption Algorithm 41 4.3 Odd Position Shift 42 4.4 Swap Function (Switch) 43 4.5 Decryption Even Position 44 4.6 Decryption Odd Position 44 4.7 Interface of Robust Caesar Cipher Algorithm 45 5.1 Test 1 51 5.2 Test 2 52 5.3 Test 3 53 5.4 Test 4 54 5.5 Result of Comparisons 58 xii LIST OF SYMBOLS AND ABBREVIATIONS C - Ciphertext M - Message OSB - Odd Position Shift Backward ESF - Even Position Shift Forward ESW - Encryption Switch xiii LIST OF APPENDICES APPENDIX TITLE PAGE A Programming Code 64 iv ABSTRACT Cryptography is the art of encoding a message such that only the sender and the intended recipient can decode. But with advent of Internet, information confidentiality faces more treats, which lead to the development of cryptographic algorithms. This thesis presented a cryptographic algorithm titled Robust Caesar cipher against frequency analysis using bidirectional shift. It encrypts message bit by bit (stream cipher) and uses one key ideology (symmetric key cipher). The sender encrypts the message before transmitting and the receiver decrypts upon receiving using the same key as used in the encryption process. It works by shifting the plaintext characters to different direction which eliminates repetition of characters in the ciphertext. Nevertheless, previous versions of Caesar cipher are prone to frequency analysis attack. In this research, Caesar cipher is enhanced to 95 characters in a tabular arrangement as digital messages are not only 26 characters. Based on this method, the sender will transpose the bits in the message according to their sequence arrangement (odd and even position) by shifting the characters in the odd position to the left and characters in the even position to the right side. The cryptographic key given by the sender will determine the shifting position of all the characters. Shifting the plaintext to different directions mitigates the problem of repetition. The experiment shows that the proposed method has an efficiency of 99.9% resistance than the earlier version of the Caesar cipher. However, the proposed method can save as an option to be integrated with other algorithms to strengthen the security. v ABSTRAK Kriptografi adalah seni pengkodan mesej yang hanya membolehkan penghantar dan penerima membaca mesej tersebut. Tetapi dengan kemudahan Internet, kerahsiaan maklumat menghadapi pelbagai serangan dan hal ini membawakan kepada pembangunan algoritma kriptografi. Tesis ini dikemukakan berkaitan algoritma kriptografi yang bertajuk Robust Caesar cipher against frequency analysis using bidirectional shift. Ia menyulitkan mesej sikit demi sedikit (aliran cipher) dengan menggunakan satu ideologi utama (simetri cipher utama). Penghantar menyulitkan mesej sebelum menghantar kepada penerima dan penerima membaca mesej tersebut dengan menggunakan kekunci yang sama semasa proses penyulitan. Caesar cipher ini berfungsi dengan mengalihkan huruf plaintext ke arah yang berbeza untuk menghapuskan pengulangan huruf dalam mesej. Walau bagaimanapun, versi awal Caesar cipher telah terdedah kepada serangan frekuensi analisis. Dalam kajian ini, Caesar cipher mempertingkatkan huruf dalam susunan jadual mesej digital dari 26 ke 95 huruf. Berdasarkan kaedah ini, penghantar akan mengubah nada bit dalam bentuk mesej mengikut susunan urutan yang ditentukan (kedudukan ganjil dan genap) dengan mengalihkan huruf-huruf ganjil ke kiri dan huruf-huruf genap ke sebelah kanan. Kekunci kriptografi yang diberikan oleh penghantar akan menentukan kedudukan semua huruf. Peralihan plaintext ke arah yang berbeza menyelesaikan masalah pengulangan huruf. Eksperimen menunjukkan bahawa kaedah yang dicadangkan mempunyai kecekapan rintangan 99.9 % daripada versi awal cipher Caesar. Walau bagaimanapun, kaedah yang dicadangkan adalah bagi membolehkan dan disimpan sebagai pilihan untuk disepadukan dengan algoritma lain supaya dapat mengukuhkan lagi keselamatan mesej yang dihantar secara sulit. 1 CHAPTER 1 INTRODUCTION 1.1 Overview Networking has become a very important aspect of every one’s life if the rate of Internet usage is considered. Information is usually being sent and sometimes shares data. Some of those classified information contains account numbers, meeting venue, addresses, and other crucial information that need confidentiality. Likewise the information may contain some banks and academic related documents that require some privacy. In most cases, senders of those messages are not really concern about the security of the communication channel. Malicious individuals could tap into the unsecured channel of the communication illegitimately, to make illegal use of the resources (compromises confidentiality) or to temper (compromises availability and integrity) with the data. To secure the reliability of the communication channel, restriction methods can be applied on the channels so that only the original sender and intended receiver can unlock and decode the message. However, user might like to make sure that the message at the destination is the same as the original from the source, which means to ensure the integrity of the message. In this case, some sort of pad lock has to be applied to lock the data. This could not only be done on a physical surface, can also be applied on logical or digital data as well, but only with the help of some mathematical algorithms called 2 cryptography. Cryptography is the art and science of using mathematics and logics to prepare a coded or protected communication that can only be understood by the sender and intended recipient.
Recommended publications
  • Introduction to Cryptography Teachers' Reference
    Introduction to Cryptography Teachers’ Reference Dear Teachers! Here I have mentioned some guidelines for your good self so that your students can benefit form these modules. I am very hopeful that you will enjoy conducting the session. After Module-1 1. Scytale Decryption In your class ask your students to devise a method to decrypt the message just been encrypted using Scytale. Encourage them to look around to find a decryption tool. Ask your students to cut a strip of paper some 4mm wide, 32cm long and light pencil lines drawn on it at 4mm distance. To give it the following shape. Now write cipher text on the paper strip in the following way. t i t i r s a e e e e e b h y w i t i l r f d n m g o e e o h v n t t r a a e c a g o o w d m h Encourage them once again to find a tool around them to decrypt it. Ask them to look for a very familiar thing they must have been using right from their early school days to do their work. Now many of them must have figured out that you are asking for a pencil. Now ask them to use the pencil to decrypt the cipher text by using pencil and the only reasonable way would be to wrap the paper strip around the strip. The plain text will be visible along the six side faces of the pencil. Encourage them to reason that how did it work? There is a connection between six rows of the table in which the plain text was filled and the six faces of the pencil.
    [Show full text]
  • Enhancing the Security of Caesar Cipher Substitution Method Using a Randomized Approach for More Secure Communication
    International Journal of Computer Applications (0975 – 8887) Volume 129 – No.13, November2015 Enhancing the Security of Caesar Cipher Substitution Method using a Randomized Approach for more Secure Communication Atish Jain Ronak Dedhia Abhijit Patil Dept. of Computer Engineering Dept. of Computer Engineering Dept. of Computer Engineering D.J. Sanghvi College of D.J. Sanghvi College of D.J. Sanghvi College of Engineering Engineering Engineering Mumbai University, Mumbai, Mumbai University, Mumbai, Mumbai University, Mumbai, India India India ABSTRACT communication can be encoded to prevent their contents from Caesar cipher is an ancient, elementary method of encrypting being disclosed through various techniques like interception plain text message into cipher text protecting it from of message or eavesdropping. Different ways include using adversaries. However, with the advent of powerful computers, ciphers, codes, substitution, etc. so that only the authorized there is a need for increasing the complexity of such people can view and interpret the real message correctly. techniques. This paper contributes in the area of classical Cryptography concerns itself with four main objectives, cryptography by providing a modified and expanded version namely, 1) Confidentiality, 2) Integrity, 3) Non-repudiation for Caesar cipher using knowledge of mathematics and and 4) Authentication. [1] computer science. To increase the strength of this classical Cryptography is divided into two types, Symmetric key and encryption technique, the proposed modified algorithm uses Asymmetric key cryptography. In Symmetric key the concepts of affine ciphers, transposition ciphers and cryptography a single key is shared between sender and randomized substitution techniques to create a cipher text receiver. The sender uses the shared key and encryption which is nearly impossible to decode.
    [Show full text]
  • "Utter Nonsense?" : an Examination of the Linguisitic Theories of F
    W&M ScholarWorks Undergraduate Honors Theses Theses, Dissertations, & Master Projects 1988 Did you say "utter nonsense?" : an examination of the linguisitic theories of F. de Saussure and Noam Chomsky R.G. Herndon Jr. College of William and Mary Follow this and additional works at: https://scholarworks.wm.edu/honorstheses Recommended Citation Herndon, R.G. Jr., "Did you say "utter nonsense?" : an examination of the linguisitic theories of F. de Saussure and Noam Chomsky" (1988). Undergraduate Honors Theses. Paper 655. https://scholarworks.wm.edu/honorstheses/655 This Honors Thesis is brought to you for free and open access by the Theses, Dissertations, & Master Projects at W&M ScholarWorks. It has been accepted for inclusion in Undergraduate Honors Theses by an authorized administrator of W&M ScholarWorks. For more information, please contact [email protected]. Did you say "utter Nonsense?" An Examination of the Lingusi tic 'Iheories of F. de Saussure and NoamChomsky A thesis submitted in partial fulfillment of the requirements for the degree Bachelor of Arts with Honors in Linguistics and Philosophy fram the College of William and Mary in Virginia By R. G. Her'ndon, Jr. t{\ay 1'183 Accepted for: HOi\O ,S "Youwill observe the Rules of Battle, of course? the ~rute Knight remarked, putting on his helIoot too. "I always do," said the Red Knight, and they began banging awayat each other with such a fury that Alice got behirrl a tree to be out of the \vay of the blows. "I wonder, what the Rules of Battle are;." she said to herself, as she watched the fight, timidly peeping out from her hiding place.
    [Show full text]
  • Death and Nonsense in the Poetry of George Macdonaldâ•Žs at the Back of the North Wind and Lewis Carrollâ•Žs Alice Books
    North Wind: A Journal of George MacDonald Studies Volume 30 Article 4 1-1-2011 Death and Nonsense in the Poetry of George MacDonald’s At the Back of the North Wind and Lewis Carroll’s Alice Books Melody Green Follow this and additional works at: http://digitalcommons.snc.edu/northwind Recommended Citation Green, Melody (2011) "Death and Nonsense in the Poetry of George MacDonald’s At the Back of the North Wind and Lewis Carroll’s Alice Books," North Wind: A Journal of George MacDonald Studies: Vol. 30 , Article 4. Available at: http://digitalcommons.snc.edu/northwind/vol30/iss1/4 This Article is brought to you for free and open access by the English at Digital Commons @ St. Norbert College. It has been accepted for inclusion in North Wind: A Journal of George MacDonald Studies by an authorized editor of Digital Commons @ St. Norbert College. For more information, please contact [email protected]. Death and Nonsense in the Poetry of George MacDonald’s At the Back of the North Wind and Lewis Carroll’s Alice Books Melody Green n The Literary Products of the George MacDonald-Lewis Carroll FriendshipI, John Docherty explains not only that MacDonald and Carroll were friends for more than 40 years, but also that they explored some of the same ideas in their texts. In “Some Linguistic Moves in the Carroll- MacDonald ‘Literary Game,’” Fernando Soto takes this even further by arguing that these two writers played linguistic games with each other, based on their understanding of the Scottish and Cheshire dialects. Meanwhile, R.
    [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]
  • No Nonsense Grammar Conference Thursday 2Nd February 2017 | Crosby Lakeside Adventure Centre, L22 1RR | 9:30 - 15:30
    No Nonsense Grammar Conference Thursday 2nd February 2017 | Crosby Lakeside Adventure Centre, L22 1RR | 9:30 - 15:30 Conference Overview Key Reasons to Attend Without doubt, the expectations of grammar knowledge Hear from nationally renowned primary literacy and understanding in the National Curriculum are experts presenting schools with enormous challenges. Secure, Expand your subject knowledge about a key confident teacher subject knowledge needs to underpin aspect of the curriculum high expectations of children’s understanding resulting in: Learn how to get the best out of No Nonsense “Grammar teaching that draws attention to the linguistic Grammar possibilities available to children, and has at its heart the creative shaping of text.” Reflect on current practice Myhill et al (2016) Grammar for Creative Teachers Develop ideas for the classroom and for developing grammar in school Hear nationally renowned expert Debra Myhill outline how grammar is a key tool in exploring how texts work, both the texts children read and the texts they write. Followed Who should attend? by two sessions with Rebecca Cosgrave, co-author of No Nonsense Grammar. Rebecca will highlight the importance Primary Teachers and Literacy Coordinators of teachers’ grammatical subject knowledge and detail how No Nonsense Grammar can support outstanding teaching and learning. In association with: www.babcock-education.co.uk/ldp © Babcock International Group PLC Our Speakers About No Nonsense Grammar Debra Myhill, Pro-Vice-Chancellor: College of Social Sciences and International Studies Debra Myhill’s interests are in the teaching and research of language and literacy. Debra is Director of the Centre for Research in Writing and her commitment is to the bringing together of teaching, teacher education and research so that children and young people’s experience of learning to be literate enables them to be confident, articulate citizens of the future, able to use language and literature for personal fulfilment and economic well-being.
    [Show full text]
  • FROM JULIUS CAESAR to the BLOCKCHAIN: a BRIEF HISTORY of CRYPTOGRAPHY by Côme JEAN JARRY & Romain ROUPHAEL, Cofounders of BELEM
    Corporate identity in the digital era #9 JANUARY 2017 FROM JULIUS CAESAR TO THE BLOCKCHAIN: A BRIEF HISTORY OF CRYPTOGRAPHY By Côme JEAN JARRY & Romain ROUPHAEL, cofounders of BELEM 22 The world’s most important asset is information. Now message was inscribed lengthwise. Once the parchment more than ever. With computer theft and hacking was unrolled, the letters of the message were mixed becoming a common threat, protecting information up and the message meaningless. The receiver would is crucial to ensure a trusted global economy. need an identical stick to decipher the text. The E-commerce, online banking, social networking or scytale transposition cipher relied on changing the emailing, online medical results checking, all our order of the letters, rather than the letters themselves. transactions made across digital networks and This cryptographic technique still prevails today. insecure channels of communication, such as the Internet, mobile phones or ATMs, are subjected to vulnerabilities. Our best answer is cryptography. And THE ART OF SUBSTITUTION it has always been. As a science and as an art, it is Julius Caesar was also known to use encryption to an essential way to protect communication. convey messages to his army generals posted in the Cryptography goes back to older times, as far back as war front. The Caesar cipher is a simple substitution the Ancient World. cipher in which each letter of the plaintext is rotated left or right by some number of positions down the alphabet. The receiver of the message would then Early cryptography was solely concerned with shift the letters back by the same number of positions concealing and protecting messages.
    [Show full text]
  • Index-Of-Coincidence.Pdf
    The Index of Coincidence William F. Friedman in the 1930s developed the index of coincidence. For a given text X, where X is the sequence of letters x1x2…xn, the index of coincidence IC(X) is defined to be the probability that two randomly selected letters in the ciphertext represent, the same plaintext symbol. For a given ciphertext of length n, let n0, n1, …, n25 be the respective letter counts of A, B, C, . , Z in the ciphertext. Then, the index of coincidence can be computed as 25 ni (ni −1) IC = ∑ i=0 n(n −1) We can also calculate this index for any language source. For some source of letters, let p be the probability of occurrence of the letter a, p be the probability of occurrence of a € b the letter b, and so on. Then the index of coincidence for this source is 25 2 Isource = pa pa + pb pb +…+ pz pz = ∑ pi i=0 We can interpret the index of coincidence as the probability of randomly selecting two identical letters from the source. To see why the index of coincidence gives us useful information, first€ note that the empirical probability of randomly selecting two identical letters from a large English plaintext is approximately 0.065. This implies that an (English) ciphertext having an index of coincidence I of approximately 0.065 is probably associated with a mono-alphabetic substitution cipher, since this statistic will not change if the letters are simply relabeled (which is the effect of encrypting with a simple substitution). The longer and more random a Vigenere cipher keyword is, the more evenly the letters are distributed throughout the ciphertext.
    [Show full text]
  • CPSC 467B: Cryptography and Computer Security
    Outline Perfect secrecy One-time pad Cryptanalysis CPSC 467b: Cryptography and Computer Security Michael J. Fischer Lecture 3 January 15, 2010 Michael J. Fischer CPSC 467b 1/40 Outline Perfect secrecy One-time pad Cryptanalysis 1 Perfect secrecy Caesar cipher Loss of perfection 2 One-time pad 3 Cryptanalysis Caesar cipher Brute force attack Manual attacks Michael J. Fischer CPSC 467b 2/40 Outline Perfect secrecy One-time pad Cryptanalysis Caesar cipher Loss of perfection Caesar cipher Recall: Base Caesar cipher: Ek (m) = (m + k) mod 26 Dk (c) = (c − k) mod 26: Full Caesar cipher: r Ek (m1 ::: mr ) = Ek (m1) ::: Ek (mr ) r Dk (c1 ::: cr ) = Dk (c1) ::: Dk (cr ): Michael J. Fischer CPSC 467b 3/40 Outline Perfect secrecy One-time pad Cryptanalysis Caesar cipher Loss of perfection Simplified Caesar cipher A probabilistic analysis of the Caesar cipher. Simplify by restricting to a 3-letter alphabet. M = C = K = f0; 1; 2g Ek (m) = (m + k) mod 3 Dk (m) = (m − k) mod 3. A priori message probabilities: m pm 0 1=2 1 1=3 2 1=6 Michael J. Fischer CPSC 467b 4/40 Outline Perfect secrecy One-time pad Cryptanalysis Caesar cipher Loss of perfection Joint message-key distribution Each key has probability 1/3. Joint probability distribution: k z }| { 0 1 2 8 0 1=6 1=6 1=6 < m 1 1=9 1=9 1=9 : 2 1=18 1=18 1=18 Michael J. Fischer CPSC 467b 5/40 Outline Perfect secrecy One-time pad Cryptanalysis Caesar cipher Loss of perfection Conditional probability distribution Recall P[m = 1] = 1=3.
    [Show full text]
  • Grade 6 Math Circles Cryptography Solutions Atbash Cipher Caesar Cipher
    Faculty of Mathematics Centre for Education in Waterloo, Ontario N2L 3G1 Mathematics and Computing Grade 6 Math Circles November 5/6 2019 Cryptography Solutions Hello World Khoor Zruog Hello Zruog Khoor Khoor Zruog World 1. Person A encrypts plaintext 2. Person B receives ciphertext 3. Person B decrypts ciphertext back into ciphertext into plaintext Atbash Cipher Examples 1. Encrypt \Math Circles" using the Atbash cipher. Nzgs Xrixovh 2. Decrypt \ORLM PRMT" using the Atbash cipher. LION KING Caesar Cipher Examples: Encrypt or decrypt the following messages using the shift number given in parentheses: a) Welcome to Math Circles! (5) Bjqhtrj yt Rfym Hnwhqjx! 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 ciphertext F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 1 b) Ljw hxd anjm cqrb? (9) Can you read this? 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 ciphertext J K L M N O P Q R S T U V W X Y Z A B C D E F G H I c) What if I did a Caesar Shift of 26 units on \Welcome to Math Circles!"? A Caesar shift of 26 would be shifting by the length of the alphabet. For example I would be shifting A 26 letters to the right.
    [Show full text]
  • Shift Cipher Substitution Cipher Vigenère Cipher Hill Cipher
    Lecture 2 Classical Cryptosystems Shift cipher Substitution cipher Vigenère cipher Hill cipher 1 Shift Cipher • A Substitution Cipher • The Key Space: – [0 … 25] • Encryption given a key K: – each letter in the plaintext P is replaced with the K’th letter following the corresponding number ( shift right ) • Decryption given K: – shift left • History: K = 3, Caesar’s cipher 2 Shift Cipher • Formally: • Let P=C= K=Z 26 For 0≤K≤25 ek(x) = x+K mod 26 and dk(y) = y-K mod 26 ʚͬ, ͭ ∈ ͔ͦͪ ʛ 3 Shift Cipher: An Example ABCDEFGHIJKLMNOPQRSTUVWXYZ 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 • P = CRYPTOGRAPHYISFUN Note that punctuation is often • K = 11 eliminated • C = NCJAVZRCLASJTDQFY • C → 2; 2+11 mod 26 = 13 → N • R → 17; 17+11 mod 26 = 2 → C • … • N → 13; 13+11 mod 26 = 24 → Y 4 Shift Cipher: Cryptanalysis • Can an attacker find K? – YES: exhaustive search, key space is small (<= 26 possible keys). – Once K is found, very easy to decrypt Exercise 1: decrypt the following ciphertext hphtwwxppelextoytrse Exercise 2: decrypt the following ciphertext jbcrclqrwcrvnbjenbwrwn VERY useful MATLAB functions can be found here: http://www2.math.umd.edu/~lcw/MatlabCode/ 5 General Mono-alphabetical Substitution Cipher • The key space: all possible permutations of Σ = {A, B, C, …, Z} • Encryption, given a key (permutation) π: – each letter X in the plaintext P is replaced with π(X) • Decryption, given a key π: – each letter Y in the ciphertext C is replaced with π-1(Y) • Example ABCDEFGHIJKLMNOPQRSTUVWXYZ πBADCZHWYGOQXSVTRNMSKJI PEFU • BECAUSE AZDBJSZ 6 Strength of the General Substitution Cipher • Exhaustive search is now infeasible – key space size is 26! ≈ 4*10 26 • Dominates the art of secret writing throughout the first millennium A.D.
    [Show full text]
  • Nonsense and Illusions of Thought 4
    NONSENSE AND ILLUSIONS OF THOUGHT1 Herman Cappelen Arché/University of St Andrews and CSMN/University of Oslo Note that this is the penultimate version of the paper published in Philosophical Perspectives, 2013 This paper addresses four issues: 1. What is nonsense? 2. Is nonsense possible? 3. Is nonsense actual? 4. Why do the answers to (1)-(3) matter, if at all? These are my answers: 1. A sentence (or an utterance of one) is nonsense if it fails to have or express content (more on ‘express’, ‘have’, and ‘content’ below). This is a version of a view that can be found in Carnap (1959), Ayer (1936), and, maybe, the early Wittgenstein (1922). The notion I propose abstracts away from their favored (but wrong) theories of what meaning is. It is a notion of nonsense that can be appealed to by all semantic frameworks and all theories of what content is, but structurally it is just like e.g. Carnap’s. Nonsense, as I construe it, is accompanied by illusions of thought (and I think that was part of Carnap’s conception as well). 2. Yes. In particular, I examine three arguments for the impossibility of illusion of thought (which on my construal accompanies linguistic nonsense) and they are all unsound. 3. There might be a lot of nonsense, both in ordinary and theoretical speech. In particular, it is likely that much of contemporary philosophy consists of nonsense. Empirical work is required to determine just how much. 4. The struggle to avoid nonsense (and achieve meaningfulness) is at least as 1 Thanks to Paul Boghossian, Jessica Brown, Josh Dever, Olav Gjelsvik, John Hawthorne, Tom Hodgson, Margot Strohminger, and Åsa Wikforss for helpful discussions of the issues discussed in this paper.
    [Show full text]