290 likes | 372 Views
DATA & COMPUTER SECURITY (CSNB414). MODULE 2 CLASSICAL CRYPTOGRAPHY. Something to Ponder…. In today’s world, more and more data and documents being sent over computer networks. These data and document’s transfers are exposed to the threats of interception, interruption, modification etc.
E N D
DATA & COMPUTER SECURITY (CSNB414) MODULE 2 CLASSICAL CRYPTOGRAPHY
Something to Ponder….. • In today’s world, more and more data and documents being sent over computer networks. • These data and document’s transfers are exposed to the threats of interception, interruption, modification etc. • Here, encryption can be used to ensure:- - data confidentiality e.g. securing passwords from hacker
Terminologies of Cryptography • Encryption is the process of transforming data (i.e. plaintext) into a form which meanings are not obvious (cipher text) • Decryption in the reverse process of encryption • A system that support encryption & decryption is known as a cryptosystem. • While cryptography is on how to keep the messages secret, cryptanalysis is on breaking an encryption, i.e. retrieving the plaintext without knowing the proper key. • People who do cryptography are cryptographers, and practitioners of cryptanalysis are cryptanalysts.
Cryptanalysis • Cryptanalysis is like working with ‘cross word puzzle’ • Cryptanalyst often use educated guesses with careful mathematical analysis in order to break an encryption. • Who often employ cryptanalyst?? FBI? CIA? KGB? Other secret government agents, etc.
Hidden Meanings Change the Course of World War II • In the Spring of 1942, the US was fighting Japan in the Pacific. American cryptanalyst had cracked some of the Japanese naval codes, but they didn’t understand the extra encoding the Japanese used to describe particular sites. A message intercepted by the IS told the Allies’ officers that ‘AF’ was to be the target of a major assault. The US navy suspected that the assault would be on Midway island, but it needed to be sure. • Commander Joseph Rocheford, head of the US navy’s cryptography center at Pearl Harbor, devised a clever plan to unearth the meaning of ‘AF’. He directed the naval group at Midway to send a message, requesting fresh water because the water distillery had been damaged. Soon, the US intercepted a Japanese message indicating that ‘AF’ was short of water –verifying that ‘AF’ indeed meant Midway! [SEIO 1]
Basic Principle of Cryptography • In order to encrypt a plaintext (P) into a cipher text (C), one requires:- - the use of encryption algorithm (E) - often the use of a secret encryption key (Ke) C = E(Ke,P) • Vice versa, in order to decrypt a cipher text (C) back into the original plaintext (P), one requires:- - the use of decryption algorithm (D) - often the use of a secret decryption key (Kd) P = D(Kd,C) **Note the word ‘often’. This is because there are cryptosystems that do not require the use of Ke and Kd, known as keyless cipher.**
Basic Types of Encryption • There are two building blocks:- (1) substitution Each letter in the plaintext (P) is exchanged with another to build the cipher text (C) == ‘secret code’ == creating ‘confusion’ (2) transposition The letters in the plaintext (P) are re-arranged based on some mathematical formulae to build the cipher text (C). Also known as permutation == ‘scrambling’ == creating ‘diffusion’
Cryptographic Properties • Shannon introduced:- (1) Confusion Making the relationship between the plaintext and ciphertext as complex and involved as possible. (2) Diffusion Redundancy in the statistics of the plaintext is dissipated in the statistics of the ciphertext. i.e: the output bits should depend on the input bits in a very complex way. Diffusion is desired to produce an effect, called avalanche effect…
Avalanche effect • What is it? • How to measure?
Substitution Cipher • Caesar cipher (keyless cipher) • Simple key substitution cipher • Vernam cipher • Book cipher
Transposition Cipher • Transposition can be done once (i.e. single transposition), or over and over again (multiple). • 2 main types of transposition cipher: (1) keyless transposition cipher == ‘scrambling without key’ (2) keyed columnar cipher == ‘scrambling using key to indicate the width of the column’
Character Representation • Assuming the plaintext is only written in uppercase i.e. A, B, C, ……………… Z • Assuming code ‘0’ is assigned to the first letter, code ‘1’ is assigned to the second letter, so on so forth, i.e.
Caesar Cipher (keyless cipher) • Used by the Romans • Also known as the ‘shift’ cipher • A letter pi in the plaintext is replaced with another ci, where ci = pi + 3
Caesar Cipher (cont.) • Encrypt ‘HELLO GORGEOUS’ =====‘KHOOR JRUJHRXV’ • Decrypt ‘L KDWH BRX’ =====‘I HATE YOU’
Caesar Cipher (cont.) • C = P+3 • Can we have variants of Caesar? • rot13
Simple Key Substitution Cipher • Use a key to assist in shifting letters • E.g. The first few letters should match a key of non repeating letters where key = ‘SECURITY’, and the following letters are shifted accordingly
Simple Key Substitution Cipher (cont.) • Encrypt ‘HOW ARE YOU’ =====‘Y J V SMR XJP’ • Decrypt ‘UJ HJO NFRRK’ =====‘DO NOT SLEEP’
Vernam Cipher • An arbitrary long non repeating sequence of random numbers are ‘added up’ to the plain text • E.g. random number = 76 48 16 82 44 3, where as the plain text is VERNAM
Vernam Cipher • Using ASCII table • E.g. random number = 116 48 61 82 4 30, where as the plain text is VERNAM
Book Cipher • Another source of supposedly ‘random’ numbers is any book, piece of music etc. • Both sender and receiver need access to identical object. • Any book can provide a key. • Eg: Encrypt: machine cannot think and select a passage from Descartes’s meditation as a key: what of thinking? I am, certain
Book Cipher • Vigenere tableau is used.
Recap: Basic Types of Encryption NEXT! DONE! DONE! DONE! DONE! DONE!
Keyless Transposition Cipher • Scrambling into a fixed size matrix – often write by column and read by row • E.g. Encrypt ‘SCRAMBLED EGG’ into 3(horizontal) * 4(vertical) matrix using single transposition = ‘SALECMEGRBDG’ • E.g. Encrypt ‘SCRAMBLED EGG’ into 3(horizontal) * 4(vertical) matrix using double transposition = ‘SEEBACGDLMRG’ Single Trans. Cipher Text Double Trans. Cipher Text Single Trans. Cipher Text Plaintext
Keyed Columnar Transposition Cipher • Scrambling into a matrix which width is determined by the key – always write by row and read by column • E.g. Encrypt ‘CLASS DISMISSED’ with key 4312567 ========‘AISSLMCSSSDEID’ Key Plain Text Ciphertext
COMPUTER & DATA SECURITY (CSNB414) MODULE 2 Part 1 --END--