Documentos de Académico
Documentos de Profesional
Documentos de Cultura
CONTENTS
Definition
Cryptography Issues
Cryptography Components
Cryptography Technique
Cryptography Categories
Symmetric key cryptography
Asymmetric key cryptography
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CRYPTOGRAPHY ISSUES
CRYPTOGRAPHY ISSUES
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CIPHER
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
KEY
A key is a number (or a set of numbers) that the cipher operates on, as an
algorithm.
To encrypt a message, we need an encryption algorithm, an encryption key,
and the plaintext.
To decrypt a message, we need a decryption algorithm, a decryption key,
and the ciphertext. These reveal the original plaintext.
Types:
Shared key, Public key and Private key.
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
USE OF KEY
Example:
Use Monoalphabetic Cipher to encrypt HELLO with key = 3.
Plaintext: HELLO
Ciphertext: KHOOR
ALICE, BOB, AND EVE
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CRYPTOGRAPHY TECHNIQUE
CRYPTOGRAPHY TECHNIQUE
Alices Bobs
Encryption Decryption
Key K1 Key K2
Plaintext Ciphertext Plaintext
Alice Bob
Eve
If m = Plaintext, then
Ciphertext = K1(m) and
m = K2(K1(m))
CRYPTOGRAPHY CATEGORIES
CRYPTOGRAPHY CATEGORIES
We can divide all the cryptography algorithms (ciphers) into two groups:
Symmetric key (also called secret-key) cryptography algorithms and
Asymmetric key (also called public-key) cryptography algorithms.
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
SYMMETRIC KEY CRYPTOGRAPHY
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
SYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE
Shared
Alices Secret Bobs
Encryption Key K Decryption
Key K Key K
Plaintext Ciphertext Plaintext
Alice Bob
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
ASYMMETRIC KEY CRYPTOGRAPHY
In asymmetric or public-key cryptography, there are two keys: a private key and a
public key.
The private key is kept by the receiver.
The public key is announced to the public.
If Alice wants to send a message to Bob, Alice uses the public key to encrypt the
message. When the message is received by Bob, the private key is used to decrypt
the message.
Some of the asymmetric algorithms are:
Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography (ECC), Man-in-the-Middle Attack
etc.
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
ASYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE
Bobs
Used for encryption
Public To Public
Key K+
Bobs
Private Used for decryption
Key K-
Plaintext Ciphertext Plaintext
Alice Bob
If m = Plaintext, then
Ciphertext = K+(m) and
m = K-(K+(m))
COMPARISON OF SYMMETRIC AND ASYMMETRIC
KEY CRYPTOGRAPHY
SYMMETRIC KEY CRYPTOGRAPHY ASYMMETRIC KEY CRYPTOGRAPHY
Only 1 shared key is involved. Here 2 keys : a private and a public
key are involved.
The same key encrypts and decrypts The Public key encrypts the plaintext
the plaintext. while the private key decrypts it.
The shared key is kept secret The private key is just kept secret by
between Alice and Bob. the Bob while the public key is made
public.
Examples of Symmetric algorithms: Examples of Asymmetric algorithms:
DES, 3DES, AES, IDEA, BLOWFISH, Diffie-Hellman, RSA, El Gamal, Elliptic
TWOFISH, RC4, RC5, SAFER etc. Curve Cryptography (ECC) etc.
FAMOUS ALGORITHMS/CIPHERS
MODERN ROUND CIPHERS
The ciphers of today are called round ciphers because they involve multiple rounds,
where each round is a complex cipher made up of the simple ciphers.
The key used in each round is a subset or variation of the general key called the
round key.
If the cipher has N rounds, a key generator produces N keys, K1, K2,...., KN, where
K1 is used in round 1, K2 in round 2, and so on.
Modem symmetric-key ciphers: DES and AES are referred to as block ciphers
because they divide the plaintext into blocks and use the same key to encrypt and
decrypt the blocks.
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
DES - DATA ENCRYPTION STANDARD
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
DES TECHNIQUE
64-Bit Plaintext
DES
Initial Permutation
K1
Round 1
Round 2
K2 Round
Key 64-Bit Key
Generator
K16
Round 16
Final Permutation
64-Bit Ciphertext
AES - ADVANCED ENCRYPTION STANDARD
The Advanced Encryption Standard (AES) was designed because DES's key was too
small.
AES is designed with three key sizes: 128, 192, or 256 bits.
Table shows the relationship between the data block, number of rounds, and key size.
Size of Data Block Number of Rounds Key Size
10 128
128-Bits 12 192
14 256
The structure and operation of the other configurations are similar. The difference lies
in the key generation.
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
AES TECHNIQUE
128-Bit Plaintext
AES
Pre Round K0
Each round of Transformation
AES, except for
the last, is a K1
Round 1 Cipher Key
cipher with four Round
operations that (128-bits for N =10,
K2 Key
are invertible. Round 2 Generator
192-bits for N =12 or
256-bits for N =14)
The last round
has only three
operations. Round N KN
(slightly different)
128-Bit Ciphertext
RSA ALGORITHM
Encryption
Anyone who needs to send a message to Bob can use n and e.
For example, if Alice needs to send a message to Bob, she can change the message,
usually a short one, to an integer. This is the plaintext.
She then calculates the ciphertext, using e and n, as c = pe (mod n).
Alice sends C, the ciphertext, to Bob.
Decryption
When Bob receives the ciphertext, he uses his private key d to decrypt the message:
p = cd (mod n)
Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan
CONCLUSION