25.06.2015 s kondakci 1 süleyman kondakcı 25.06.2015 s kondakci 2 brief intro main objectives of...

Post on 21-Dec-2015

234 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

18.04.23S Kondakci 1

Süleyman Kondakcı

18.04.23S Kondakci 2

Brief IntroBrief Intro Main objectives of information security Basic functions of cryptology Basic cryptographic systems Symmetric crypography Simple (XOR) encryption Asymmetric crypography and its

application to authentication Confidentiality with asymmetric

crypography Secure message exchange Digital Signature Othe important issues

3

The TrThe Triad iad of of Security Security ObjectObjectivesives

Integrity

Confidentiality

Avalaibility

4

Attacks, MechanismsAttacks, Mechanisms, and, and ServicesServices

Security Attack: Any action that compromises the security of information.

Security Mechanism: A mechanism that is designed to detect, prevent, or recover from a security attack.

Security Service: A service that enhances the security of data processing systems and information transfers. A security service makes use of one or more security mechanisms.

5

Security AttacksSecurity Attacks

Interruption: This is an attack on availability

Interception: This is an attack on confidentiality

Modification: This is an attack on integrity

Fabrication: This is an attack on authenticity

6

Security ServicesSecurity Services

Confidentiality (privacy)

Authentication (who created or sent the data)

Integrity (has not been altered)

Non-repudiation (the order is final)

Access control (prevent misuse of resources)

Availability (permanence, non-erasure)

Denial of Service Attacks

Virus that deletes files

7

18.04.23S Kondakci 8

Main Objectives Main Objectives Exapanded(1)Exapanded(1)

1) Confidentiality (Gizlilik)Protecting data from unauthorized disclosure

2) Authentication (Kimlik Doğrulama)Reliably determining the identity of the communicating parts

3) Integrity (Bütünlük sağlama)Ensure that the contents of the traffic are not altered in transmission.

4) Access Control (Erişim kontrolü)Prvent anauthorized users/devices.

5) Traffic Flow Control Trafik akış denetim ve yönetimi

18.04.23S Kondakci 9

Main Objectives Exapanded Main Objectives Exapanded (2)(2)

6) Availability (Sistem sürekliliği)Güvenlik servislerinde idame

7) Accountability (Gözetleme ve denetleme)Ağ aktivitelerinin taranması ve loglanması

8) Scalability (Ölçeklenebilirlilik)Adding new users/devices should be easy and should not require changes to existing architecture and infrastructure.

10

DefenceDefence Methods Methods

Encryption Authorization: access control file

systems, databases, and operating system controls for protecting users from violating each other’s area)

Authentication Hardware Controls (smartcard) Policies (frequent changes of

passwords) Physical Controls

18.04.23S Kondakci 11

The Basic Cipher Operator: The Basic Cipher Operator: XORXOR

0

1

1

0

Encoded Text Bit

0

0

1

1

Plaintext Bit

0

1

0

1

Key Bit

Aslo known as Vernam CAslo known as Vernam Ciipherpher

18.04.23S Kondakci 12

Plaintext 0 1 1 0 0 1 0 1Key 1 0 1 0 0 1 1 1

Ciphertext 1 1 0 0 0 0 1 0

Ciphertext 1 1 0 0 0 0 1 0Key 1 0 1 0 0 1 1 1

Plaintext 0 1 1 0 0 1 0 1

Encrypting and Decrypting with XOREncrypting and Decrypting with XOR

18.04.23S Kondakci 13

Monoalphabetic Ciphers: Monoalphabetic Ciphers: Cipher ROT13Cipher ROT13

Plaintext Ciphertext

AB...

MN...Z

NO...ZA...

M

$ tr "[a-z][A-Z]" "[n-z][a-m][N-Z][A-M]" < plain_file

18.04.23S Kondakci 14

Polyalphabetic Substitution Ciphers: Polyalphabetic Substitution Ciphers: Vigenere CipherVigenere Cipher

( ) ( ) mod(26)

( ) ( )mod(26)

C E P P k

P D C C k

P = plain text,P = plain text,

C= Cipher text,C= Cipher text,

E(P) = Encryption,E(P) = Encryption,

