Professional Documents
Culture Documents
Topic 5
Cryptography
1
References
2
Objectives
• Define Cryptography
• Define Steganography
• Understand Cipher, Encryption and Decryption
• Describe Hashing, Symmetric and Asymmetric
algorithms
• Define Digital Certificates
3
What Is Cryptography?
• Cryptography
– The science of transforming information into an unintelligible
form while it is being transmitted or stored so that
unauthorized users cannot access it.
– The transforming process scrambles a message so that it
cannot be viewed.
4
What Is Steganography?
• Steganography
– Hides the existence of the data
– What appears to be a harmless image can contain hidden
data embedded within the image
– Can use image files, audio files, or even video files to
contain hidden information
5
Cryptography and Security
Cryptography can provide basic security protection for information:
1. Cryptography can protect the confidentiality of information
– Confidentiality – Ensures only authorised parties can view the information
6
Cryptographic Algorithms
• There are three categories of cryptographic
algorithms:
– Symmetric algorithm
– Asymmetric algorithm
– Hashing algorithm
7
Symmetric Algorithm
• Symmetric algorithm
– The same identical key is used to encrypt and decrypt a
document.
– The key must be kept secret
Sender Recipient
Key
Key Ciphertext
למעאع₪
Encryption Decryption
Algorithm Algorithm
Plaintext Plaintext
“ABC” “ABC”
8
Symmetric Algorithm
• Also called private key cryptography; uses the
same single key to encrypt and decrypt a
message
• Encryption is the process of transforming
information (referred to as plaintext) using an
algorithm to make it unreadable.
• Decryption is, the reverse process, to make the
encrypted information readable again.
• A cipher is an algorithm for performing
encryption or decryption
9
Symmetric Algorithm
• Classified into 2 categories:
– Stream Cipher
• Works on one character at a time
• Examples: Shift, Substitution and Polyalphabetic Ciphers
– Block Cipher
• Manipulates an entire block of plaintext at a time
• The plaintext is divided into separate blocks.
• Each block is encrypted independently.
10
Shift Cipher
• One of the most famous ancient
cryptographers was Julius Caesar
• Caesar shifted each letter of his messages to
his generals three places down in the
alphabet
Table : ABCDEFGHIJKLMNOPQRSTUVWXYZ
Key : 3
11
Substitution Cipher
• The weakness of shift ciphers led to substitution ciphers.
12
Polyalphabetic cipher
13
Symmetric Algorithm
• Information protections by Symmetric Cryptography
14
Symmetric Algorithm
Popular Symmetric Algorithms:
• Data Encryption Standard (DES)
– DES is a block cipher and encrypts data in 64-bit blocks
• Triple Data Encryption Standard (3DES)
– Designed to replace DES
– Uses three rounds of encryption instead of just one
• Advanced Encryption Standard (AES)
– Approved as a replacement for DES
– AES performs three steps on every block (128 bits) of plaintext
• Other symmetric algorithms:
– Rivest Cipher (RC) family from RC1 to RC6
– International Data Encryption Algorithm (IDEA)
– Blowfish
– Twofish
15
Asymmetric Algorithm
• Asymmetric algorithm
– Uses 2 keys to encrypt and decrypt a document.
– The public key is known to everyone and can be freely
distributed
– The private key is known only to the recipient of the message
Sender Recipient
Private Key
Public Key Ciphertext
למעאع₪
Encryption Decryption
Algorithm Algorithm
Plaintext Plaintext
“ABC” “ABC”
16
Asymmetric Algorithm
• Also called public key cryptography; requires a
pair of keys.
• Public key is designed to be “public” and do not
need to be protected.
• Private key should be kept confidential and never
shared.
• Asymmetric keys can work in both directions. A
document encrypted in a public key can be
decrypted in with the corresponding private key.
In the same way, a document encrypted with a
private key can be decrypted with its public key.
17
Asymmetric Algorithm
18
Asymmetric Algorithm
• Information protections by Asymmetric Cryptography
19
Hashing Algorithm
• A hash is a special mathematical function that
performs one-way [encryption] calculation.
• Once the algorithm is processed, there is no way
to reverse the process to obtain the original text
• Hashing is primarily used for comparison
purposes.
Hashing Algorithm
• Hashing
– A process for creating a unique “signature” for a set of data
• Also called a hash or digest
• The hash serves as a check to verify the message contents
• Hashing is used only for integrity to ensure that:
– No unauthorized person or malicious software has altered the data
• A hashing algorithm has the following characteristics:
– Fixed size: The hash is always the same size regardless of the length
of the plaintext.
– Unique: Two different plaintexts cannot produce the same hash (i.e.
collision)
– Secure: The resulting hash cannot be reversed to determine the
plaintext.
Hashing Algorithm
• Applications of Hash
Post hash values of files (eg software applications) on Internet
download sites
• To verify the file integrity of files that can be downloaded
Use hash to store passwords
• When a password for an account is created, the password is hashed
and stored
Hashing Algorithm
• Popular hashing algorithms
1. Message Digest (MD) algorithm (128 bits)
24
Hashing Algorithm
• Information protections by Hashing
25
Comparison of Algorithms
Algorithm Description
Types
Hash Performs only a one-way encryption.
There is no way retrieve the plaintext from the hash value.
Purpose is to verify the file integrity
26
Electronic Key Exchange
• (Asymmetric) Public key, the slower protocol, is used to
exchange the (Symmetric) private key, and then the
communication (document) uses the faster symmetric key
protocol. This process is known as electronic key exchange.