Chapter Two discusses the fundamentals of cryptography and encryption techniques, covering key concepts such as symmetric and public key cryptography, encryption and decryption processes, and historical developments in cryptography. It explains important terms like plaintext, ciphertext, and cryptosystems, and introduces various encryption methods including the Caesar Shift Cipher and steganography. The chapter highlights the evolution of cryptographic practices from ancient times to modern applications, emphasizing the role of mathematics in contemporary cryptography.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views41 pages
Comp Sec Ch02(a)-1
Chapter Two discusses the fundamentals of cryptography and encryption techniques, covering key concepts such as symmetric and public key cryptography, encryption and decryption processes, and historical developments in cryptography. It explains important terms like plaintext, ciphertext, and cryptosystems, and introduces various encryption methods including the Caesar Shift Cipher and steganography. The chapter highlights the evolution of cryptographic practices from ancient times to modern applications, emphasizing the role of mathematics in contemporary cryptography.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41
CHAPTER TWO
Basic Cryptography & Encryption
Techniques Basic Cryptographic Terms Historical Background of Cryptography Symmetric and Public Key Cryptography Symmetric Key Cryptography One time pads Stream vs Block ciphers Symmetric key algorithms Public Key Cryptography Digital Signature Basic Cryptographic Terms What is Cryptography? The art and science of concealing the messages to introduce secrecy in information security is recognized as cryptography. Encryption is a transformed type of genuine information where only the authorized parties know how to read it, So in the worst case scenario if somebody has access to these files they would still not be able to understand the message in it. The word ‘cryptography’ was coined by two Greek words, ‘Krypto’ meaning hidden and ‘grapene’ meaning writing. March 29, 2023 2 Basic Cryptographic Terms Encryption is the process of encoding a message so that its meaning is not obvious; Decryption is the reverse process, transforming an encrypted message back into its normal, original form. We encode, encrypt, or encipher the original message to hide its meaning. Then, we decode, decrypt,/decipher it to reveal the original message. A system for encryption and decryption is called a cryptosystem.
March 29, 2023 3
Basic Cryptographic Terms Cryptanalyst: is a person who studies encryption and encrypted message and tries to find the hidden meanings (to break an encryption). Confusion: it is a technique for ensuring that cipher text has no clue about the original message. Diffusion: it increases the redundancy of the plaintext by spreading it across rows and columns. The roots of cryptography are found in Roman and Egyptian civilizations. March 29, 2023 4 Basic Cryptographic Terms The original form of a message is known as plaintext The encrypted form is called cipher text. For convenience, we denote a plaintext message P as a sequence of individual characters P = Similarly, cipher text is written as C =
March 29, 2023 5
What is Cryptography Cryptography is the art and science of making a cryptosystem that is capable of providing information security. Cryptography deals with the actual securing of digital data. It refers to the design of mechanisms based on mathematical algorithms that provide fundamental information security services. You can think of cryptography as the establishment of a large toolkit containing different techniques in security applications.
March 29, 2023 6
What is Cryptanalysis The art and science of breaking the cipher text is known as cryptanalysis. Is the sister branch of cryptography and they both co-exist. The cryptographic process results in the cipher text for transmission or storage. It involves the study of cryptographic mechanism with the intention to break them. Is also used during the design of the new cryptographic techniques to test their security strengths. March 29, 2023 7 Historical Background The art of cryptography is considered to be born along with the art of writing. As civilizations evolved, human beings got organized in tribes, groups, and kingdoms. This led to the emergence of ideas such as power, battles, supremacy, and politics. These ideas further fueled the natural need of people to communicate secretly with selective recipient which in turn ensured the continuous evolution of cryptography as well. March 29, 2023 8 Historical Background The bases of encryption are since the ancient times. A good example is the pigeon couriers, where the kings used to send messages to their commandants in the battle field in a specific code, When the enemies caught them, they could not read them, just that the message was lost, but if arrived at the destination commandant had the decryption vocabulary so they could decrypt it. March 29, 2023 9 The Oldest Cryptographic Technique The first known evidence of cryptography can be traced to the use of ‘hieroglyph’. Some 4000 years ago, the Egyptians used to communicate by messages written in hieroglyph. This code was the secret known only to the scribes who used to transmit messages on behalf of the kings. One such hieroglyph is shown below.
March 29, 2023 10
The Oldest Cryptographic Technique
March 29, 2023 11
Caesar Shift Cipher The earlier Roman method of cryptography, popularly known as the Caesar Shift Cipher, Relies on shifting the letters of a message by an agreed number (three was a common choice), the recipient of this message would then shift the letters back by the same number and obtain the original message. This involved replacing alphabets of message with other alphabets with some secret rule.
March 29, 2023 12
Caesar Shift Cipher This rule became a key to retrieve the message back from the garbled message.
March 29, 2023 13
Steganography Steganography is similar but adds another dimension to Cryptography. In this method, people not only want to protect the secrecy of an information by concealing it, but they also want to make sure any unauthorized person gets no evidence that the information even exists. For example, invisible watermarking. In steganography, an unintended recipient or an intruder is unaware of the fact that observed data contains hidden information. In cryptography, an intruder is normally aware that data is being communicated, because they can see the coded/scrambled message.
March 29, 2023 14
Evolution of Cryptography It is during and after the European Renaissance, various Italian and Papal states led the rapid proliferation of cryptographic techniques. Various analysis and attack techniques were researched in this era to break the secret codes. Improved coding techniques such as Vigenere Coding came into existence in the 15 century, which offered moving letters in the message with a number of variable places instead of moving them the same number of places.
March 29, 2023 15
Evolution of Cryptography Only after the 19 century, cryptography evolved from the ad hoc approaches to encryption to the more sophisticated art and science of information security. In the early 20 century, the invention of mechanical and electromechanical machines, such as the Enigma rotor machine, provided more advanced and efficient means of coding the information. During the period of World War II, both cryptography and cryptanalysis became excessively mathematical. March 29, 2023 16 Evolution of Cryptography With the advances taking place in this field, government organizations, military units, and some corporate houses started adopting the applications of cryptography. They used cryptography to guard their secrets from others. Now, the arrival of computers and the Internet has brought effective cryptography within the reach of common people.
March 29, 2023 17
Modern Cryptography Modern cryptography is the cornerstone of computer and communications security. Its foundation is based on various concepts of mathematics such as number theory, computational-complexity theory, and probability theory. There are three major characteristics that separate modern cryptography from the classical approach.
March 29, 2023 18
Modern Cryptography
March 29, 2023 19
Modern Cryptography Cryptology, the study of cryptosystems, can be subdivided into two branches Cryptography Cryptanalysis Cryptography concerns with the design of cryptosystems, while cryptanalysis studies the breaking of cryptosystems.
March 29, 2023 20
Cryptography Primitives Cryptography primitives are nothing but the tools and techniques in Cryptography that can be selectively used to provide a set of desired security services Encryption Hash functions Message Authentication codes (MAC) Digital Signatures For a given cryptosystem, a collection of all possible decryption March 29, 2023 keys is called a key space. 21 Cryptography Primitives The primitives that can achieve a particular security service on their own. Cryptographic primitives are intricately related and they are often combined to achieve a set of desired security services from a cryptosystem.
March 29, 2023 22
Components of a Cryptosystem
March 29, 2023 23
Components of a Cryptosystem Plaintext. It is the data to be protected during transmission. Encryption Algorithm. It is a mathematical process that produces a cipher text for any given plaintext and encryption key. Cipher text. It is the scrambled version of the plaintext produced by the encryption algorithm using a specific the encryption key. Decryption Algorithm. It is a mathematical process, that produces a unique plaintext for any given cipher text and decryption key. Encryption Key. It is a value that is known to the sender. Decryption Key. It is a value that is known to the receiver.
March 29, 2023 24
Earlier Cryptographic Systems Earlier cryptographic systems are also referred to as Ciphers. In general, a cipher is simply just a set of steps (an algorithm) for performing both an encryption, and the corresponding decryption. All of these systems are based on symmetric key encryption scheme. The only security service these systems provide is confidentiality of information. Unlike modern systems which are digital and treat data as binary numbers, the earlier systems worked on alphabets as basic element.
March 29, 2023 25
Caesar Cipher It is a mono-alphabetic cipher wherein each letter of the plaintext is substituted by another letter to form the cipher text It is a simplest form of substitution cipher scheme. This cryptosystem is generally referred to as the Shift Cipher. The concept is to replace each alphabet by another alphabet which is ‘shifted’ by some fixed number between 0 and 25.
March 29, 2023 26
Caesar Cipher Both sender and receiver agree on a ‘secret shift number’ for shifting the alphabet. Number which is between 0 and 25 becomes the key of encryption. The name ‘Caesar Cipher’ is occasionally used to describe the Shift Cipher when the ‘shift of three’ is used. It is not a secure cryptosystem because there are only 26 possible keys to try out. An attacker can carry out an exhaustive key search with available limited computing resources. March 29, 2023 27 Process of Shift Cipher In order to encrypt a plaintext letter, the sender positions the sliding ruler underneath the first set of plaintext letters and slides it to LEFT by the number of positions of the secret shift. The plaintext letter is then encrypted to the cipher text letter on the sliding ruler underneath.
In this case, the plaintext ‘tutorial’ is encrypted to the cipher text
‘WXWRULDO’ for a Shift of 3. March 29, 2023 28 Process of Shift Cipher The receiver who also knows the secret shift, positions his sliding ruler underneath the cipher text alphabet and slides it to RIGHT by the agreed shift number, 3 in this case. The cipher text letter by the plaintext letter on the sliding ruler underneath. Hence the cipher text ‘WXWRULDO’ is decrypted to ‘tutorial’.
To decrypt a message encoded with a Shift of 3, generate the plaintext alphabet
using a shift of ‘-3’ March 29, 2023 29 Simple Substitution Cipher It is an improvement to the Caesar Cipher. Instead of shifting the alphabets by some number, this scheme uses some permutation of the letters in alphabet. E.g. A.B…..Y.Z and Z.Y……B.A are two obvious permutation of all the letters in alphabet. Permutation is nothing but a jumbled up set of alphabets. With 26 letters in alphabet, the possible permutations are 26! (Factorial of 26) which is equal to 4x10. The sender and the receiver may choose any one of these possible permutation as a cipher text alphabet. This permutation is the secret key of the scheme. March 29, 2023 30 Substitutions Cipher It basically consists of substituting every plaintext character for a different cipher text character. It is of two types I. Mono alphabetic substitution cipher II. Poly alphabetic substitution cipher
March 29, 2023 31
Mono Alphabetic Substitution Cipher Relationship between cipher text symbol & plain text symbol is 1:1. Additive cipher: Key value is added to plain text and numeric value of key ranges from 0-25.
March 29, 2023 32
Polyalphabetic Substitution Cipher In polyalphabetic cipher each occurrence of a character may have different substitution. The relationship between characters in plain text and cipher text is 1 to many. Auto key cipher Play-fair cipher Vigenere cipher Hill cipher March 29, 2023 33 Polyalphabetic Substitution Cipher Auto key cipher: In this cipher, key is stream of sub-keys in which sub-key is used to encrypt the corresponding character in the plain text. Here1st sub-key is predefined and 2nd sub-key is the value of the 1st character of the plain text 3rd sub-key is the value of the 2nd plain text and so on.
March 29, 2023 34
Polyalphabetic Substitution Cipher Play-fair cipher In this secret key is made of 25 characters arranged in 5x5 matrix rules If 2 letters in a plaintext are located in the same row of the secret key then the corresponding encrypted character for each letter is next letter to the right. If 2 letters in a pair are in same column then the corresponding encrypted character is next below in the same column. If 2 letters are neither in same row or in same column then encrypted character is in its own row but in the same column as the other character.
March 29, 2023 35
Polyalphabetic Substitution Cipher
March 29, 2023 36
Polyalphabetic Substitution Cipher Vigener cipher: The key stream is the repetition of the initial secret key stream of length m. (1<=m<=26)
March 29, 2023 37
Transposition Cipher A transposition cipher is a method of encryption by which the positions held by units of plaintext (which are commonly characters or groups of characters) are shifted according to a regular system, so that the cipher text constitutes a permutation of the plaintext. That is, the order of the units is changed. The goal of substitution is confusion; the transposition method is an attempt to make it difficult i.e diffusion. March 29, 2023 38 Transposition Cipher Keyless Transposition Cipher There are two methods for permutation of characters 1. Text is written into a table column by column and transmitted row by row E.g. 1: plaintext- meet me at the park
cipher text- memateaketethpr
2. Text is written into the table row by row and then transmitted column by column. E.g. 2: meet me at the park cipher text- mmtaeehreaekttp March 29, 2023 39 Transposition Cipher Keyed Transposition Cipher Plaintext is divided into groups and permutes the character in each group. E.g. Plaintext- “enemy attack at night”
March 29, 2023 40
Transposition Cipher Combining the two approaches Encryption and decryption is done in three steps. • Text is written into a table row by row. • Permutation is done by reordering the column. • New table is read column by column