D(C) = Decryption.D(C) = Decryption.

18.04.23S Kondakci 15

FlexibleFlexible CaeserCaeser CipherCipher iin n CC

/** Denmonstration of a flexible shifter function * S. Kondakci/10/5/1996 */void caeser(short c,int shifts){ ifif (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')) { int Case = (isupper(c) == 0 ? 122 : 90); if ( shifts + c >= Case) printf("%c",(char)(c-25+shifts)); else putchar(c + shifts); } else if (c == '\n') putchar('\n\n'); else putchar(c);}

18.04.23S Kondakci 16

Rail fence technique

.hidmtbetsbue

tgnihymhtustL

Plaintext: Plaintext: “Let us bust them by the midnight”“Let us bust them by the midnight”

Ciphertext:Ciphertext:

18.04.23S Kondakci 17

Rail fence technique with key

Plaintext: Plaintext: “Let us bust them by the midnight”“Let us bust them by the midnight”

Ciphertext: Ciphertext: tedte.uthumnshtbygLtmsbiehitedte.uthumnshtbygLtmsbiehi

Write the plaintext row by row in a rectangle, and cipher the message, column by column.

.

:

253684197:

thgindim

ehtybmeht

tsubsuteLtxetnialP

yeK

18.04.23S Kondakci 18

M

LD D WD

O

LD D WD

P

D WDLD

NULL

NULL

NULL

Pr(P|O)

Pr(M|P)

END

A Set of objectives

Generated policies

Generated measures

Security Planning

18.04.23S Kondakci 19

The Classification RangesThe Classification Ranges

Group 1: unclassified (public); weighed between 0 and 0.5.Group 2: classified; weighed between 0.6 and 2.Group 3: restricted; weighed between 2.1 and 3.5.Group 4: secret weighed between 3.6 and 5.

050.6 2.1 3.5

18.04.23S Kondakci 20

!

!( )!

n n

x x n x

Estimation of the Security class

n = sizeof(LD)+sizeof(D)+sizeof(WD)

( )

0

( ) ( , , ) ( ) (1 )x

i n ic c c

i

nF c F x p n p p

i

Cumulative

( )Pr( , , ) ( ) (1 ) , 0, ,x n xc c c

nx p n p p for x n

x

Max(F(LD),F(D),F(WD))

18.04.23S Kondakci 21

TestTest

Win

UNIX

HUB

Mail, document, www-Server, SW-lib, etc Intranet common use

İnternet (Güvensiz)

Given the network below, We want to make secure messaging and document exchange within this network. Perform the following tasks:

1) Define at least 3 security objectives

2) Design the necessery security services

3) Assess the overal risk qıuantitatively

18.04.23S Kondakci 22

CryptographyCryptography Cryptography is the study of mathematical techniques related to

aspects of information security such as confidentiality, data integrity, entity

authentication, and data origin authentication.

Study of cryptography consists of a number of primitives (basic tasks and algorithms) that can be combined to provide a full range of information

security services.

18.04.23S Kondakci 23

Modern CryptographyModern Cryptography 1977: Data Encryption Standard (DES)

adopted by the U.S. Federal Information Processing for encrypting unclassified information

1976: Diffie and Hellman, introduced the revolutionary concept of public-key cryptography. Security is based on the intractability of the discrete logarithm problem

1978: Rivest, Shamir, and Adleman (RSA), perhaps the most well-known scheme; security is based on the the intractability of factoring large integers.

18.04.23S Kondakci 24

Model of 2-Party Communication Model of 2-Party Communication Using Encryption Using Encryption

18.04.23S Kondakci 25

A Taxonomy of Cryptographic A Taxonomy of Cryptographic PrimitivesPrimitives

CCiipher pher TypesTypes

Stream cipher: Encrypts digital data one bit or one byte at a time.

Block cipher: A block of plaintext is treated as a whole and used to produce a ciphertext block of equal length. Typical block sizes are 64 or 128 bits.

26

18.04.23S Kondakci 27

TerminologyTerminology CryptographyCryptography terminologies :

