35
Information Systems Security Introduction to Cryptography

Information Systems Security Introduction to Cryptography

Embed Size (px)

Citation preview

Page 1: Information Systems Security Introduction to Cryptography

Information Systems Security

Introduction to Cryptography

Page 2: Information Systems Security Introduction to Cryptography

What is Cryptography

It is an applied branch of mathematics It is used to provide

Confidentiality Integrity Authentication Authorization Non-repudiation

Page 3: Information Systems Security Introduction to Cryptography

Why Cryptography

Encrypting data against disclosure, modification

Signing data against modification, repudiation To provide security for eCommerce

Page 4: Information Systems Security Introduction to Cryptography

Application area Storing data encrypted

Even access would not lead to disclosure Transmitting data securely

Prevent eavesdropping Identifying your partner

Prevent man in the middle attack Proof of identity

Avoiding impersonation

Page 5: Information Systems Security Introduction to Cryptography

Terms used Encryption

The process of encoding a message so that the meaning is not obvious

Decryption The reverse process of encryption

Plaintext The original form of the message

Cipher text The disguised (encrypted) text

Page 6: Information Systems Security Introduction to Cryptography

Terms used

P – plaintext C – cipher text E – encryption algorithm D – decryption algorithm

C = E(P)P = D(C)P = D(E(P))

Page 7: Information Systems Security Introduction to Cryptography

Terms used

The encryption process involves An algorithm – mostly public A key – must be private

C = EK(P)

P = DK(C)

P = DK(EK(P))

Page 8: Information Systems Security Introduction to Cryptography

Software components Hash functions: handling the whole document

takes too long Encryption/decryption: same algorithm for

symmetric but different for asymmetric and signature

Signature: combine a document with a private key

Key agreement: creating a shared secret Key generation: creating secure keys

Page 9: Information Systems Security Introduction to Cryptography

Classification of Cryptographic Systems The way the plaintext is processed

Block cipher Stream cipher

Type of operations performed Substitution Transposition

Number of keys used Symmetric Asymmetric

Page 10: Information Systems Security Introduction to Cryptography

Block encryption

Data divided into fixed size blocks and symmetric encryption worked on them one at a time (e.g. 64 bits in 64 bits out)

Main method is substitution and permutation by using S-boxes

Early block cipher: Playfair Present block cipher: DES, AES

Page 11: Information Systems Security Introduction to Cryptography

Stream encryption

Symmetric encryption done on the bit stream (1 bit in, 1 bit out)

The usual method is to use symmetric encryption in chain mode (cipher block chaining) where the previous cipher block is XOR to next plaintext block

Early stream cipher: Vigerene Present stream cipher: RC4

Page 12: Information Systems Security Introduction to Cryptography

Classical techniques - Substitution

Substitute a character, digit or symbol for each character in plaintext

Examples Mono alphabetic cipher

Caesar cipher Atbash cipher

Poly alphabetic cipher Playfair cipher

Page 13: Information Systems Security Introduction to Cryptography

The Caesar cipher - Cryptanalysis

Try all 25 possible keys Use the nature of the plain text

Single character occurrences Digrams Trigrams

Page 14: Information Systems Security Introduction to Cryptography

The Caesar cipher – CryptanalysisFrequency Table of single letters

Page 15: Information Systems Security Introduction to Cryptography

The Caesar cipher – CryptanalysisDigrams and Trigrams

Digrams an, re, er, nt, th, on, in, am, is, to, be, he,

we, no, ofTrigrams

ent, ion, and, the, are, you, she, not

Page 16: Information Systems Security Introduction to Cryptography

Playfair cipher Use a 5 x 5 matrix Use a keyword Use 2 characters at a time

Page 17: Information Systems Security Introduction to Cryptography

Playfair cipher - rules

Repeating plaintext letters are separated with a filling letter e.g. X

Plaintext letters on the same row is replaced by letters right to it

Plaintext letters on the same column is replaced by letters beneath it

Else, replace plaintext by the corner letters of the rectangle formed by the 2 letters

Page 18: Information Systems Security Introduction to Cryptography

Playfair example

Key: PLAYFAIR EXAMPLE

P L A Y F

1 R E X M

B C D G H

J K N O S

T U V W Z

Page 19: Information Systems Security Introduction to Cryptography

Playfair example

Plain text

Hide the gold in the tree stump Change into capital letters

HI DE TH EG OL DI NT HE TR EE ST UM P Check for repeating letters

HI DE TH EG OL DI NT HE TR EX ES TU MP Encrypt

Page 20: Information Systems Security Introduction to Cryptography

Playfair example

What is the cipher text? BM ND ZB XD KY BE JV DM UI XM MN UV

IF

Page 21: Information Systems Security Introduction to Cryptography

Transposition

Change the location of a character Examples

Rail fence cipher Columnar transposition Enigma machine

Page 22: Information Systems Security Introduction to Cryptography

Rail fence cipher Plain text

we are discovered flee at onceRail fence cipher of 3 rails

W..R..I..O..R..F..E..O..E .E..E..S..V..E..L..A..N.. ..A..D..C..E..D..E..T..C.

Cipher text WRIORFEOEEESVELANADCEDETC

Page 23: Information Systems Security Introduction to Cryptography

Symmetric encryption

Based on a shared secret by the participants and an algorithm

The secret is used for both encryption and decryption key

To protect the confidentiality of the data Are usually efficient and fast Main weakness is the need for the shared

secret

Page 24: Information Systems Security Introduction to Cryptography

Symmetric encryption

Page 25: Information Systems Security Introduction to Cryptography

Asymmetric encryption

Designed to overcome issues relating to key distribution

Also offers authenticity 2 keys

Public key – known by everyone Private key – known only by owner

Keys operate as inverse, one key can decrypt message encrypted by the other

Page 26: Information Systems Security Introduction to Cryptography

Asymmetric encryption

Page 27: Information Systems Security Introduction to Cryptography

Symmetric vs Asymmetric

Symmetric Asymmetric

Number of keys 1 2

Protection Must be secret Public & Private

Key distribution Out of band Used to exchange other keys

Speed Fast 10,000 times slower

Usage Security & integrity of data

Key exchange, authentication

Page 28: Information Systems Security Introduction to Cryptography

Hash A hash is a cryptographic one way function

that produces a record smaller than the plaintext

The plaintext cannot be recovered from the hash and for a good hash function it is impossible for 2 plaintexts to produce the same hash (collision)

Page 29: Information Systems Security Introduction to Cryptography

Hash

A hash encrypted by the document signer’s private key can be used as a signature for a document

Used to produce Message Authentication Codes (MAC) to verify the integrity of a message

Page 30: Information Systems Security Introduction to Cryptography

Digital signature

Page 31: Information Systems Security Introduction to Cryptography

Algorithms

Symmetric DES, 3DES, AES

Asymmetric RSA, DSA (only for signature)

Hash Sha-1, MD5

Others Diffie-Hellman for key agreement

Page 32: Information Systems Security Introduction to Cryptography

PGP (Pretty Good Privacy)

Designed by Phil Zimmermann for providing cryptographic protection of e-mail and file storage

Uses the strong cryptographic algorithm Offers

Authentication using digital signatures Confidentiality with use of encryption

Bytes conversion to ASCII for e-mail

Page 33: Information Systems Security Introduction to Cryptography

PGP design philosophy

Written for individual technically skilled end users Every user creates and manages their own keys Every user has a freedom to choose whom to

trust No administrative organisation or government

involved in operation

Page 34: Information Systems Security Introduction to Cryptography

Sending a PGP message

Page 35: Information Systems Security Introduction to Cryptography

Receiving a PGP message