Secure Communications over the Internet Part 2 Hassen Sallay, Ph.D - - PowerPoint PPT Presentation

secure communications
SMART_READER_LITE
LIVE PREVIEW

Secure Communications over the Internet Part 2 Hassen Sallay, Ph.D - - PowerPoint PPT Presentation

Secure Communications over the Internet Part 2 Hassen Sallay, Ph.D WHY USE THE INTERNET for Secure Communications? The Internet offers: Virtually universal worldwide coverage. Access to anywhere from anywhere, stationary or mobile.


slide-1
SLIDE 1

Secure Communications

  • ver the Internet

Part 2 Hassen Sallay, Ph.D

slide-2
SLIDE 2

WHY USE THE INTERNET for Secure Communications?

The Internet offers: ■ Virtually universal worldwide coverage. ■ Access to anywhere from anywhere, stationary or mobile. ■ Ease of use, ease of training. ■ Cheap access!

2

slide-3
SLIDE 3

In order to use the Internet for secure communications, we must ensure the:

3

CONFIDENTIALITY - of the data: All communications must be private - no unauthorized persons or equipment should be allowed to view any information passed over the Internet. INTEGRITY - of the data: All information must be validated - it must be what it claims to be, what was originally sent. AUTHENTICATION - of the message source: Message recipients must know the true source of that message. AUTHENTICATION - of the network users: All persons and machines with which users or machines interact must be identified - they must be who or what they claim to be.

slide-4
SLIDE 4

SECURE COMMUNICATIONS Over the Internet

4

■ To ensure the CONFIDENTIALIY of data, we use: ■ CRYPTOGRAPHY ■ To ensure the INTEGRITY of data, we use: ■ MESSAGE DIGESTS ■ To AUTHENTICATE the source of data, we use: ■ DIGITAL SIGNATURES ■ To AUTHENTICATE the identity of network users, we use: ■ DIGITAL CERTIFICATES

slide-5
SLIDE 5

We Use All This to Implement E-Commerce, VPNs, and Secure Personal Communications

5

E-Com- merce Virtual Private Secure Email Today, all browsers (Netscape, IE) come equipped with SSL (Secure Sockets Layer), which establishes encrypted channels for passing private information, such as credit card numbers, to E-commerce Web sites, such as Amazon.com. A Virtual Private Networks is a network in which computers at remote locations connect via the Internet – not via private leased lines (the way Wide Area Networks Network – WANs - have been implemented since 1960). VPNs encrypt their traffic to ensure that their communications remain secret. The encryption schemes covered in this talk allow Internet users to send encrypted email to each other. PGP (Pretty Good Privacy) is an example.

slide-6
SLIDE 6

A Little History

In the 5th Century BC, the Greeks used a military cryptographic device called a "scytale." The scytale consisted of a wooden staff around which was wound a strip of leather or parchment. The message was written on the strip in columns. The strip was then removed from the staff and the two carried to the message recipient. This technique used character TRANSPOSITION.

6

slide-7
SLIDE 7

A Little History

■ In the 1st Century BC, Julius Caesar used an encryption method, later called the "Caesar Cipher," in which every letter was replaced by the letter that followed 3 places later in the alphabet. This technique uses character SUBSTITUTION, rather than TRANSPOSITION. ■ In the 15th century, Italian Leon Battista Alberti, invented the cipher disk, which allowed the Caesar Cipher to have a KEY. They were used during the US Civil War and (to a lesser extent) WWI and WWII. The black disk rotates within the white disk.

7

slide-8
SLIDE 8

ALittle History

Here is an example, using the NSA disk in the position shown: Original message: MEETMEATTHEZOO Encrypted message OWWHOWAHHWBMM

The black disk rotates within the white disk.

8

slide-9
SLIDE 9

Symmetric (1-Key) Cryptography How It Works

Modern 1-key cryptographic schemes rely on 3 main concepts: TRANSPOSITION (shuffling) of characters, SUBSTITUTION (replacement) of characters with other characters, and a KEY that is used to select

  • ne
  • f many