Encryption/Encipherment Decryption/Decipherment Cryptographic Algorithm/cipher Encryption Key/Decryption KeyBelow a symmetric key scheme using a shared single key for

secure data exchange.

D_keyE_key

Plaintext M

Plaintext M

Plaintext M

Plaintext M

Encryption

Encryption

Decryption

Decryption

C = Ciphertext = E_key(M)C = Ciphertext = E_key(M)

C

M = Plaintext = D_key(C)M = Plaintext = D_key(C)

18.04.23S Kondakci

28

Basic Encryption Basic Encryption TEchniquesTEchniques

Symmetric algorithm Asymmetric algorithm

4/22

Secret key ciphering Public key ciphering

18.04.23S Kondakci 29

Basic Basic AlgoritAlgorithhmmss Symmetric/Shared key systems

Single key (Secret commonly shared). The single key both ciphers and

deciphers.

Asymmetric/Public key systems: Uses 2 keys:

Private key (Private to the generator) Public key (Distributed to others)

One of the keys ciphers the other deciphers

18.04.23S Kondakci 30

Symmetric EncryptionSymmetric Encryption

DES, 3DES (Data Encryption Standard) IDEA (International Data Enc. Algorithm) FEAL LOKI LUCIFER RC2 (Rives’t Code ) RC4 RC5

18.04.23S Kondakci 31

A 2-Party Communication A 2-Party Communication UsingUsing

Symmetric EncryptionSymmetric Encryption

One of the major problems in symmetric-key systems is to find an efficient method to agree upon and exchange keys

18.04.23S Kondakci 32

Symmetric EncryptionSymmetric Encryption

Plaintext M

Plaintext M

Plaintext M

Plaintext M

Same “Secret Key”Same “Secret Key”

Ciphertext C

Ciphertext C Ciphertext

C

Ciphertext C

18.04.23S Kondakci 33

Encryption—DES and 3 DESEncryption—DES and 3 DES

Widely adopted standard

Encrypts plaintext into ciphertextciphertext

DES performs 16 roundsrounds

Triple DES 168-bit 3DES includes three DES keys

Accomplished on VPN client, server, router, or firewall

18.04.23S Kondakci 34

Average time required for Average time required for exhaustiveexhaustive key search key search

Key Size (bits)

Number of Alternative Keys

Time required at 106 Decryption/µs

32 232 = 4.3 x 109 2.15 milliseconds

56 256 = 7.2 x 1016 10 hours

128 2128 = 3.4 x 1038 5.4 x 1018 years

168 2168 = 3.7 x 1050 5.9 x 1030 years

18.04.23S Kondakci 35

Costs/Times to Break DES Costs/Times to Break DES KeysKeys

BudgetBudget 40-Bit40-Bit 56-Bit56-Bit 168-Bit168-Bit3 DES3 DES

Type of Type of AttackerAttacker

IndividualIndividualHackerHacker

DedicatedDedicatedHackerHacker

Intelligence Intelligence CommunityCommunity

$400$400 38 Years38 Years Too LongToo Long

556 Days556 Days 101019 19 YearsYears

2121MinutesMinutes

101017 17 YearsYears$10M$10M 0.020.02SecondsSeconds

$10K$10K 1212MinutesMinutes

5 Hours5 Hours

18.04.23S Kondakci 36

Asymmetric AlgorithmsAsymmetric Algorithms

A pair of mathematically related keys:

A private key and a public key

Çok kullanılan açık anahtar kripto sistem:

Stanford Üniversitesi’nden Whitfield Diffie ve Martin Hellman 1976 da açık anahtar sistemi buldular.

Rivest Shamir Adleman (RSA)

18.04.23S Kondakci 37

Authentication with Authentication with Asymmetric AlgorithmsAsymmetric Algorithms

Private KeyPrivate Key

D_keyE_key

Plaintext = M

(kullanıcı Kimliği)

Plaintext = M

(kullanıcı Kimliği)

Plaintext MPlaintext MEncryption

Encryption

Decryption

Decryption

C

Public KeyPublic Key

18.04.23S Kondakci 38

Confidentiality with Confidentiality with Asymmetric AlgorithmsAsymmetric Algorithms

Public KeyPublic Key

D_keyE_key

