Top Banner
Computer and Internet Security
41

Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Jan 13, 2016

Download

Documents

Augusta Rose
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Computer and Internet Security

Page 2: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Introduction

• Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data, corrupt files and crash systems.

• For these reasons, security is crucial to the success of e-business and Web services.

Page 3: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Introduction

• Five fundamental requirements for a successful, secure transaction: – Privacy

• How do you ensure that the information you transmit over the Internet has not been captured or passed to a third party without your knowledge?

– Integrity• How do you ensure that the information you send or receive

has not been compromised or altered? – Authentication

• How do the sender and receiver of a message verify their identities to each other?

Page 4: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Introduction

– Authorization• How do you manage access to protected resources on

the basis of user credentials?

– Non-repudiation. • How do you legally prove that a message was sent or

received?

Page 5: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Ancient Ciphers to Modern Cryptosystems

• Cryptography – Transforms data using a cipher

• Cryptosystem– A mathematical algorithm for encrypting messages

• A key– A string of digits that acts as a password– Input to the cipher

• Unencrypted data is called plaintext; encrypted data is called ciphertext.

Page 6: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Ancient Ciphers• The two main types of ciphers were

– substitution ciphers (Caesar Cipher)• “abc” “def”

– transposition ciphers• “security” “scrt euiy”

• Complicated ciphers combination of substitution ciphers transposition ciphers.– E.g., using the substitution cipher in transposition cipher, the

word "security" would encrypt to "tdsu fvjz”.

• Problem of many historical ciphers – their security relied on the sender and receiver to remember

the encryption algorithm and keep it secret.

Page 7: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Modern Cryptosystems

• Modern cryptosystems are digital. • Their algorithms are based on the individual

bits or blocks (a group of bits) of a message, rather than letters of alphabet.

• Encryption and decryption keys are binary strings with a given key length.– For example, 128-bit encryption systems have a

key length of 128 bits.

Page 8: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 8

The language of cryptography

symmetric key crypto: sender, receiver keys identicalpublic-key crypto: encryption key public, decryption key secret

(private)

plaintext plaintextciphertext

KA

encryptionalgorithm

decryption algorithm

Alice’s encryptionkey

Bob’s decryptionkey

KB

Page 9: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secret-Key Cryptography

• In the past, organizations wishing to maintain a secure computing symmetric cryptography, also known as secret-key cryptography.– Uses the same secret key to encrypt and decrypt a

message

Page 10: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

secret-key cryptography

Page 11: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secret-Key Cryptography

• Have to find a secure way to exchange the secret key before communications– What is the best method? (use FedEx? What are

the problems for it?)• Not efficient• Not secure• Authentication problem• Etc.

Page 12: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secret-Key Cryptography– Another way

• Have a central authority - an key distribution center (KDC)

Page 13: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secret-Key Cryptography - Data Encryption Standard (DES)

• One of the most commonly used symmetric encryption algorithms

• Using block cipher– DES has a key length of 56 bits and encrypts data

in 64-bit blocks.

Page 14: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Public-Key Cryptography

• Developed by Whitfield Diffie and Martin Hellman in 1976 at Stanford University.

• Two keys – a public key • Freely distributed to outside world

– a private key• Kept secret by its owner

Page 15: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Public-Key Cryptography

Page 16: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 16

Public key cryptography

plaintextmessage, m

ciphertextencryptionalgorithm

decryption algorithm

Bob’s public key

plaintextmessageK (m)

B+

K B+

Bob’s privatekey

K B-

m = K (K (m))B+

B-

Page 17: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

RSA Algorithm

• RSA – the most commonly used public-key algorithm

• Developed by MIT professors Ron Rivest, Adi Shamir, and Leonard Adleman in 1977

• Play an important and crucial role in e-Commerce transactions

Page 18: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 18

Public key encryption algorithms

need K ( ) and K ( ) such thatB B. .

given public key K , it should be impossible to compute private key K B

B

Requirements:

1

2

RSA: Rivest, Shamir, Adelson algorithm

+ -

K (K (m)) = m BB

- +

+

-

Page 19: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 19

RSA: Choosing keys1. Choose two large prime numbers p, q. (e.g., 1024 bits each)

2. Compute n = pq, z = (p-1)(q-1)

3. Choose e (with e<n) that has no common factors with z. (e, z are “relatively prime”).

4. Choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ).

5. Public key is (n,e). Private key is (n,d).

K B+ K B

-

Page 20: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 20

RSA: Encryption, decryption0. Given (n,e) and (n,d) as computed above

1. To encrypt bit pattern, m, compute

c = m mod n

e (i.e., remainder when m is divided by n)e

2. To decrypt received bit pattern, c, compute

m = c mod n

d (i.e., remainder when c is divided by n)d

m = (m mod n)

e mod n

dMagichappens!

c

Page 21: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 21

RSA: another important property

The following property will be very useful later:

K (K (m)) = m BB

- +K (K (m))

BB+ -

=

use public key first, followed

by private key

use private key first,

followed by public key

Result is the same!

Page 22: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Authentication using public-key algorithm

Page 23: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security 23

Authentication: yet another tryGoal: avoid playback attack

Failures, drawbacks?

Nonce: number (R) used only once –in-a-lifetime

ap4.0: to prove Alice “live”, Bob sends Alice nonce, R. Alice

must return R, encrypted with shared secret key“I am Alice”

R

K (R)A-B

Alice is live, and only Alice knows key to encrypt

nonce, so it must be Alice!

Page 24: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Key Agreement Protocols