transposition/ substitution

  • variations. Applying the same algorithm and key to the encrypted

result yields the original plaintext message.

9

slide-10
SLIDE 10

Symmetric (1-Key) Cryptography How It Works

Good schemes use a 128-bit key, giving: 340,000,000,000,000,000,000,000,000,000,000,000,000 = 3 x 1038 possible keys If you had 1 billion computers trying 1 billion keys per second, it would take 1013 years to try them all. That’s at least 1,000 times longer than the age of the universe (which is 1010 years) The most popular encryption scheme today is DES…

10

slide-11
SLIDE 11

DES – Data Encryption Standard

■ Private key ■ Encrypts using a series of substitutions and transpositions, with a 56-bit key ■ Worldwide standard for more than 20 years ■ Has a history of controversy ■ Designed by IBM (Lucipher) with later help (interference?) from NSA ■ No longer considered secure for highly sensitive applications ■ Federal government has proposed AES (Algorithmic Encryption Standard) as a replacement

11

slide-12
SLIDE 12

DES - Overview

slide-13
SLIDE 13

DES – Each iteration.

13

slide-14
SLIDE 14

Other Popular Symmetric Encryption Schemes

14

■ 3DES ■ IDEA ■ Twofish ■ Blowfish ■ RC4, RC5, RC6 ■ IPSec ■ AES

slide-15
SLIDE 15

Symmetric (1-key) Encryption THE ONE-TIME PAD The one perfect encryption scheme!

15

In the so-called "one-time pad" (1-key) encryption scheme, the secret key is a string of random bits. that is the same size as is the message. To encrypt the plaintext message, we merely XOR it with the key. To decrypt the ciphertext, we merely XOR it again with the key.

XOR in1 in2

  • ut

1 1 1 1 1 1

slide-16
SLIDE 16

Symmetric (1-key) Encryption THE ONE-TIME PAD

As an example, say we want to identify a spy - Joe. Using 8- bit ASCII text, the message-length is 24 bits, so we use a random 24-bit key:

16

slide-17
SLIDE 17

THE ONE-TIME PAD

Note that there is NO WAY anyone can decrypt the ciphertext without the

  • key. If a "bad guy" tries an exhaustive search for the key, trying all 2^24

(15,777,216) possibilities, he will get every possible 3-letter name there is, from AAA to ZZZ (Abe, Ann, Bob, Cal, Don, Ken, Kim, Ron, Sid, Tim, Tom, etc.). If a bad guy knows that "Joe" is a possible name, and is the

  • nly 3-letter possible name, then he has us at the start by just checking the

length of the message. So, of course, we would make the message the same length as that of the longest possible name by padding it with, say, space characters.

17

slide-18
SLIDE 18

Public-Key (2-key) Cryptography How It Works

  • 1. BOB's computer generates a

public-key pair. When one key (it doesn't matter which

  • ne) is used to encrypt a

message, ONLY the other key can decrypt the message.

  • 2. BOB gives a copy of one of

his keys - called the public key - to ALICE. BOB keeps private key – a SECRET!!

  • 3. ALICE encrypts her plaintext

with BOB's public key. € A LOCK!

  • 4. ALICE sends (e.g. emails)

18

her ciphertext to BOB.

  • 5. BOB decrypts the ciphertext

using BOB’s private key. € A KEY!

slide-19
SLIDE 19

Public-Key (2-key) Cryptography Popular Public-Key Encryption Algorithms

  • RSA (Rivest-Shamir-

Adleman) is the most popular public-key encryption algorithm.

  • D-H (Diffie-Hellman) alllows

two communicators to agree upon a session key.

  • DSA (Digital Signature

Algorithm) is the U.S. government standard public key algorithm.

19

slide-20
SLIDE 20

The problem with 2-key cryptography is the necessary mathematical relationship between the public key and private key. This relationship prevents us from using just any old random key, which we can do with symmetric (private) cryptography. Therefore, to get the level of security provided by a 128- bit 1-key (secret) key size, we must use a 1024-bit key (about 10 times longer) when using 2-key (public)

  • cryptography. So, even though there are 21024 possible keys,

