04/20/231
04/20/232
Session PlanOverview of Classical encryption techniques: Symmetric cipher modelSubstitutionTranspositionSteganography
04/20/233
Cryptography Crypto
secret key public key cryptographic hashes
Used for authentication, integrity protection,
encryption
04/20/234
plaintext - original message ciphertext - coded message cipher - algorithm for transforming plaintext to
ciphertext key - info used in cipher known only to sender/receiver encipher (encrypt) - converting plaintext to
ciphertext decipher (decrypt) - recovering ciphertext from
plaintextcryptography - study of encryption
principles/methodscryptanalysis (codebreaking) - study of principles/
methods of deciphering ciphertext without knowing key
cryptology - field of both cryptography and cryptanalysis
04/20/235
Cryptography Crypto
secret key public key cryptographic hashes
Used for authentication, integrity protection,
encryption
04/20/236
04/20/237
Components of symmetric encryptionPlain textEncryption algorithmSecret keyCipher textDecryption algorithm
04/20/23NETWORK SECURITY8
Important factors of symmetric encryptionType of operations(substitution & transpositions)Number of keys usedProcessing mode ( block cipher & stream cipher)Attacks on encryption system Crypt analysis – To get plain text or key using algorithm Brute-force attack – Try every possible key to get plain
text/key Cryptography + cryptanalysis = cryptology
04/20/23NETWORK SECURITY9
Important factors of symmetric encryptionType of operations(substitution & transpositions)Number of keys usedProcessing mode ( block cipher & stream cipher)Attacks on encryption system Crypt analysis – To get plain text or key using algorithm Brute-force attack – Try every possible key to get plain
text/key Cryptography + cryptanalysis = cryptology
04/20/23NETWORK SECURITY10
Important factors of symmetric encryptionType of operations(substitution & transpositions)Number of keys usedProcessing mode ( block cipher & stream cipher)Attacks on encryption system Crypt analysis – To get plain text or key using algorithm Brute-force attack – Try every possible key to get plain
text/key Cryptography + cryptanalysis = cryptology
04/20/23NETWORK SECURITY11
ciphertext only only knows algorithm & ciphertext
known plaintext know/suspect plaintext & ciphertext
chosen plaintext select plaintext and obtain ciphertext
chosen ciphertext select ciphertext and obtain plaintext
chosen text select plaintext or ciphertext to en/decrypt
04/20/23NETWORK SECURITY12
unconditional security no matter how much computer power or time
is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext
computational security given limited computing resources (eg time
needed for calculations is greater than age of universe), the cipher cannot be broken
04/20/23NETWORK SECURITY13
always possible to simply try every key most basic attack, proportional to key size assume either know / recognise plaintext
Key Size (bits)
Number of Alternative Keys
Time required at 1 decryption/µs
Time required at 106 decryptions/µs
32 232 = 4.3 109 231 µs = 35.8 minutes
2.15 milliseconds
56 256 = 7.2 1016 255 µs = 1142 years 10.01 hours
128 2128 = 3.4 1038 2127 µs = 5.4 1024 years
5.4 1018 years
168 2168 = 3.7 1050 2167 µs = 5.9 1036 years
5.9 1030 years
26 characters
(permutation)
26! = 4 1026 2 1026 µs = 6.4 1012 years
6.4 106 years
04/20/23NETWORK SECURITY14
Caesar cipherMono alphabetic cipherPlayfair cipherPloyalphabetic ciphersOne-time pad
04/20/23NETWORK SECURITY15
Each character of a message is replaced by a character three po-
sition down in the alphabet.plaintext: are you readyciphertext: DUH BRX UHDGBciphertext can be expressed asc = E(3, p) = (p + 3) mod 26where E() stands for encryption
c = E(k, p) = (p + k) mod 26• The formula for decryption would be
p = D(k, c) = (c − k) mod 26
04/20/23NETWORK SECURITY16
In a monoalphabetic cipher, our substitution characters are arandom permutation of the 26 letters of the alphabet:
plaintext letters: a b c d e f .....substitution letters: t h i j a b .....Note that there are 26! permutations of the
alphabet. That is a number larger than 4 × 1026.Pairs of adjacent characters are referred to as
digrams, andtriples of characters as trigrams.
04/20/23NETWORK SECURITY17
human languages are redundant eg "th lrd s m shphrd shll nt wnt" letters are not equally commonly used in English E is by far the most common
letter followed by T,R,N,I,O,A,S
other letters like Z,J,K,Q,X are fairly rare have tables of single, double & triple
letter frequencies for various languages
04/20/23NETWORK SECURITY18
04/20/23NETWORK SECURITY19
In Playfair cipher, you first choose an encryption key. You then enter the letters of the key in the cells of a 5 × 5 matrix in a left to right fashion starting with the first cell at the top-left corner.
04/20/23NETWORK SECURITY20
Rulesyou must insert a chosen “filler” letter (let’s say it is
‘x’) between any repeating letters in the plaintext.Two plaintext letters that fall in the same row of the
5 × 5 matrix are replaced by letters to the right of each in the row.
Two plaintext letters that fall in the same column are replaced by the letters just below them in the column.
Otherwise, for each plaintext letter in a pair, replace it with the letter that is in the same row but in the column of the other letter.
04/20/23NETWORK SECURITY21
if a truly random key as long as the message is used, the cipher will be secure
called a One-Time padis unbreakable since ciphertext bears no
statistical relationship to the plaintextsince for any plaintext & any ciphertext
there exists a key mapping one to othercan only use the key once thoughproblems in generation & safe distribution of
key
04/20/23NETWORK SECURITY22
Mapping is achieved permutation on plain text letters.
Transposition means rearranging the order of appearance of the elements of the plaintext.
Rail fenceRow transposition
04/20/23NETWORK SECURITY23
A very simple form of [transposition cipher] is the rail fence, named for its fencelike appearance, which is the result of aligning rows of letters, then shifting them. The key is the number of rails and the order in which they are taken off.
04/20/23NETWORK SECURITY24
Three rows
04/20/23NETWORK SECURITY25
a more complex transpositionwrite letters of message out in rows over a
specified number of columnsthen reorder the columns according to
some key before reading off the rowsKey: 3 4 2 1 5 6 7Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y zCiphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
04/20/23NETWORK SECURITY26
before modern ciphers, rotor machines were most common complex ciphers in use
widely used in WW2German Enigma, Allied Hagelin, Japanese
Purpleimplemented a very complex, varying
substitution cipherused a series of cylinders, each giving
one substitution, which rotated and changed after each letter was encrypted
04/20/23NETWORK SECURITY27
04/20/23NETWORK SECURITY28
04/20/23NETWORK SECURITY29
Steganography is the science of hiding informationOne of the oldest stego schemes was to shave the
head of a messenger and tattoo a message on the messenger's head. After the hair grows back, the messenger can be sent to the intended recipient, where the messenger's head can be shaved and the message recovered. This method is decidingly clever, patient, and very low-tech, and goes right to the heart of steganography's literal meaning of "covered writing."
04/20/23NETWORK SECURITY30
Character marking – visible at an angle to bright lightInvisible ink – visible on heat or chemical is appliedpin punctures – visible in front of lightType writer correction ribbon – visible in strong lightDeliberate misspelling to mark words in the messageUse of small changes in spacing to indicate significant
letters or words in a hidden message Use of a slightly different font in a typeset message to
indicate the hidden letters Not only restricted to written forms of communication
04/20/23NETWORK SECURITY31
Consider this cablegram that might have been sent by a journalist/spy from the U.S. to Europe during World War I:PRESIDENT'S EMBARGO RULING SHOULD HAVE IMMEDIATE NOTICE. GRAVE SITUATION AFFECTING INTERNATIONAL LAW. STATEMENT FORESHADOWS RUIN OF MANY NEUTRALS. YELLOW JOURNALS UNIFYING NATIONAL EXCITEMENT IMMENSELY.
The first letters of each word form the character string: PERSHINGSAILSFROMNYJUNEI.
A little imagination and some spaces yields the real message: PERSHING SAILS FROM NY JUNE I.
04/20/23NETWORK SECURITY32
Template (e.g., a piece of paper with holes cut in it) or a set of preselected locations on the page to hide a message
THE MOST COMMON WORK ANIMAL IS THE HORSE. THEY CAN BE USED TO FERRY EQUIPMENT TO AND FROM WORKERS OR TO PULL A PLOW. BE CAREFUL, THOUGH, BECAUSE SOME HAVE SANK UP TO THEIR KNEES IN MUD OR SAND, SUCH AS AN INCIDENT AT THE BURLINGTON FACTORY LAST YEAR. BUT HORSES REMAIN A SIGNIFICANT FIND. ON A FARM, AN ALTERNATE WORK ANIMAL MIGHT BE A BURRO BUT THEY ARE NOT AS COMFORTABLE AS A TRANSPORT ANIMAL
Applying a template or rule as to which words to read to this message might yield the following:
HORSE FERRY SANK IN BURLINGTON FIND ALTERNATE TRANSPORT
04/20/23NETWORK SECURITY33
04/20/23NETWORK SECURITY34
04/20/23NETWORK SECURITY35