Cryptography
Cryptography
30.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
30-1 INTRODUCTION
30.2
Figure 30.1 Cryptography components
30.3
Figure 30.2 Categories of cryptography
30.4
Symmetric-key cryptography
It is an encryption system where the
sender and receiver of a message
use a single common key to encrypt
and decrypt messages.
It is faster and simpler but the
problem is that the sender and
receiver have to somehow exchange
keys securely
30.5
Figure 30.3 Symmetric-key cryptography
30.6
Note
30.7
Asymmetric Key
Cryptography
In Asymmetric Key Cryptography, a pair of keys is
used to encrypt and decrypt information.
A sender’s public key is used for encryption and a
receiver’s private key is used for decryption.
Public keys and Private keys are different. Even if
the public key is known by everyone the intended
receiver can only decode it because he alone
knows his private key.
The most popular asymmetric key cryptography
algorithm is the RSA algorithm.
30.8
Figure 30.4 Asymmetric-key cryptography
30.9
Figure 30.6 Comparison between two categories of cryptography
30.10
30-2 SYMMETRIC-KEY CRYPTOGRAPHY
30.11
Figure 30.7 Traditional ciphers
30.12
Note
30.13
Note
30.14
Example 30.3
Solution
We encrypt one character at a time. Each character is
shifted 15 characters “down”. Letter H is encrypted to W.
Letter E is encrypted to T. The first L is encrypted to A.
The second L is also encrypted to A. And O is encrypted
to D. The cipher text is WTAAD.
30.15
Example 30.4
Solution
We decrypt one character at a time. Each character is
shifted 15 characters “up”. Letter W is decrypted to H.
Letter T is decrypted to E. The first A is decrypted to L.
The second A is decrypted to L. And, finally, D is
decrypted to O. The plaintext is HELLO.
30.16