the cryptanalyst need try only about 2128 of them.

20

Public-Key (2-key) Cryptography The PROBLEM

slide-21
SLIDE 21

OK, there are 21024 possible keys, but the cryptanalyst need try

  • nly about 2128 of them. So, then, as with 1-key cryptography, he

is still left with: 340,000,000,000,000,000,000,000,000,000,000,000,000 possible keys However, use of such a large key (1024 bits), slows the requisite number-crunching and makes 2-key cryptography SLOW, SLOW, SLOW. Therefore public key cryptography is generally used only to send the secret (session) key in 1-key (private) key cryptography.

21

Public-Key (2-key) Cryptography The PROBLEM

slide-22
SLIDE 22

Pretty Good Privacy – PGP gives you secure pseudo- anonymous message service via your usual email service Alice creates a public key pair and gives Bob her public key. 1. Bob creates a random session key and 1-key-encrypts his email with it. 2. Bob 2-key-encrypts the session key with Alice’s public key. 3. Bob sends to Alice both the encrypted email and the encrypted session key. 4. Alice receives Bob’s email and reverses the process, retrieving the original text.

slide-23
SLIDE 23

Real-World Use of 1-Key/2-Key Cryptography

23

Again, 2-key cryptography is used primarily to distribute secret (session) keys that are then used with standard, old fashioned symmetric cryptography – it could be a military venue. This is the way E-commerce and VPNs work – but they also deal with the issue of authentication, which we have ignored here.

slide-24
SLIDE 24

Real-World Use of 1-Key/2-Key Cryptography A Military Application

Assume Admiral Nimitz in Hawaii wants to send the USS Halibut (SSN-587) a message: 1. Nimitz radios the Halibut, "Send me a public key." 2. The Halibut generates and radios Nimitz a 1024-bit public key. 3. Nimitz radios the Halibut a 56-bit DES key, which he has encrypted with the Halibut's public key. 4. The Halibut decrypts Nimitz's DES key using its private key. 5. Both Nimitz and the Halibut now share the same secret key as though a courier had hand-carried it across thousands of mile

  • f ocean. They can communicative in secret! And note that

they can use all new keys every time they "talk."

24

slide-25
SLIDE 25

Real-World Use of 1-Key/2-Key Cryptography A Military Application

But how does the Halibut know that’s really Admiral Nimitz who wants their public key??? And how do you know that’s Amazon.com that wants your credit card number??? How do you know there is no Man- in-the-Middle???

25

slide-26
SLIDE 26

THE MAN-IN-THE-MIDDLE

The Man-in-the-Middle attack works like this: 1. BOB says to ALICE, “I have a message for you. Send me your public key." 2. ALICE sends her public key to BOB. 3. MAN gets ALICE's public key and then passes his own (MAN's) public key to BOB.

26

slide-27
SLIDE 27

THE MAN-IN-THE-MIDDLE

The Man-in-the-Middle attack works like this:

4. BOB gets MAN's public key and then passes his own (BOB's) public key to ALICE. 5. MAN gets BOB's public key and then passes his own (MAN's) public key to ALICE. Now, both ALICE and BOB have MAN's public key. MAN has both ALICE's and BOB's public keys.

27

slide-28
SLIDE 28

THE MAN-IN-THE-MIDDLE

The Man-in-the-Middle attack works like this:

6. ALICE encrypts her messages using MAN's public key - then sends them to BOB. 7. MAN decrypts those messages using his private key, reads them, re-encrypts them using BOB's public key, and then passes them on to BOB (changed or unchanged, as MAN pleases).

28

slide-29
SLIDE 29

THE MAN-IN-THE-MIDDLE

The Man-in-the-Middle attack works like this:

8. BOB encrypts his messages using MAN's public key - then sends them to ALICE. 9. MAN decrypts those messages using his private key, reads them, re-encrypts them using ALICE's public key, and then passes them on to ALICE (changed or unchanged, as MAN pleases).

  • 10. Neither ALICE nor BOB is any