Plaintext = M

(Message)

Plaintext = M

(Message)

Plaintext MPlaintext M

Encryption

Encryption

Decryption

Decryption

C

Private KeyPrivate Key

18.04.23S Kondakci 39

Feistel Cipher StructureFeistel Cipher Structure

Virtually all conventional block encryption algorithms, including DES have a structure first described by Horst Feistel of IBM in 1973

The realization of a Fesitel Network depends on the choice of the following parameters and design features (see next slide):

18.04.23S Kondakci 40

A simple Feistel System A simple Feistel System

18.04.23S Kondakci 41

© S. Kondakcı

18.04.23S Kondakci 42

Feistel Cipher StructureFeistel Cipher Structure Block size: larger block sizes mean greater

security Key Size: larger key size means greater

security Number of rounds: multiple rounds offer

increasing security Subkey generation algorithm: greater

complexity will lead to greater difficulty of cryptanalysis.

Fast software encryption/decryption: the speed of execution of the algorithm becomes a concern

18.04.23S Kondakci 43

Feistel Cipher DecryptionFeistel Cipher Decryption

18.04.23S Kondakci 44

Decryption AnalysisDecryption AnalysisOutput of the first round of decryption is equal to 32-bit swap of

the input to the 16th round of the encryption process.

16

16 15

16 15 15 16

1 0 15

1 0 0 16

16 15 16

15 15 16 15 16

( , )

( , )

( , )

[ ( , )] ( , )

:

[ ] [ ]

0

0

LE RE

RE LE F RE K

LD RD LE RE

RD LD F RD K

RE F RE K

LE F RE K F RE K

The XOR has the following properteies

A B C A B C

D D

E E

18.04.23S Kondakci 45

Decryption Analysis Cont’dDecryption Analysis Cont’d

1 15 1 15

15 15

th

-1

-1 1 1

Therefore the output of the first round of the decryption is

||

In general terms, for the i iteration of the encrption process

( , )

Rearranging ter

i i

i i i i

LD RE and RD LE

LE RE

LE RE

RE LE F RE K

-1

1 1

0 0

ms

( , ) ( , )

Finally, last round of the encryption process

||

i i

i i i i i i i

RE LE

LE RE F RE K RE F LE K

RE LE

18.04.23S Kondakci 46

Public KeyPublic KeyDiffie-Hellman and RSADiffie-Hellman and RSA

Outlined by Diffie and Hellman in 1976 Refined by Rivest, Shamir and Adlemen RSA is based on a pair of keys—public and private

Sender looks up the public keypublic key of the recipient and uses it to encipherencipher the message

Recipient deciphersdeciphers the message with private keyprivate key Eliminates need to exchange private keys

before communicating Based on algorithms performed on numbers up

to 256 bytes long No one has yet cracked it3

PGP is a public domain implementation of RSA Authentication achieved via digital signatures

18.04.23S Kondakci 47

Diffiie-Hellman Açık Anahtar Diffiie-Hellman Açık Anahtar DağıtımıDağıtımı

Plaintext M

Plaintext M

Plaintext M

Plaintext MCiphertext

C

Ciphertext C

AliceAlice and and BobBob’s ’s Shared Secret KeyShared Secret Key

Key calculation Key calculation engineengine

Publ

ic K

ey

Publ

ic K

ey

Publ

ic K

ey

Publ

ic K

ey

Priv

ate

Key

Priv

ate

Key

Priv

ate

Key

Priv

ate

Key

From Bob To Alice

18.04.23S Kondakci

48

RSA RSA Public Key Public Key DistributionDistribution

RSA Usage are: Encryption, Digital Signature:

1) Generate Message DigestMessage Digest using a common hush function

2) Signature = Encrypt the Message Digest with the senders private key

3) Send the message and the SignatureSignature to the requestor

Data integrity

Data integrity

Data authenticatio

n

Data authenticatio

n

Non-repudiatio

n

Non-repudiatio

n

Security Objective

18.04.23S Kondakci 49

RSA Açık Anahtar İle RSA Açık Anahtar İle ŞifrelemeŞifreleme

EncryptedData

EncryptedData

DataData