• A drawback of public-key algorithm – not efficient for sending large amounts of data.

• Public key algorithms are not used to replace secret-key algorithm

• Use Public key algorithms to exchange secret keys securely.

• Key Agreement Protocol– The process by which two parties can exchange

keys over unsecure medium

Page 25: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Digital Envelope• The most common key agreement protocol

Page 26: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Key Management

• Maintaining the secrecy of private keys is crucial for keeping cryptographic systems secure.

• Most compromises in security result from poor key management

• Key generation– The process by which keys are created

Page 27: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Key Management

• Brute-force cracking– Try to decrypt a message by using every possible

decryption key

• If the subset is too small for key generation, then the encrypted data is more susceptible to brute-force attacks

Have a key-generation program that can generate a large number of keys as randomly as possible

Have a key-generation program that can generate a large number of keys as randomly as possible

Page 28: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Digital Signatures

• The electronic equivalents of written signatures• Developed to be used in public-key cryptography

to solve the problems of authentication and integrity

• To create a digital signature, a sender first takes the original plaintext message and runs it through a hash function, which is a mathematical calculation that gives the message a hash value

Page 29: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Digital Signatures

• A hash value identifies a message uniquely.– The hash value is also known as a message digest

• Message integrity– If the hash value of the original message matches

the message digest included in the signature– The message has not been altered in transmission.

Page 30: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

30

Digital Signatures

Cryptographic technique analogous to hand-written signatures.

• sender (Bob) digitally signs document, establishing he is document owner/creator.

• verifiable, nonforgetable: recipient (Alice) can prove to someone that Bob, and no one else (including Alice), must have signed document

Page 31: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

31

Digital Signatures

Simple digital signature for message m:• Bob signs m by encrypting with his private key KB,

creating “signed” message, KB(m) --

Dear Alice

Oh, how I have missed you. I think of you all the time! …(blah blah blah)

Bob

Bob’s message, m

Public keyencryptionalgorithm

Bob’s privatekey

K B-

Bob’s message, m, signed

(encrypted) with his private key

K B-(m)

Page 32: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

32

Digital Signatures (more)

• Suppose Alice receives msg m, digital signature KB(m)

• Alice verifies m signed by Bob by applying Bob’s public key KB to KB(m) then checks KB(KB(m) ) = m.

• If KB(KB(m) ) = m, whoever signed m must have used Bob’s private key.

+ +

-

-

- -

+

Alice thus verifies that: Bob signed m. No one else signed m. Bob signed m and not m’.

Non-repudiation: Alice can take m, and signature KB(m) to court and prove that

Bob signed m. -

Page 33: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

33

Message Digests

Computationally expensive to public-key-encrypt long messages

Goal: fixed-length, easy- to-compute digital “fingerprint”

• apply hash function H to m, get fixed size message digest, H(m).

Hash function properties:• many-to-1• produces fixed-size msg

digest (fingerprint)• given message digest x,

computationally infeasible to find m such that x = H(m)

large message

m

H: HashFunction

H(m)

Page 34: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

34

large message

mH: Hashfunction H(m)

digitalsignature(encrypt)

Bob’s private

key K B-

+

Bob sends digitally signed message:

Alice verifies signature and integrity of digitally signed message:

KB(H(m))-

encrypted msg digest

KB(H(m))-

encrypted msg digest

large message

m

H: Hashfunction

H(m)

digitalsignature(decrypt)

H(m)

Bob’s public

key K B+

equal ?

Digital signature = signed message digest

Page 35: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

35

Certification Authorities

• Certification authority (CA): binds public key to particular entity, E.

• E (person, router) registers its public key with CA.– E provides “proof of identity” to CA. – CA creates certificate binding E to its public key.– certificate containing E’s public key digitally signed by CA – CA says

“this is E’s public key”

Bob’s public

key K B+

Bob’s identifying informatio

n

digitalsignature(encrypt)

CA private

key K CA-

K B+

certificate for Bob’s public

key, signed by CA

Page 36: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

36

Certification Authorities• When Alice wants Bob’s public key:

– gets Bob’s certificate (Bob or elsewhere).– apply CA’s public key to Bob’s certificate, get

Bob’s public key

Bob’s public

key K B+

digitalsignature(decrypt)

CA public

key K CA+

K B+

Page 37: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secure Sockets Layer (SSL)

• Currently, most e-businesses use SSL for secure online transactions

• The Secure Sockets Layer (SSL) protocol is a non-proprietary protocol commonly used to secure communication betweens two computers on the Internet and the Web.

• Use TCP/IP in the sockets

Page 38: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secure Sockets Layer (SSL)

• In a transaction using SSL, the sockets are secured using public-key cryptography.

• SSL implements public-key cryptography using the RSA algorithm and digital certificates to authenticate the server in a transaction and to protect private information as it passes over the Internet.

Page 39: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Secure Sockets Layer (SSL)

Client Server

SocketSocket

1. Encrypt packets with server’s public key

2. Send packets to the server

1. Receive packets from the client

2. Decrypt packets with server’s private key

Page 40: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Security Attacks

• Denial-of-Service (DoS) Attacks• Viruses and Worms• Eavesdrop: intercept messages• Actively insert messages into connection• Impersonation: can fake (spoof) source address in

packet (or any field in packet)• Hijacking: “take over” ongoing connection by

removing sender or receiver, inserting himself in place

Page 41: Computer and Internet Security. Introduction Both individuals and companies are vulnerable to data theft and hacker attacks that can compromise data,

Network Security

• Firewalls• Intrusion Detection Systems• Steganography– Hiding information within other information