the wiser.

29

slide-30
SLIDE 30

SECURE COMMUNICATIONS Over the Internet

30

■ To ensure the CONFIDENTIALIY of data, we use: ■ CRYPTOGRAPHY ■ To ensure the INTEGRITY of data, we use: ■ MESSAGE DIGESTS ■ To AUTHENTICATE the source of messages, we use: ■ DIGITAL SIGNATURES ■ To AUTHENTICATE the identity of network users, we use: ■ DIGITAL CERTIFICATES

slide-31
SLIDE 31

Secure Sockets Layer

31

The Standard for Implementing Secure Communications via the Internet

■ Ensures privacy using both 1-key and 2-key cryptography ■ Ensures data integrity using message digests ■ Authenticates message sources using digital signatures ■ Authenticates network user (server) identities using digital certificates

slide-32
SLIDE 32

To ensure the integrity of data, we use: MESSAGE DIGESTS

For any given message (text, graphic, etc.), a computer program (1) computes the MD and (2) appends it to the end of the message. When BOB receives the message from ALICE, his software also computes an MD (does a "hash") of the message. BOB's software then compares its computed MD with ALICE's computed MD. A match verifies that the message is authentic - it has not changed since its creation. (Yes, a “man in the middle” can change the message and then create a new MD, but we handle that next.)

slide-33
SLIDE 33

To authenticate the source

  • f data, we use:

DIGITAL SIGNATURES

Assuming ALICE wants to digitally sign her message to BOB…

1.Software computes a message digest (MD) of ALICE's message.

  • 2. The software then encrypts the MD using ALICE's private key.

3.When this encrypted MD has been appended to the original message, the message is then considered "signed" by ALICE. Using ALICE's public key, BOB's software decrypts the digital signature, thus retrieving the MD of ALICE's message. Then BOB's software computes its own MD of the original message.

slide-34
SLIDE 34

To authenticate the source

  • f data, we use:

DIGITAL SIGNATURES

If BOB's MD is identical to ALICE's MD, BOB knows 2 things: Note that ALICE could have also encrypted her signed message using BOB's public key. Then, BOB would (1) decrypt the message using his private key, and then (2) proceed as he did above, authenticating the message. Furthermore, ALICE cannot later claim she did not send the message - non-repudiation.

  • 1. The message has not been altered - data authentication.
  • 2. ALICE sent the message - sender authentication.

Alice gains privacy.

slide-35
SLIDE 35

To AUTHENTICATE the identity of network users, we use: DIGITAL CERTIFICATES

35

Most servers consider a correct Username and Password proof enough that the client is who she claims to be. However, how can the client be sure that the server is who it claims to be? Many client applications (e.g. browsers) use Digital Certificates to authenticate the server before passing on to it sensitive information, such as credit card numbers. (Note, however, that Digital Certificates can just as easily be used to authenticate a client to a server.)

slide-36
SLIDE 36

To AUTHENTICATE the identity of network users, we use: DIGITAL CERTIFICATES

A Digital Certificate is like a driver's license. It identifies its

  • wner in clear text. A Certificate Authority (CA) issues the

certificate after verifying the information contained in it. The CA signs (appends a digital signature to) the certificate before issuing it to its owner, normally a server, person, or company. The CA’s digital signature is an encrypted message digest of the certificate, the encryption being done using the CA's private key. THIS IS CRUCIAL: The Digital Certificate (and therefore public keys) of all major CAs are installed in all major browsers (such as Internet Explorer and Firefox) so that the browsers can verify the signatures on all certificates it receives.

36

slide-37
SLIDE 37

Certificate Authorities’ Certificates in Your Browser

There are over 100 CAs, whose digital certificates (including their public keys) are installed on your browser. In IE, click on Tools/Internet Options/Content/ Certificates to see the list.

37

slide-38
SLIDE 38

Verisign’s Certificate in Your Browser