To Bob

Alice’s RSA Prv. Key

DataData

Encrp.Data

Encrp.Data

Alice’s RSA Pub. Key

RSA calculationRSA calculation

RSA calculationRSA calculation

One-way Trust Model Information encrypted with the RSA private key can only be decrypted with the matching RSA public key

18.04.23S Kondakci 50

Example: A trusted Example: A trusted messagingmessaging

Both the message and a session key (S-key) are encrypted and sent to Bob. Bob uses his own public key to decrypt the session key, then uses the decrypted session key to decrypt the message

Ciphertext

S-key Bob’s public key Cipher-key

To Bob

S-key

Plaintext

Ciphertext

Shared session key

18.04.23S Kondakci 51

Bob Deciphers the Session Bob Deciphers the Session KeyKey

Ciphertext

Bob’s private key

S-key S-key

Bob deciphers

the e

ncrypted

sessi

on

key usin

g his own priv

ate key

and

asymmetr

ic alg

orithm. N

ow he has

the sess

ion key an

d ciphere

d mess

age

18.04.23S Kondakci 52

Bob Deciphers the Bob Deciphers the MessageMessage

Ciphertext

S-key

Plaintext

Plaintext

18.04.23S Kondakci 53

Fingerprint: One-way Fingerprint: One-way Hash FunctionsHash Functions

Also called hash function, cryptographic checksum, message integrity check, message digest function

PlaintextPlaintext Finger printFinger print

Fingerprint (also called hash value) is

• always unique for a given message

•one-way; can’t generate plaintext from the hash value

18.04.23S Kondakci 54

One-way HashOne-way Hash

UnknownPlaintextUnknownPlaintextFinger printFinger print

one-way; can’t generate plaintext from the hash value

18.04.23S Kondakci 55

Message Digest Message Digest AlgorithmsAlgorithms

(Mesaj Özetleme)(Mesaj Özetleme)

MD4:128-bit hash value, 32-bit register faster than MD2, better security

MD5: Replacement for MD4, solves some weaknesses of MD4

SHA: Secure Hash Algorithm, 160-bit.

HAVAL, SNEFRU, etc ...

18.04.23S Kondakci 56

Digital SignaturesDigital Signatures(Sayısal İmzalar)(Sayısal İmzalar)

Digital signatures ensure: message integrity integrity (not modified in (not modified in

transit)transit) identityidentity of the sender (Sender’s private

key) non-repudiationnon-repudiation 0000123

SHA, DH, 3837829 …

1/1/93 to 12/31/98

Alice Smith, Acme Corp

DH, 3813710 ...

Acme Corporation, Security Dept.

SHA, DH, 2393702347 ...

Message

Digital certificate

18.04.23S Kondakci 57

Digital SignaturesDigital Signatures

To verify the signature of the message both the sender and receiver create digest messages.

Sender’s public key

Receiver GeneretedDigest

Sender GeneretedDigest

Digest

Digest

Digest

Comparator

TRUE

FALSE

At the Receiver’s Side

Digest DigestTo the Receiver

At the Sender’s Side Sender’s private key

18.04.23S Kondakci 58

Electronic Certificate Electronic Certificate SystemSystem

18.04.23S Kondakci 59

Cryptographic StrengthCryptographic Strength

Key SecrecyKey Secrecy: The secrecy of the key.Exhaustive Search:Exhaustive Search: The difficulty of guessing the key or trying

out all possible keys. Keys with longer size (over 40 bits) are harder to guess.

Breaking:Breaking: The difficulty of inverting the encryption algorithm without knowing the encryption key, also known as breaking the encryption algorithm.

Trapdoors:Trapdoors: The existence (or lack) of back doors, or additional ways by which an encrypted file can be decrypted more easily without knowing the key.

Knowntext Attack:Knowntext Attack: The ability to decrypt an entire ciphertext if you know the way that a portion of it decrypts.

Chosentext AttackChosentext Attack The properties of the plaintext and the knowledge of those properties by an attacker.

18.04.23S Kondakci 60

That’s all Folks! That’s all Folks!

Süleyman Kondakcı:suleyman.kondakci@ieu.edu.tr

top related