SlideShare a Scribd company logo
1 of 67
Fundamentals
of Information Encryption
Chapter 4
Amna Magzoub Omer
Sudan
Introduction
• Nowadays, information has a good value in our
world, so information should be secured.
• To secure the information, we need to be able to
hide it from unauthorized access, which is called
Confidentiality.
• protect it from unauthorized modification, which
is called integrity;
• make it available to an authorized entity, which
is called availability.
Basic Concepts of Cryptography
should accomplish the following goals:
Confidentiality: protects the information from
unauthorized access.
Data integrity: ensures that the info has not been
modified in an unauthorized way.
Authentication: classified into two categories:
Entity authentication: ensure identity.
Message authentication: ensure original message
source.
Nonrepudiation: the receiver can prove that he
receives the original info as the sender sends it.
Cont…
• In cryptography a cipher (or cypher) is an
algorithm for performing encryption or
decryption.
Principles of Encryption
• The basic idea of encryption is to modify the
message in such a way that only a legal
recipient can reconstruct its content .
• Encryption can be used to protect data "at
rest“.
• protect data in transit (data being transferred
via networks).
Cont…
• A discrete-valued cryptosystem can be
characterized by:
o A set of possible plaintexts, P
o A set of possible ciphertexts, C
o A set of possible cipher keys, K
o A set of possible encryption and decryption
transformations, E and D
• The encryption procedure of a
cipher can be described as:
• The decryption procedure is
defined as:
Encryption Algorithms
• Encryption algorithms are classified in various
ways: according to
1. structures of the algorithms.
2. percentage of encrypted data.
3. Keys.
1. Classification according to
Encryption Structure:
1. block ciphers.
2. stream ciphers.
• A block cipher converts a fixed length block of
plaintext data to a block of ciphertext data of
the same length.
• fixed length is called the block size
block size is 64 or 128 bits
Large block size : more secure, but complex
Cont…
Block ciphers can be characterized by:
1. Block size
2. Key size
3. Number of rounds
4. Encryption modes
Modern block ciphers have the following
features:
1. Variable key size
2. Mixed arithmetic operations.
3. Data-dependent rotations and key-
dependent rotations.
4. key schedule algorithm
5. Variable plaintext/ciphertext block sizes and
variable numbers of rounds
Stream Ciphers
• Operate on smaller units of plaintext.
• Faster than a typical block cipher.
• a stream cipher generates a sequence of bits as a key
using PRNG.
• PRNG expands a short secret key into a long string (key
stream) and combining the key stream with the
plaintext.
• Have the following properties:
They do not have perfect security.
Security depends on the properties of the PRNG.
Typical stream ciphers are very fast.
The PRNG must be unpredictable.
2. Classification according to Keys
• Depending on relationship between Kₑ and Kᵈ
 Private-key cipher or a symmetric cipher when kₑ=kᵈ