Here is Verisign’s certificate. It was signed by Verisign because there is no higher authority than it. All of the CA certificates in your browser were signed by the companies they identify. There is no higher authority to trust. So, ultimately, we trust Microsoft, or Netscape, or whoever wrote the browser we use! But what if someone hacks our browser….?

38

slide-39
SLIDE 39

In Internet Explorer, you can view the digital certificate of any SSL-enabled Web site by double-clicking on the little yellow lock. Here is Amazon.com’s (abbreviated) certificate:

39

DIGITAL CERTIFICATES Authenticating the Machines (Servers)

Certificate Owner: Certificate Issuer: Valid From: Valid To: www.amazon.com, Seattle, WA, USA RSA Data Security, Inc. Tuesday, March 19, 2006 8:00:00 PM Thursday, March 20, 2007 7:59:59 PM Public Key Algorithm: RSA (1024-bit) Server’s Public Key: 30 81 87 02 81 81 00 c8 1b 8b fa 40 c3 5b … (1024 bits) Signature Algorithm: MD5 (128-bit) CA’s Signature: 62 89 a8 52 c0 e6 80 10 51 74 3a 43 43 f0 c6 0e

The browser and server negotiate the 1-key encryption algorithm (e.g. RC4, 3DES, etc.) used to encrypt the actual information passed between them.

slide-40
SLIDE 40

Schwab’s Digital Certificate

Double-click on the green lock to get this.

40

slide-41
SLIDE 41

Making E-Commerce Secure with SSL - SECURE SOCKETS LAYER

Secure Sockets Layer (SSL) uses it all: 1-key crypto, 2-key crypto, Digests, Signatures, and Certificates. SSL is the industry-standard method for protecting Internet

  • communications. The SSL security protocol provides data

encryption, server authentication, message integrity, and

  • ptional client authentication.

Browsers, such as IE and Netscape, not only include the SSL protocol, they also include the public keys of all major Certificate Authorities (CAs – there’s over 100 of them), such as Verisign and Thawte. Any server (or person) – such as Amazon.com or your broker - that will have to authenticate itself to your browser must possess a digital certificate signed by one of these CAs.

41

slide-42
SLIDE 42

SECURE SOCKETS LAYER (SSL) Making E-Commerce Secure

1. ALICE goes to Amazon, giving it her username and password. 2. Amazon's server gives its digital certificate to ALICE's browser. 3. ALICE’s browser reads the Certificate Authority (CA) listed in the certificate. 4. ALICE’s browser uses that CA's public key (included in the browser) to decrypt the certificate's digital signature – a message digest encrypted using the CA’s private key.

42

slide-43
SLIDE 43

SECURE SOCKETS LAYER (SSL) Making E-Commerce Secure

5. ALICE’s browser compares the MD with its own MD of the certificate. 6. If the certificate is okay, the browser sends the server a random session (secret) key, public-key-encrypted (e.g. RSA) using the server's public key (found in its certificate). 7. Amazon's server decrypts the session key using its private key. 8. The browser and server now use 1-key (e.g. RC4) cryptography.

43

slide-44
SLIDE 44

SECURE SOCKETS LAYER (SSL) Making E-Commerce Secure

9. Aclosed yellowlock appears to let you know an SSL (Secure Sockets Layer) channel is up! NOTE: A session key is a secret key that is used only once, in a single 1-key cryptographic communication session. AGAIN: SSL uses it all – 1-key crypto, 2-key crypto, message digests, digital signatures, and digital certificates.

44

slide-45
SLIDE 45

46

For More Information

Why Crypto Is Harder Than It Looks: http://www.counterpane.com/whycrypto.html Bruce Schneier's Applied Cryptography: http://www.counterpane.com/applied.html Handbook of Applied Cryptography: http://www.cacr.math.uwaterloo.ca/hac/ Cryptologic History and the NSA: http://www.nsa.gov/docs/history/index.html RSA Security, Inc.: http://www.rsa.com SSL - Secure Sockets Layer: http://www.e-greenstar.com/SSL/SSL-how.htm PGP - Pretty Good Privacy: http://www.pgp.com One Time Pads: http://world.std.com/~franl/crypto/one-time-pad.html ■ Cryptography: The Study of Encryption: ■ http://world.std.com/~franl/crypto.html

