Vous êtes sur la page 1sur 28

Chapter two

Cryptography-1

What is Cryptography?
Cryptography derived its name from a Greek
word called Kryptos which means Hidden
Secrets.
Cryptography is the practice and study of
hiding information. It is the Art or Science of
converting a plain clear data into an
unintelligible data and again retransforming
that message into its original form.
It provides Confidentiality, Integrity, Accuracy.

What is Encryption / Decryption


Encryption
The process of converting plain text into an unintelligible format
(cipher text) is called Encryption.

Decryption
The process of converting cipher text into a plain text is called
Decryption.

Consider
the following
example:
Example
Ceasars
Cypher
If the word to encrypt is SECRET using Caesars key value
of 3,
Then each character change to the third character of the
original character.
That is,
So starting with
ABCDEFGHIJKLMNOPQRSTUVWXYZ
and sliding everything up by 3, you get
DEFGHIJKLMNOPQRSTUVWXYZABC

Example(contd.)
So here, the plaintext, SECRET encrypts as
VHFUHW.
To allow someone else to read the cipher text(decrypt),
you tell them that the key is 3.

Assignment
Encrypt the text SUCCESS with key value as 5.

Ans:
So starting with
ABCDEFGHIJKLMNOPQRSTUVWXYZ
and sliding everything up by 5, you get
FGHIJKLMNOPQRSTUVWXYZABCDE
So, SUCCESS = XZHHJXX

Cipher Methods
Plaintext can be encrypted through bit stream or block
cipher method
Bit stream: each plaintext bit transformed into cipher bit
one bit at a time
Block cipher: message divided into blocks (e.g., sets of
8- or 16-bit blocks) and each is transformed into
encrypted block of cipher bits using algorithm and key

Cipher Methods (continued)


Cryptosystems typically made up of algorithms, data
handling techniques, and procedures
Two major types of Cipher method:
1. Substitution cipher: substitute one value for another
- Monoalphabetic substitution: uses only one alphabet
- Polyalphabetic substitution: more advanced; uses two
or more alphabets

Cipher Methods (continued)


2. Transposition cipher: rearranges values within a block to
create ciphertext
Example: exclusive OR (XOR): function of Boolean
algebra; two bits are compared
If two bits are identical, result is binary 0
If two bits not identical, result is binary 1

Table 8-1 Exclusive OR Operations

Perform an XOR cipher on the following bits.


Message011000010110001001100011
CypherKey011111110111111101111111

10

01100001 = a
01100010 = b
01100011 = c
Message 011000010110001001100011
Key
011111110111111101111111
Cypher text
000111100001110100011100

11

Transposition cipher example 2

Letters of the message are rearranged


Break patterns, e.g., columnar transposition
Plaintext: this is a test
this
isat
est!

tiehssiatst!

Advantages: easy to implement


Disadvantages:
Trivially broken for known plaintext attack (brute-force)

12

Hash Functions
Mathematical algorithms that generate message
summary or digest to confirm message identity and
confirm no content has changed
Hash algorithms: publicly known functions that create
hash value
Used in password verification systems to confirm
identity of user

13

Cryptographic Algorithms
Often grouped into two broad categories, symmetric and
asymmetric; todays popular cryptosystems use hybrid
combination of symmetric and asymmetric algorithms
Symmetric and asymmetric algorithms distinguished by
types of keys used for encryption and decryption
operations

14

Cryptographic Algorithms (continued)


Symmetric encryption: uses same secret key to
encipher and decipher message
Encryption methods can be extremely efficient, requiring
minimal processing
Both sender and receiver must possess encryption key
If either copy of key is compromised, an intermediate can
decrypt and read messages

15

Figure 8-3 Symmetric Encryption Example

16

Cryptographic Algorithms (continued)


Data Encryption Standard (DES): one of most popular
symmetric encryption cryptosystems
64-bit block size; 56-bit key
Adopted by NIST in 1976 as federal standard for
encrypting non-classified information

Triple DES (3DES): created to provide security far


beyond DES
Advanced Encryption Standard (AES): developed to
replace both DES and 3DES
17

Cryptographic Algorithms (continued)


Asymmetric encryption (public-key encryption)
Uses two different but related keys; either key can encrypt
or decrypt message
If Key A encrypts message, only Key B can decrypt
Highest value when one key serves as private key and the
other serves as public key

18

Figure 8-4 Using Public Keys

19

Data Encryption
Standards
DES

20

DES Multiple Encryption


Double DES

21

DES Multiple Encryption


Triple DES

22

Triple DES
Can be broken in 2^56 operations if one has

2^56 chosen plaintext blocks.


Could use distinct K1,K2,K3 to avoid this
attack -- 2^112 bit key

23

Digital Signature
The main application of hash function is the digital
signature.
A digital signature is similar to a handwritten
signature and verifies the author, date, and time of
signature. The signature should also be able to
authenticate the content at the time of the signature.
The main requirements of a digital signature are:
It is unique to the sender.
It should be recognizable and verifiable.

Digital signature
The private-key signs (create) signatures, and the
public-key verifies signatures
Only the owner can create the digital signature,
hence it can be used to verify who created a
message.
The whole message is not signed, but just a digest
or hash of the message is signed.

Digital Certificates
A digital certificate is an electronic "passport" that
allows a person, computer or organization to
exchange information securely over the Internet
using the public key infrastructure (PKI).
A digital certificate may also be referred to as a
public key certificate.

26

Hybrid Cryptography Systems


Except with digital certificates, pure asymmetric key
encryption not widely used
Asymmetric encryption more often used with symmetric
key encryption, creating hybrid system
Diffie-Hellman Key Exchange method: most common
hybrid system; provided foundation for subsequent
developments in public-key encryption

Principles of Information Security, 3rd edition

27

Figure 8-7 Hybrid Encryption Example

Principles of Information Security, 3rd edition

28

Vous aimerez peut-être aussi