encryption/decryption key must be transmitted
from the sender to the receiver via a separate
secret channel.
Public-key cipher or an asymmetric cipher When Kₑ ≠ Kᵈ
The encryption key, Ke, is published.
The decryption key, Kd, is kept private.
3.Classification according to
Percentage of Encrypted Data
• Full encryption.
• Partial encryption.
Cryptanalysis
• Cryptanalysis is the art of decrypting an encrypted
message without knowing the decryption key.
• In a ciphertext-only attack, the adversary has access
only to some encrypted messages.
• A brute-force attack is a kind of ciphertext-only attack.
It is based on a key search and well-designed
cryptosystems should be computationally infeasible to
attack.
• known-plaintext attack, an adversary has some
information about the plaintext and the corresponding
given ciphertext.
Conventional Symmetric Block Ciphers
• Symmetric = the key used for encryption and
decryption is the same.
• block = the data (information) to be encrypted is
divided into blocks of equal length.
DES
Double DES
Triple DES
IDEA
Blowfish
RC5
RC6
AES
• Feistel cipher is a
structure used in the
construction of block
ciphers ,it is also
commonly known as a
Feistel network.
• encryption and
decryption operations
are very similar.
• SP-network, or
substitution-
permutation
network (SPN), is
a series of linked
mathematical
operations used
in block cipher
algorithms .
• Such a network
takes a block of the
plaintext and the
key as inputs, and
applies several
alternating "rounds"
or "layers" of (S-
boxes) and
permutation boxes
(P-boxes) to produce
the ciphertext
block.
Data Encryption Standard (DES)
• Encrypts data in 64-bit blocks
• The key is a 64-bit number. In every 8 bits, 1
bit (the least significant bit) is used for parity
checking and can be ignored.
• Based on four basic operations: expansion,
permutation, XOR, and substitution.
• The text devided into 64
bits bloks
• Fed into initial
permutation (IP).
• each block is divided
into two sub-blocks,
each with 32-bit .
• The right sub-block is
fed into a Feistel
function (f-function)
• The text devided into 64
bits bloks
• Fed into initial
permutation (IP).
• each block is divided
into two sub-blocks,
each with 32-bit .
• The right sub-block is
fed into a Feistel
function (f-function)
• Expansion: The half-block with 32 bits is
expanded to 48 bits, The output contains
eight 6-bit [8 × 6 = 48 bits] pieces.
• A key-schedule mechanism derive 16subkeys
with 48 bits from the main key.
• Key Mixing: a subkey is combined with the
result of the expansion using an XOR operation.
• Substitution: The six input bits of each one
of the eight S-boxes are replaced
• with four output bits using a nonlinear
transformation
• Permutation: The 32 S-boxes’ outputs will be
rearranged using a fixed permutation. The P-
box is designed so that, after expansion, each
group of S-box output bits is spread across six
different S-boxes in the next round.
Double DES
• Encrypt every block twice using two different
keys.
• First encrypt a block using the first encryption
key and then encrypt the resulting ciphertext
with the second key.
• The decryption is a process conducted in
reverse.
Triple DES
• Performed by executing the DES three times.
• key size of 168 bits
• The triple DES is performed as follows:
1. Use key 1 for encryption.
2. Use key 2 for decryption.
3. Use key 3 for encryption
• The choice among single, double,and triple DES is
a trade-off between performance and security
requirements.
International Data Encryption
Algorithm (IDEA)
• The algorithm was intended as a replacement
of the DES.
• depends on 64-bit plaintext blocks
• The key is 128 bits
• It based on mixing operations from different
algebraic groups (XOR, addition modulo, and
multiplication modulo)
Blowfish
• A 64-bit block cipher using a variable length key.
• The algorithm contains two parts:
Key expansion: divides a key of 448 bits into different
subkey arrays of 4168 bytes.
Data encryption: contains a function iterated for 16
rounds.
• Each round contains a key-dependent
permutation and a key- and data-dependent
substitution.
Con..
• operations are additions and XORs
RC5 Algorithm
• The main feature of the RC5 is the heavy use
of data-dependent rotations.
• RC5 has a variable word size, w, a variable
number of rounds, r, and a variable secret key
with b bytes. It is represented as RC5 w/r/b.
Con…
• It provides high security when good
parameters are chosen.
• The RC5 is composed of encryption,
decryption, and key expansion.
• The expanded key contains t = 2 × (r + 1)
words
• The primitive operations of the RC5 are
illustrated in following Table:
RC5 Encryption Algorithm
• We assume that the input block is given in two
w-bit , A and B.
• also assume that key expansion has already
been performed so that S[0], S[1], …, S[t – 1]
have been computed.
• The steps of the encryption algorithm can be:
RC5 Decryption Algorithm
For i = r downto 1 do
B = ((B - S [2i+1]) >>> A) ⊕ A;
A = ((A - S [2]) >>> B) ⊕ B;
End
B = B-S [1];
A = A-S [0];
RC5 Key Expansion
• Key expansion expands the user’s secret
key, K, to fill the expanded key array S, which
makes S similar to an array of t = 2(r + 1).
• Two constants, Pw and Qw, are used in this
process.
where
e = 2.718281828459....(base of natural
logarithms)
ϕ = 1.618033988749....(golden ratio)
and Odd(x) is the odd integer nearest to x
• For w = 16 and 32, these constants are given
in:
• The expansion begins by copying the secret key
K[0…b – 1] into an array L[0…c – 1] that has
c = ⎡b/u⎤ words, where u = w/8 ( number
of bytes per word)
u consecutive key bytes of K are used to fill up
each successive word in L in a low-order to high-
order byte manner.
• All unfilled byte positions of L are zeroed.
• To initialize the array S, we follow these steps:
Cont…
• The last step is to mix the user secret key in
three passes over the arrays S and L
RC6 Algorithm
• Modified version of RC5.
• Uses four working registers instead of two.
• RC6-w/r/b, derive more words from the user-supplied
key for use during encryption and decryption.
• The user supplies a key of b bytes, where 0 ≤ b ≤ 255.
From this key, 2r + 4 words are derived and stored in
the array S[0, …, 2r + 3].
• This array is used in both encryption and decryption
• RC6 consists of two Feistel networks whose
data are mixed via data-dependent rotations.
• The operations in a single round of RC6
contain two applications of the:
• squaring function f (x) = x (2x + 1) mod 2ˆ32,
two fixed 32-bit rotations, two data-
dependent 32-bit rotations, two XORs, and
two additions modulo 2ˆ32.
RC6 Encryption Algorithm
Input:
Four w-bit plaintext values
are stored in registers A, B, C, and D.
Number r of rounds
w-bit round keys S[0…, 2r + 3]
Output:
Four w-bit ciphertext values are stored in
registers A, B, C, and D.
The Advanced Encryption Standard
(AES)
• an iterated block cipher algorithm with a
variable block size and a variable key Size.
• The block size and the key size can be 128,
192, or 256 bits.
• The intermediate resulting ciphertext is called
a state and it is in the form of a rectangular
array of four rows and a number of columns
equal to the block size divided by 32.
• The cipher key is similarly a rectangular array with four
rows and a number of columns equal to the key size
divided by 32.
• The number of rounds performed on the
intermediate state is related to the key size.
• For key sizes of 128, 192, and 256 bits, the number of
rounds is 10, 12, and 14, respectively.
• Each round consists of a fixed sequence of
transformations, except the first and the last round.
• The AES consists of rounds. Any round, except the final
one, consists of subBytes, ShiftRows, MixColumns, and
AddRoundKey operations.
• In the final round, no MixColumns operation is
performed.
SubBytes
ShiftRow
MixColumns
AddRoundKey Step
Modes of Operation
• Block ciphers encrypt fixed-size blocks
– e.g. DES encrypts 64-bit blocks
• We need some way to encrypt a message
of arbitrary length
– e.g. a message of 1000 bytes
• NIST(National Institute of Standards and
Technology ) defines several ways to do it
– called modes of operation
Five Modes of Operation
• Electronic codebook mode (ECB)
• Cipher block chaining mode (CBC)
• Cipher feedback mode (CFB)
• Output feedback mode (OFB)
• Counter mode (CTR)
Electronic codebook (ECB)
• ECB is the simplest mode.
• data divided into blocks of equal sizes and
each block is encrypted, separately, with the
same encryption key.
Con…
• Advantage :
there is no need to encrypt a file progressively (
suitable for database).
Error is limited to single block.
• Disadvantage:
identical plaintext blocks are encrypted to
identical ciphertext blocks; it does not hide data
patterns (not suitable for image)
Example of image encrypted by ECB
Cipher Block Chaining (CBC)
• Uses an initialization vector IV of size equal to
the size of each block.
• each block of plaintext is XORed with the
previous ciphertext block before being
encrypted.
Encryption algorithm
Decryption algorithm
Con…
• Suitable for image encryption.
• Main disadvantage : an error in one ciphertext
block impacts two plaintext blocks upon
decryption.
• Common
Cipher Feedback (CFB)
• In contrast to the CBC mode, the CFB mode
begins by encrypting the IV, and then an XOR
operation is performed between the bits of
the encrypted IV and the corresponding bits of
the first block.
• Decryption algorithm
• Encryption algorithm
Output feedback mode (OFB)
• Similar to the CFB mode. It begins by
encrypting the IV.
• The bits of the encrypted IV are XORed with
the corresponding bits of the first plaintext
block to get the corresponding ciphertext
block. Also, the output of the encryption
algorithm is used as an input to the next
encryption step instead of the IV.
• Encryption algorithm
• Decryption algorithm
Summary
• Encryption algorithms are classified according
to structure, keys and percentage of
encrypted data.
• Symmetric (private) vs asymmetric (public).
• Common symmetric block cipher.
• Modes of operations.
• Reference from “Faragallah, Osama S.-
Multilevel Security for Relational Databases-
CRC Press (2014)”

More Related Content

What's hot

Modern symmetric cipher
Modern symmetric cipherModern symmetric cipher
Modern symmetric cipherRupesh Mishra
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network SecurityDr. Rupa Ch
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardDr.Florence Dayana
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption StandardPrince Rachit
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSAaritraranjan
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)Haris Ahmed
 
Public key cryptography and message authentication
Public key cryptography and message authenticationPublic key cryptography and message authentication
Public key cryptography and message authenticationCAS
 
Chapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardChapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardShafaan Khaliq Bhatti
 
Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Mazin Alwaaly
 
Minor Project- AES Implementation in Verilog
Minor Project- AES Implementation in VerilogMinor Project- AES Implementation in Verilog
Minor Project- AES Implementation in VerilogHardik Manocha
 
CNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingCNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingSam Bowne
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of OperationRoman Oliynykov
 
CNIT 141 6. Hash Functions
CNIT 141 6. Hash FunctionsCNIT 141 6. Hash Functions
CNIT 141 6. Hash FunctionsSam Bowne
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)NYversity
 
Ch03 block-cipher-and-data-encryption-standard
Ch03 block-cipher-and-data-encryption-standardCh03 block-cipher-and-data-encryption-standard
Ch03 block-cipher-and-data-encryption-standardtarekiceiuk
 

What's hot (20)

Modern symmetric cipher
Modern symmetric cipherModern symmetric cipher
Modern symmetric cipher
 
cns 2marks
cns 2markscns 2marks
cns 2marks
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Cryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSACryptographic Algorithms: DES and RSA
Cryptographic Algorithms: DES and RSA
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
Public key cryptography and message authentication
Public key cryptography and message authenticationPublic key cryptography and message authentication
Public key cryptography and message authentication
 
Chapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption StandardChapter 3: Block Ciphers and the Data Encryption Standard
Chapter 3: Block Ciphers and the Data Encryption Standard
 
Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...Information and data security block cipher and the data encryption standard (...
Information and data security block cipher and the data encryption standard (...
 
20CS2008 Computer Networks
20CS2008 Computer Networks 20CS2008 Computer Networks
20CS2008 Computer Networks
 
Class3
Class3Class3
Class3
 
Minor Project- AES Implementation in Verilog
Minor Project- AES Implementation in VerilogMinor Project- AES Implementation in Verilog
Minor Project- AES Implementation in Verilog
 
Block Cipher
Block CipherBlock Cipher
Block Cipher
 
CNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingCNIT 1417. Keyed Hashing
CNIT 1417. Keyed Hashing
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
CNIT 141 6. Hash Functions
CNIT 141 6. Hash FunctionsCNIT 141 6. Hash Functions
CNIT 141 6. Hash Functions
 
Computer network (3)
Computer network (3)Computer network (3)
Computer network (3)
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
Ch03 block-cipher-and-data-encryption-standard
Ch03 block-cipher-and-data-encryption-standardCh03 block-cipher-and-data-encryption-standard
Ch03 block-cipher-and-data-encryption-standard
 

Viewers also liked

advantage and disadvantage of technology
advantage and disadvantage of technology advantage and disadvantage of technology
advantage and disadvantage of technology Ziyad Siso
 
Mobile Operating Systems
Mobile Operating SystemsMobile Operating Systems
Mobile Operating SystemsDasun Hegoda
 
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...Amazon Web Services
 
Advantages and Disadvantages of Technology
Advantages and Disadvantages of TechnologyAdvantages and Disadvantages of Technology
Advantages and Disadvantages of Technology09356506910
 
Android technology- Advantages & Limitations
Android technology- Advantages & LimitationsAndroid technology- Advantages & Limitations
Android technology- Advantages & LimitationsVaibhav Dixit
 

Viewers also liked (6)

advantage and disadvantage of technology
advantage and disadvantage of technology advantage and disadvantage of technology
advantage and disadvantage of technology
 
Mobile Operating Systems
Mobile Operating SystemsMobile Operating Systems
Mobile Operating Systems
 
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
AWS re:Invent 2016: Encryption: It Was the Best of Controls, It Was the Worst...
 
Advantages and Disadvantages of Technology
Advantages and Disadvantages of TechnologyAdvantages and Disadvantages of Technology
Advantages and Disadvantages of Technology
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android technology- Advantages & Limitations
Android technology- Advantages & LimitationsAndroid technology- Advantages & Limitations
Android technology- Advantages & Limitations
 

Similar to Fundamentals of Information Encryption

Encryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptxEncryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptxhuachuhulk
 
Encryption pres
Encryption presEncryption pres
Encryption presMereySovet
 
Classical Cryptography and Digital Encryption
Classical Cryptography and Digital EncryptionClassical Cryptography and Digital Encryption
Classical Cryptography and Digital EncryptionDamaineFranklinMScBE
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptxssuserd5e356
 
Data encryption techniques and standard
Data encryption techniques and standardData encryption techniques and standard
Data encryption techniques and standardSarika Jadhav
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...editor1knowledgecuddle
 
Cryptography Introduction
Cryptography IntroductionCryptography Introduction
Cryptography Introductionindupps
 
3 Basics of Cryptography Basics of Cryptography
3 Basics of Cryptography  Basics of Cryptography3 Basics of Cryptography  Basics of Cryptography
3 Basics of Cryptography Basics of CryptographyMohammedMorhafJaely
 
Module 2.pptx
Module 2.pptxModule 2.pptx
Module 2.pptxseethal9
 
CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2Hamed Moghaddam
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batchJaimin Jani
 
Information and network security 28 blowfish
Information and network security 28 blowfishInformation and network security 28 blowfish
Information and network security 28 blowfishVaibhav Khanna
 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodelpriyapavi96
 
Block Ciphers and DES.pptx
Block Ciphers and DES.pptxBlock Ciphers and DES.pptx
Block Ciphers and DES.pptxDrAnilKannur1
 

Similar to Fundamentals of Information Encryption (20)

Encryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptxEncryption techniqudgfhgvj,hbkes (2).pptx
Encryption techniqudgfhgvj,hbkes (2).pptx
 
Encryption algorithms
Encryption algorithmsEncryption algorithms
Encryption algorithms
 
Encryption pres
Encryption presEncryption pres
Encryption pres
 
Classical Cryptography and Digital Encryption
Classical Cryptography and Digital EncryptionClassical Cryptography and Digital Encryption
Classical Cryptography and Digital Encryption
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
 
Data encryption techniques and standard
Data encryption techniques and standardData encryption techniques and standard
Data encryption techniques and standard
 
Slidecast - Workshop
Slidecast - WorkshopSlidecast - Workshop
Slidecast - Workshop
 
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
Comparative Analysis of Cryptographic Algorithms and Advanced Cryptographic A...
 
Cryptography Introduction
Cryptography IntroductionCryptography Introduction
Cryptography Introduction
 
Symmetric
SymmetricSymmetric
Symmetric
 
3 Basics of Cryptography Basics of Cryptography
3 Basics of Cryptography  Basics of Cryptography3 Basics of Cryptography  Basics of Cryptography
3 Basics of Cryptography Basics of Cryptography
 
Lecture # 007 AES.pptx
Lecture # 007 AES.pptxLecture # 007 AES.pptx
Lecture # 007 AES.pptx
 
Module 2.pptx
Module 2.pptxModule 2.pptx
Module 2.pptx
 
CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2
 
Cryptography
CryptographyCryptography
Cryptography
 
Jaimin chp-8 - network security-new -use this - 2011 batch
Jaimin   chp-8 - network security-new -use this -  2011 batchJaimin   chp-8 - network security-new -use this -  2011 batch
Jaimin chp-8 - network security-new -use this - 2011 batch
 
Information and network security 28 blowfish
Information and network security 28 blowfishInformation and network security 28 blowfish
Information and network security 28 blowfish
 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodel
 
Block Ciphers and DES.pptx
Block Ciphers and DES.pptxBlock Ciphers and DES.pptx
Block Ciphers and DES.pptx
 
Cryptography using python
Cryptography using pythonCryptography using python
Cryptography using python
 

Recently uploaded

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 

Recently uploaded (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 

Fundamentals of Information Encryption

  • 2. Introduction • Nowadays, information has a good value in our world, so information should be secured. • To secure the information, we need to be able to hide it from unauthorized access, which is called Confidentiality. • protect it from unauthorized modification, which is called integrity; • make it available to an authorized entity, which is called availability.
  • 3. Basic Concepts of Cryptography should accomplish the following goals: Confidentiality: protects the information from unauthorized access. Data integrity: ensures that the info has not been modified in an unauthorized way. Authentication: classified into two categories: Entity authentication: ensure identity. Message authentication: ensure original message source. Nonrepudiation: the receiver can prove that he receives the original info as the sender sends it.
  • 4. Cont… • In cryptography a cipher (or cypher) is an algorithm for performing encryption or decryption.
  • 5. Principles of Encryption • The basic idea of encryption is to modify the message in such a way that only a legal recipient can reconstruct its content . • Encryption can be used to protect data "at rest“. • protect data in transit (data being transferred via networks).
  • 6. Cont… • A discrete-valued cryptosystem can be characterized by: o A set of possible plaintexts, P o A set of possible ciphertexts, C o A set of possible cipher keys, K o A set of possible encryption and decryption transformations, E and D
  • 7. • The encryption procedure of a cipher can be described as: • The decryption procedure is defined as:
  • 8. Encryption Algorithms • Encryption algorithms are classified in various ways: according to 1. structures of the algorithms. 2. percentage of encrypted data. 3. Keys.
  • 9. 1. Classification according to Encryption Structure: 1. block ciphers. 2. stream ciphers. • A block cipher converts a fixed length block of plaintext data to a block of ciphertext data of the same length. • fixed length is called the block size block size is 64 or 128 bits Large block size : more secure, but complex
  • 10. Cont… Block ciphers can be characterized by: 1. Block size 2. Key size 3. Number of rounds 4. Encryption modes
  • 11. Modern block ciphers have the following features: 1. Variable key size 2. Mixed arithmetic operations. 3. Data-dependent rotations and key- dependent rotations. 4. key schedule algorithm 5. Variable plaintext/ciphertext block sizes and variable numbers of rounds
  • 12. Stream Ciphers • Operate on smaller units of plaintext. • Faster than a typical block cipher. • a stream cipher generates a sequence of bits as a key using PRNG. • PRNG expands a short secret key into a long string (key stream) and combining the key stream with the plaintext. • Have the following properties: They do not have perfect security. Security depends on the properties of the PRNG. Typical stream ciphers are very fast. The PRNG must be unpredictable.
  • 13. 2. Classification according to Keys • Depending on relationship between Kₑ and Kᵈ  Private-key cipher or a symmetric cipher when kₑ=kᵈ encryption/decryption key must be transmitted from the sender to the receiver via a separate secret channel. Public-key cipher or an asymmetric cipher When Kₑ ≠ Kᵈ The encryption key, Ke, is published. The decryption key, Kd, is kept private.
  • 14. 3.Classification according to Percentage of Encrypted Data • Full encryption. • Partial encryption.
  • 15. Cryptanalysis • Cryptanalysis is the art of decrypting an encrypted message without knowing the decryption key. • In a ciphertext-only attack, the adversary has access only to some encrypted messages. • A brute-force attack is a kind of ciphertext-only attack. It is based on a key search and well-designed cryptosystems should be computationally infeasible to attack. • known-plaintext attack, an adversary has some information about the plaintext and the corresponding given ciphertext.
  • 16. Conventional Symmetric Block Ciphers • Symmetric = the key used for encryption and decryption is the same. • block = the data (information) to be encrypted is divided into blocks of equal length. DES Double DES Triple DES IDEA Blowfish RC5 RC6 AES
  • 17. • Feistel cipher is a structure used in the construction of block ciphers ,it is also commonly known as a Feistel network. • encryption and decryption operations are very similar.
  • 18. • SP-network, or substitution- permutation network (SPN), is a series of linked mathematical operations used in block cipher algorithms .
  • 19. • Such a network takes a block of the plaintext and the key as inputs, and applies several alternating "rounds" or "layers" of (S- boxes) and permutation boxes (P-boxes) to produce the ciphertext block.
  • 20. Data Encryption Standard (DES) • Encrypts data in 64-bit blocks • The key is a 64-bit number. In every 8 bits, 1 bit (the least significant bit) is used for parity checking and can be ignored. • Based on four basic operations: expansion, permutation, XOR, and substitution.
  • 21. • The text devided into 64 bits bloks • Fed into initial permutation (IP). • each block is divided into two sub-blocks, each with 32-bit . • The right sub-block is fed into a Feistel function (f-function)
  • 22. • The text devided into 64 bits bloks • Fed into initial permutation (IP). • each block is divided into two sub-blocks, each with 32-bit . • The right sub-block is fed into a Feistel function (f-function)
  • 23. • Expansion: The half-block with 32 bits is expanded to 48 bits, The output contains eight 6-bit [8 × 6 = 48 bits] pieces.
  • 24. • A key-schedule mechanism derive 16subkeys with 48 bits from the main key. • Key Mixing: a subkey is combined with the result of the expansion using an XOR operation.
  • 25. • Substitution: The six input bits of each one of the eight S-boxes are replaced • with four output bits using a nonlinear transformation
  • 26. • Permutation: The 32 S-boxes’ outputs will be rearranged using a fixed permutation. The P- box is designed so that, after expansion, each group of S-box output bits is spread across six different S-boxes in the next round.
  • 27. Double DES • Encrypt every block twice using two different keys. • First encrypt a block using the first encryption key and then encrypt the resulting ciphertext with the second key. • The decryption is a process conducted in reverse.
  • 28. Triple DES • Performed by executing the DES three times. • key size of 168 bits • The triple DES is performed as follows: 1. Use key 1 for encryption. 2. Use key 2 for decryption. 3. Use key 3 for encryption • The choice among single, double,and triple DES is a trade-off between performance and security requirements.
  • 29. International Data Encryption Algorithm (IDEA) • The algorithm was intended as a replacement of the DES. • depends on 64-bit plaintext blocks • The key is 128 bits • It based on mixing operations from different algebraic groups (XOR, addition modulo, and multiplication modulo)
  • 30.
  • 31. Blowfish • A 64-bit block cipher using a variable length key. • The algorithm contains two parts: Key expansion: divides a key of 448 bits into different subkey arrays of 4168 bytes. Data encryption: contains a function iterated for 16 rounds. • Each round contains a key-dependent permutation and a key- and data-dependent substitution.
  • 32. Con.. • operations are additions and XORs
  • 33. RC5 Algorithm • The main feature of the RC5 is the heavy use of data-dependent rotations. • RC5 has a variable word size, w, a variable number of rounds, r, and a variable secret key with b bytes. It is represented as RC5 w/r/b.
  • 34. Con… • It provides high security when good parameters are chosen. • The RC5 is composed of encryption, decryption, and key expansion. • The expanded key contains t = 2 × (r + 1) words
  • 35. • The primitive operations of the RC5 are illustrated in following Table:
  • 36. RC5 Encryption Algorithm • We assume that the input block is given in two w-bit , A and B. • also assume that key expansion has already been performed so that S[0], S[1], …, S[t – 1] have been computed. • The steps of the encryption algorithm can be:
  • 37.
  • 38. RC5 Decryption Algorithm For i = r downto 1 do B = ((B - S [2i+1]) >>> A) ⊕ A; A = ((A - S [2]) >>> B) ⊕ B; End B = B-S [1]; A = A-S [0];
  • 39. RC5 Key Expansion • Key expansion expands the user’s secret key, K, to fill the expanded key array S, which makes S similar to an array of t = 2(r + 1). • Two constants, Pw and Qw, are used in this process.
  • 40. where e = 2.718281828459....(base of natural logarithms) ϕ = 1.618033988749....(golden ratio) and Odd(x) is the odd integer nearest to x • For w = 16 and 32, these constants are given in:
  • 41. • The expansion begins by copying the secret key K[0…b – 1] into an array L[0…c – 1] that has c = ⎡b/u⎤ words, where u = w/8 ( number of bytes per word) u consecutive key bytes of K are used to fill up each successive word in L in a low-order to high- order byte manner. • All unfilled byte positions of L are zeroed. • To initialize the array S, we follow these steps:
  • 42. Cont… • The last step is to mix the user secret key in three passes over the arrays S and L
  • 43. RC6 Algorithm • Modified version of RC5. • Uses four working registers instead of two. • RC6-w/r/b, derive more words from the user-supplied key for use during encryption and decryption. • The user supplies a key of b bytes, where 0 ≤ b ≤ 255. From this key, 2r + 4 words are derived and stored in the array S[0, …, 2r + 3]. • This array is used in both encryption and decryption
  • 44. • RC6 consists of two Feistel networks whose data are mixed via data-dependent rotations. • The operations in a single round of RC6 contain two applications of the: • squaring function f (x) = x (2x + 1) mod 2ˆ32, two fixed 32-bit rotations, two data- dependent 32-bit rotations, two XORs, and two additions modulo 2ˆ32.
  • 45. RC6 Encryption Algorithm Input: Four w-bit plaintext values are stored in registers A, B, C, and D. Number r of rounds w-bit round keys S[0…, 2r + 3] Output: Four w-bit ciphertext values are stored in registers A, B, C, and D.
  • 46.
  • 47.
  • 48. The Advanced Encryption Standard (AES) • an iterated block cipher algorithm with a variable block size and a variable key Size. • The block size and the key size can be 128, 192, or 256 bits. • The intermediate resulting ciphertext is called a state and it is in the form of a rectangular array of four rows and a number of columns equal to the block size divided by 32.
  • 49. • The cipher key is similarly a rectangular array with four rows and a number of columns equal to the key size divided by 32. • The number of rounds performed on the intermediate state is related to the key size. • For key sizes of 128, 192, and 256 bits, the number of rounds is 10, 12, and 14, respectively. • Each round consists of a fixed sequence of transformations, except the first and the last round. • The AES consists of rounds. Any round, except the final one, consists of subBytes, ShiftRows, MixColumns, and AddRoundKey operations. • In the final round, no MixColumns operation is performed.
  • 54. Modes of Operation • Block ciphers encrypt fixed-size blocks – e.g. DES encrypts 64-bit blocks • We need some way to encrypt a message of arbitrary length – e.g. a message of 1000 bytes • NIST(National Institute of Standards and Technology ) defines several ways to do it – called modes of operation
  • 55. Five Modes of Operation • Electronic codebook mode (ECB) • Cipher block chaining mode (CBC) • Cipher feedback mode (CFB) • Output feedback mode (OFB) • Counter mode (CTR)
  • 56. Electronic codebook (ECB) • ECB is the simplest mode. • data divided into blocks of equal sizes and each block is encrypted, separately, with the same encryption key.
  • 57. Con… • Advantage : there is no need to encrypt a file progressively ( suitable for database). Error is limited to single block. • Disadvantage: identical plaintext blocks are encrypted to identical ciphertext blocks; it does not hide data patterns (not suitable for image)
  • 58. Example of image encrypted by ECB
  • 59. Cipher Block Chaining (CBC) • Uses an initialization vector IV of size equal to the size of each block. • each block of plaintext is XORed with the previous ciphertext block before being encrypted.
  • 61. Con… • Suitable for image encryption. • Main disadvantage : an error in one ciphertext block impacts two plaintext blocks upon decryption. • Common
  • 62. Cipher Feedback (CFB) • In contrast to the CBC mode, the CFB mode begins by encrypting the IV, and then an XOR operation is performed between the bits of the encrypted IV and the corresponding bits of the first block.
  • 63. • Decryption algorithm • Encryption algorithm
  • 64. Output feedback mode (OFB) • Similar to the CFB mode. It begins by encrypting the IV. • The bits of the encrypted IV are XORed with the corresponding bits of the first plaintext block to get the corresponding ciphertext block. Also, the output of the encryption algorithm is used as an input to the next encryption step instead of the IV.
  • 65. • Encryption algorithm • Decryption algorithm
  • 66. Summary • Encryption algorithms are classified according to structure, keys and percentage of encrypted data. • Symmetric (private) vs asymmetric (public). • Common symmetric block cipher. • Modes of operations.
  • 67. • Reference from “Faragallah, Osama S.- Multilevel Security for Relational Databases- CRC Press (2014)”

Editor's Notes

  1. Authentication: the origin of a message can be verified. Integrity: proof that the contents of a message have not been changed since it was sent. Non-repudiation: the sender of a message cannot deny sending the message.
  2. 4. These define how messages larger than the block size are encrypted.
  3. Stream ciphers encrypt data as a sequence of bits, one bit at a time most e-commerce sites use to encrypt the data passing between the browser and Web server. Other stream ciphers include A5, which encrypts GSM cellphone traffic, and the cipher that encrypts satellite television signals.
  4. In a symmetric key algorithm the sender and receiver must have a shared key set up in advance and kept secret from all other parties; the sender uses this key for encryption, and the receiver uses the same key for decryption. The Feistel cipher uses a combination of substitution and transposition techniques. Most block cipher algorithms are based on this structure. In an asymmetric key algorithm (e.g., RSA), there are two separate keys: a public key is published and enables any sender to perform encryption, while a private key is kept secret by the receiver and enables only him to perform correct decryption.
  5. . The Feistel structure has the advantage that encryption and decryption operations are very similar, even identical in some cases, requiring only a reversal of the key schedule.