■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■

The Cypherpunks Home Page: http://www.csua.berkeley.edu/cypherpunks/Home.html

slide-46
SLIDE 46

1-KEY CRYPTOGRAPHY ALGORITHMS

■ DES: The Data Encryption Standard, a block cipher with 64-bit blocks and a 56-bit key . Probablythe most widely used symmetric cipher ever devised. DES has been a US government standard for use on unclassified data since the late 70's. It is seriously unsecure against current attacks. ■ 3DES: DES using three DES encryptions on a single data block, with at least two different

  • keys. When three different keys are used, 3DES is considered a 168-bit key algorithm.

■ RC4: Rivest Cipher four, designed by Ron Rivest of RSA(Rivest-Shamir-Adelman) and widely

  • used. Believed highly secure with adequate key length (e.g. 128 bits).

■ IDEA: International Data Encryption Algorithm, developed in Europe as an alternative to exportable American ciphers such as DES that were too weak for serious use; designed for high data throughput for use in real-time communications systems; a block cipher using 64-bit blocks and 128-bit keys; used in PGP (Pretty Good Privacy). ■ IPsec: Internet Protocol Security; uses 3DES with three different keys.

MPPE: Microsoft Point to Point Encryption, proprietary algorithm built into Microsoft products, not all that popular. ■ Blowfish: Ablock cipher with 64-bit blocks and variable length keys (up to 448 bits).

Skipjack: Developed by the NSAfor use with Clipper and Capstone; released in 1990; uses an 80-bit keyand 32 rounds of processing; uses a secret algorithm (all other algorithms listed here are in the public domain, making their security dependent entirelyon keeping the secret key secret.) ■ CAST: In its current form as CAST-128, this standard's main advantages over DES are the flexibilityin key size and a larger block size that allows for higher security . CAST-256 supports several key sizes (128, 160, 192, 224 and 256 bits) and a block size of 128 bits. CAST is several times faster than DES.

slide-47
SLIDE 47

2-KEY CRYPTOGRAPHY ALGORITHMS

■ RSA: The Rivest-Shamir-Adleman public key encryption scheme w as developed by RSAData Security , Inc. Named for its three inventors, the RSAalgorithm is based on the fact that there is no efficient w ay to factor very large numbers. Deducing an RSAkey , therefore, requires an extraordinary amount of computer processing power and time. The RSAalgorithm has become the de facto standard for industrial-strength encryption of session keys sent over the

  • Internet. It is used by SSL (Secure Sockets Layer), which is built into many softw

are products, including Netscape Navigator and Microsoft Internet Explorer. ■ DH: The Diffie-Hellman (DH) algorithm is actually a key-exchange mechanism, developed by Whitfield Diffie and Martin Hellman to create a shared session key , which then used in normal, 1-key cryptography . It w as the first openly published public key system, preceding the

  • RSAalgorithm. (Rivest, Shamir, and Adleman based their work on that of Diffie and

Hellman.) ElGamal, a public key encryption scheme based on the DH algorithm is built into the PGP (Pretty Good Privacy) email encryption program. The success of DH is based upon the assumption that it is infeasible to compute g^(ab) knowing only g^a and g^b. That is, no

  • ne (that is admitting it) can imagine a w

ay of passing from g^a and g^b to g^(ab) without first being able to determine a or b (but it is conceivable that such a w ay might exist). ■ DSA: Acrucial component of secure communication is the ability of a sender to affix a digital signature to a message to allowthe recipient to verify that the message w as sent bythe sender. This is especiallyimportant with public-key cryptosystems, which are susceptible to a Man-in- the-middle attack. The Digital Signature Algorithm (DSA) fills this role. It is designed to serve

  • nly as a digital signature rather than encryption or key exchange. Its security is based on the

difficulty of solving the discrete logarithm problem. Apublicly available implementation of

DSA is included in the GnuPG package, which is an open-source version of PGP.