Cryptography

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Chapter 30

Cryptography
INTRODUCTION

Let us introduce the issues involved in cryptography.


First, we need to define some terms; then we give some
taxonomies.

Topics discussed in this section:


Definitions
Two Categories
Cryptography components
Categories of cryptography
Figure 30.3 Symmetric-key cryptography
Note

In symmetric-key cryptography, the


same key is used by the sender
(for encryption)
and the receiver (for decryption).
The key is shared.
Asymmetric-key cryptography
Comparison between two categories of cryptography
SYMMETRIC-KEY CRYPTOGRAPHY

Symmetric-key cryptography started thousands of years


ago when people needed to exchange secrets (for
example, in a war). We still mainly use symmetric-key
cryptography in our network security.

Topics discussed in this section:


Traditional Ciphers
Simple Modern Ciphers
Modern Round Ciphers
Mode of Operation
ASYMMETRIC-KEY CRYPTOGRAPHY

An asymmetric-key (or public-key) cipher uses two


keys: one private and one public. We discuss two
algorithms: RSA and Diffie-Hellman.

Topics discussed in this section:


RSA
Diffie-Hellman
RSA
RSA: Choosing keys
1. Choose two large prime numbers p, q.
(e.g., 1024 bits each)
2. Compute n = pq,  = (p-1)(q-1)
3. Choose e (with e<n) that has no common factors
with . (e,  are “relatively prime”).

4. Choose d such that ed-1 is exactly divisible by .


(in other words: ed mod  = 1 ).

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


+ -
KB KB
RSA: Encryption, decryption
0. Given (n,e) and (n,d) as computed above

1. To encrypt bit pattern, m, compute


c = m e mod n
(i.e., remainder when me is divided by n)
2. To decrypt received bit pattern, c, compute
m = c d mod n d
(i.e., remainder when c is divided by n)

Magicm d
= (m e mod n) mod n
happens! c
RSA example:
Bob chooses p=5, q=7. Then n=35, =24.
e=5 (so e,  relatively prime).
d=29 (so ed-1 exactly divisible by ).

letter m me c = me mod n
encrypt:
l 12 1524832 17

decrypt: c cd m = cd mod n letter


17 481968572106750915091411825223071697
12 l
Computational very extensive
Note

In RSA, e and n are announced to the


public; d and  are kept secret.

Public cryptography is very


computational expensive.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy