SlideShare a Scribd company logo
Block cipher modes of operation
Second Part
IV
• All these modes (except ECB) require an initialization vector, or IV --
a sort of 'dummy block' to kick off the process for the first real block,
and also to provide some randomization for the process. There is no
need for the IV to be secret, in most cases, but it is important that it
is never reused with the same key.
• The size of the IV depends on the encryption algorithm and on the
cryptographic protocol in use and is normally as large as the block
size of the cipher or as large as the encryption key
• The IV must be known to the recipient of the encrypted information
to be able to decrypt it. There are a number of ways to ensure that:
by transmitting the IV along with the packet, by agreeing on it
beforehand during the key exchange or the handshake,
Cipher modes of operation
• Any block cipher is essentially just a
monoalphabetic substitution cipher using big
characters (on 64 bits)
• �The same plaintext and the same key will
always generate the same ciphertext –this may
be exploited sometimes
• �E.g., this may be exploited to break the header
of a document if we know its structure
• �Five modes of operation (originally for DES,
applicable to any symmetric cipher) have been
defined
• �Describe them briefly in the following
Electronic Code Book (ECB) Mode
• This is the simplest way to use the cipher: break
the plaintext into 64-bit blocks and encrypt each
of them with the same key
• The last block should be padded to 64-bit if it is
shorter
• Note: same block and same key always yields
same cipher block
• This can be easily attacked:
• If the message always starts with a predefined
header, then the attacker may have a number of
known plain-cipher pairs
Cipher Block Chaining Mode (CBC)
• �Devised to defeat the previous
attack
• �All cipher blocks will be chained
so that if one is modified, the
cipher text cannot be decrypted
correctly (will only produce
“garbage”)
• �Each plaintext block is XORed
with the previous cipher block
before encryption
• �The first plaintext block is
XORed with an initialization vector
IV
• �An initialization vector (IV), also
known as Initialization Value, is a term
in Cryptography. IV is a block of bits
that is combined with the first block of
data in any of several modes of a
block cipher.
Cipher Feedback Mode (CFB)
• makes a block cipher into a self-
synchronizing stream cipher. �
• Use a shift register (64 bit for DES, 128 bit for AES, etc)
that is initially set to an initialization vector IV
• Encrypt the content of the register, take leftmost byte of
the cipher and XOR with the current plaintext byte P –the
result C is transmitted, register is left shifted with one
byte and C is placed in the rightmost byte of the register
• Decryption works exactly the same way: note that one
must use the encryption box here
Output Feedback Mode (OFB)
(also known as Stream Cipher Mode)
• If affecting 64 bits (for DES, 128 bits for AES) by one
single inverted bit is too much for an application, use
OFB
• Encrypt an IV to get an output block; this block is them
encrypted to get a second block, etc. –this is the key
stream and it will be treated as a one-time pad and
XORed with the plaintext to get the ciphertext
• Key stream is independent of the data and can be
computed in advance
• For decryption generate the same key stream using the
IV and the key
• 1-bit error in the transmission only affects 1-bit in the
ciphertext and in the decryption
Counter Mode
• �Files are sometimes kept on computers in encrypted form�
• All modes of operations except ECB make random access to the file
impossible: to access data at the end of the file one has to decrypt
everything�
• Counter Mode fixes this problem
• �Plaintext is not encrypted directly
• �IV plus a constant is encrypted and the resulting ciphertext is
XORed with the plaintext –add 1 to IV in each step
• �Note: if the same IV is used twice with the same key, then
cryptanalyst may XOR the ciphers to get the XOR of the plaintexts –
this could be used in an attack�
– IV must be random!�
– Encryption/decryption in parallel for multiple blocks�
– Simple: decryption algorithm not needed�
– Random access to the file
RC5
• Symmetric encryption algorithm developed by Rivest; in (RSA DATA
SECURITY)
• RSA (which stands for Rivest, Shamir and Adleman who first publicly came
up with an encrption algo for public-key cryptography.
• �Characteristics of RC5
– �Suitable for hardware and software: uses only common operations found on
microprocessors
– �Fast: simple and word oriented
– �Adaptable to processors of different word lengths:
– �Variable number of rounds: number of rounds is the 2nd
parameter
– �Variable-length key: key length is the 3rdparameter of RC5
– �Simple: easy to implement and analyze
– �Low memory requirement: suitable for smart cards or other devices with limited
memory
– �High security
– �Data-dependent rotations
RC5
• Parameters
– w is the word size in bits –RC5 encrypts blocks of 2 words. Allowed values: 16,
32, 64
– r is the number of rounds. Allowed values: 0,1,…,255
– b is the number of 8-bit bytes in the secret key K. Allowed values: 0,1,…,255
• A specific version of RC5 is denoted RC5-w/r/b
– The author advises to use RC5-32/12/16 as the “nominal” version
– That means: 64-bit plaintext/ciphertext blocks, 12 rounds, 128-bit key
• Algorithm
– Key expansion
– Input manipulation
• �Details are on the following slides:
– where addition and subtraction (+ and -) are modulo 2w
– bitwise XOR is ⊕
– x<<<y is the circular left-shift of x by y bits
– x>>>y is the circular right-shift of word x by y bits
RC4 Stream Cipher
• This is the most popular symmetric stream
cipher
• Designed by Rivest for RSA Security
• Used in SSL/TLS (Secure Sockets
Layer/Transport Layer Security) standards for
secure communication between Web browsers
and servers
• Used in WEP, part of the IEEE 802.11 wireless
LAN standard
• RC4 was kept as a trade secret by RSA Inc but
got anonymously posted on the Internet in 1994
Stream cipher structure
• �Process the message byte by byte (as a stream)
• �Typically have a (pseudo) random stream key that is
XORed with plaintext bit by bit
• �Randomness of stream key completely destroys any
statistically properties in the message
• �Ci= Mi XOR Stream Key i
• �The simplest encryption/decryption algorithm possible!
• �A stream cipher is similar to the one-time pad
discussed a few lectures back
• ��One must never reuse stream key
– �Otherwise can remove effect and recover messages
– �XOR two ciphertexts obtained with the same key stream to
obtain the XOR of the plaintext.
Stream cipher design
• �Key stream should have a large period –a
pseudorandom number generator uses a function that
produces a deterministic (if given the same input
information will always produce the same output )
stream of bits that eventually repeats
• �If treated as a stream of bytes, all 255 values should
occur with the same frequency
• �Key should be long enough to protect against brute-
force attack
• �At least 128 bits
• �Advantage over block ciphers: generating the stream
key is much faster than encrypting and decrypting and
less code is needed
RC4 algorithm
• Key length is variable: from 1 to 256 bytes
• Based on the key initialize a 256-byte
state vector S: S[0…255]
• At all times S contains a permutation of
the numbers 0, 1, …, 255
• For encryption and decryption a byte k is
selected from S and the entries in S are
permuted

More Related Content

What's hot

Cryptography
CryptographyCryptography
Cryptography
Jens Patel
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
SAurabh PRajapati
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standard
Vasuki Ramasamy
 
Block ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptographyBlock ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptography
RAMPRAKASHT1
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 
Cryptography
CryptographyCryptography
Cryptography
Darshini Parikh
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
Rashmi Burugupalli
 
6. cryptography
6. cryptography6. cryptography
6. cryptography7wounders
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
Sunita Kharayat
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
Transposition cipher
Transposition cipherTransposition cipher
Transposition cipher
Antony Alex
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
Shubham Jain
 
Cryptography
CryptographyCryptography
Cryptography
IGZ Software house
 
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
Shafaan Khaliq Bhatti
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
ArthyR3
 
Ch11 Basic Cryptography
Ch11 Basic CryptographyCh11 Basic Cryptography
Ch11 Basic Cryptography
Information Technology
 
Key Management and Distribution
Key Management and DistributionKey Management and Distribution
Key Management and Distribution
Syed Bahadur Shah
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
Hossain Md Shakhawat
 
Modes of Operation
Modes of Operation Modes of Operation
Modes of Operation
Showkot Usman
 

What's hot (20)

Cryptography
CryptographyCryptography
Cryptography
 
Idea(international data encryption algorithm)
Idea(international data encryption algorithm)Idea(international data encryption algorithm)
Idea(international data encryption algorithm)
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standard
 
Block ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptographyBlock ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptography
 
RC4&RC5
RC4&RC5RC4&RC5
RC4&RC5
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
 
Diffie hellman key exchange algorithm
Diffie hellman key exchange algorithmDiffie hellman key exchange algorithm
Diffie hellman key exchange algorithm
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
 
Transposition cipher
Transposition cipherTransposition cipher
Transposition cipher
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
 
Cryptography
CryptographyCryptography
Cryptography
 
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
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Ch11 Basic Cryptography
Ch11 Basic CryptographyCh11 Basic Cryptography
Ch11 Basic Cryptography
 
Key Management and Distribution
Key Management and DistributionKey Management and Distribution
Key Management and Distribution
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
Modes of Operation
Modes of Operation Modes of Operation
Modes of Operation
 

Viewers also liked

Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
Roman Oliynykov
 
Cipher block modes
Cipher block modesCipher block modes
Cipher block modes
Joshua Thijssen
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
kusum sharma
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DES
Hemant Sharma
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSA
Shafaan Khaliq Bhatti
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
Adam Reagan
 
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
 
Authentication: keys, MAC
Authentication: keys, MACAuthentication: keys, MAC
Authentication: keys, MAC
Shafaan Khaliq Bhatti
 
Protocols for Public Key Management
Protocols for Public Key ManagementProtocols for Public Key Management
Protocols for Public Key Management
Shafaan Khaliq Bhatti
 
Chapter 1: Overview of Network Security
Chapter 1: Overview of Network SecurityChapter 1: Overview of Network Security
Chapter 1: Overview of Network Security
Shafaan Khaliq Bhatti
 
Chapter 2: Network Models
Chapter 2: Network ModelsChapter 2: Network Models
Chapter 2: Network Models
Shafaan Khaliq Bhatti
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniquesMohd Arif
 
Message Authentication: MAC, Hashes
Message Authentication: MAC, HashesMessage Authentication: MAC, Hashes
Message Authentication: MAC, Hashes
Shafaan Khaliq Bhatti
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
saurav5884
 
Introduction to Digital signatures
Introduction to Digital signaturesIntroduction to Digital signatures
Introduction to Digital signaturesRohit Bhat
 
Endo Pat2000 Sales Presentation
Endo Pat2000 Sales PresentationEndo Pat2000 Sales Presentation
Endo Pat2000 Sales Presentation
rllalpha
 
Simple english grammar
Simple english grammarSimple english grammar
Simple english grammarrestuputraku5
 
Joomla e seo reifison
Joomla e seo   reifisonJoomla e seo   reifison
Joomla e seo reifisonreifison
 
Enhanced Computer Vision with Microsoft Kinect Sensor: A Review
Enhanced Computer Vision with Microsoft Kinect Sensor: A ReviewEnhanced Computer Vision with Microsoft Kinect Sensor: A Review
Enhanced Computer Vision with Microsoft Kinect Sensor: A ReviewAbu Saleh Musa
 

Viewers also liked (20)

Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
Cipher block modes
Cipher block modesCipher block modes
Cipher block modes
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DES
 
Public key cryptography and RSA
Public key cryptography and RSAPublic key cryptography and RSA
Public key cryptography and RSA
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
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
 
Authentication: keys, MAC
Authentication: keys, MACAuthentication: keys, MAC
Authentication: keys, MAC
 
Protocols for Public Key Management
Protocols for Public Key ManagementProtocols for Public Key Management
Protocols for Public Key Management
 
Chapter 1: Overview of Network Security
Chapter 1: Overview of Network SecurityChapter 1: Overview of Network Security
Chapter 1: Overview of Network Security
 
Chapter 2: Network Models
Chapter 2: Network ModelsChapter 2: Network Models
Chapter 2: Network Models
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
 
Message Authentication: MAC, Hashes
Message Authentication: MAC, HashesMessage Authentication: MAC, Hashes
Message Authentication: MAC, Hashes
 
Digital Signature
Digital SignatureDigital Signature
Digital Signature
 
Introduction to Digital signatures
Introduction to Digital signaturesIntroduction to Digital signatures
Introduction to Digital signatures
 
Changes in me
Changes in meChanges in me
Changes in me
 
Endo Pat2000 Sales Presentation
Endo Pat2000 Sales PresentationEndo Pat2000 Sales Presentation
Endo Pat2000 Sales Presentation
 
Simple english grammar
Simple english grammarSimple english grammar
Simple english grammar
 
Joomla e seo reifison
Joomla e seo   reifisonJoomla e seo   reifison
Joomla e seo reifison
 
Enhanced Computer Vision with Microsoft Kinect Sensor: A Review
Enhanced Computer Vision with Microsoft Kinect Sensor: A ReviewEnhanced Computer Vision with Microsoft Kinect Sensor: A Review
Enhanced Computer Vision with Microsoft Kinect Sensor: A Review
 

Similar to Block Ciphers Modes of Operation

ch06.ppt
ch06.pptch06.ppt
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
Sam Bowne
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
Sam Bowne
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
Haris Ahmed
 
DEC algorithm
DEC algorithmDEC algorithm
DEC algorithm
vss gowtham
 
Fundamentals of Information Encryption
Fundamentals of Information EncryptionFundamentals of Information Encryption
Fundamentals of Information Encryption
Amna Magzoub
 
CNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersCNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream Ciphers
Sam Bowne
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
DR RICHMOND ADEBIAYE
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
ssuserd5e356
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
Sam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
Sam Bowne
 
DES-lecture (1).ppt
DES-lecture (1).pptDES-lecture (1).ppt
DES-lecture (1).ppt
MrsPrabhaBV
 
Module 2.pptx
Module 2.pptxModule 2.pptx
Module 2.pptx
seethal9
 
block ciphermodes of operation.pptx
block ciphermodes of operation.pptxblock ciphermodes of operation.pptx
block ciphermodes of operation.pptx
DEEPAK948083
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
Sam Bowne
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
Sam Bowne
 
CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)
Sam Bowne
 
CNIT 141 5. Stream Ciphers
CNIT 141 5. Stream CiphersCNIT 141 5. Stream Ciphers
CNIT 141 5. Stream Ciphers
Sam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
Sam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
Sam Bowne
 

Similar to Block Ciphers Modes of Operation (20)

ch06.ppt
ch06.pptch06.ppt
ch06.ppt
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
 
Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
DEC algorithm
DEC algorithmDEC algorithm
DEC algorithm
 
Fundamentals of Information Encryption
Fundamentals of Information EncryptionFundamentals of Information Encryption
Fundamentals of Information Encryption
 
CNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersCNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream Ciphers
 
Symmetric encryption
Symmetric encryptionSymmetric encryption
Symmetric encryption
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
DES-lecture (1).ppt
DES-lecture (1).pptDES-lecture (1).ppt
DES-lecture (1).ppt
 
Module 2.pptx
Module 2.pptxModule 2.pptx
Module 2.pptx
 
block ciphermodes of operation.pptx
block ciphermodes of operation.pptxblock ciphermodes of operation.pptx
block ciphermodes of operation.pptx
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. Encryption
 
CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)
 
CNIT 141 5. Stream Ciphers
CNIT 141 5. Stream CiphersCNIT 141 5. Stream Ciphers
CNIT 141 5. Stream Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 

More from Shafaan Khaliq Bhatti

1- Introduction to Red Hat
1- Introduction to Red Hat1- Introduction to Red Hat
1- Introduction to Red Hat
Shafaan Khaliq Bhatti
 
Linux Servers
Linux ServersLinux Servers
Linux Servers
Shafaan Khaliq Bhatti
 
5 - Networking in Red Hat
5 - Networking in Red Hat5 - Networking in Red Hat
5 - Networking in Red Hat
Shafaan Khaliq Bhatti
 
2- System Initialization in Red Hat
2- System Initialization in Red Hat2- System Initialization in Red Hat
2- System Initialization in Red Hat
Shafaan Khaliq Bhatti
 
3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat
Shafaan Khaliq Bhatti
 
6 - Package Management in Red Hat
6 - Package Management in Red Hat6 - Package Management in Red Hat
6 - Package Management in Red Hat
Shafaan Khaliq Bhatti
 
11 - SELinux in Red Hat
11 - SELinux in Red Hat11 - SELinux in Red Hat
11 - SELinux in Red Hat
Shafaan Khaliq Bhatti
 
7 - User Administration in Red Hat
7 - User Administration in Red Hat7 - User Administration in Red Hat
7 - User Administration in Red Hat
Shafaan Khaliq Bhatti
 
12 - System Security in Red Hat
12 - System Security in Red Hat12 - System Security in Red Hat
12 - System Security in Red Hat
Shafaan Khaliq Bhatti
 
15 lecture - acl part1, introduction to access control list
15   lecture  - acl part1, introduction to access control list15   lecture  - acl part1, introduction to access control list
15 lecture - acl part1, introduction to access control list
Shafaan Khaliq Bhatti
 
13 lecture - introduction and configuration of eigrp
13   lecture  - introduction and configuration of eigrp13   lecture  - introduction and configuration of eigrp
13 lecture - introduction and configuration of eigrp
Shafaan Khaliq Bhatti
 
10 lecture - ospf part1 , introduction to ospf , areas and abr
10   lecture  - ospf part1 , introduction to ospf , areas and abr10   lecture  - ospf part1 , introduction to ospf , areas and abr
10 lecture - ospf part1 , introduction to ospf , areas and abr
Shafaan Khaliq Bhatti
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
Shafaan Khaliq Bhatti
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
Shafaan Khaliq Bhatti
 
Chapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating SystemChapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating System
Shafaan Khaliq Bhatti
 
Chapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and NetworksChapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and Networks
Shafaan Khaliq Bhatti
 
Chapter 20: Internet Protocol
Chapter 20: Internet ProtocolChapter 20: Internet Protocol
Chapter 20: Internet Protocol
Shafaan Khaliq Bhatti
 
Chapter 19: Logical Addressing
Chapter 19: Logical AddressingChapter 19: Logical Addressing
Chapter 19: Logical Addressing
Shafaan Khaliq Bhatti
 
Chapter 8: Switching
Chapter 8: SwitchingChapter 8: Switching
Chapter 8: Switching
Shafaan Khaliq Bhatti
 
Chapter 7: Transmission Media
Chapter 7: Transmission MediaChapter 7: Transmission Media
Chapter 7: Transmission Media
Shafaan Khaliq Bhatti
 

More from Shafaan Khaliq Bhatti (20)

1- Introduction to Red Hat
1- Introduction to Red Hat1- Introduction to Red Hat
1- Introduction to Red Hat
 
Linux Servers
Linux ServersLinux Servers
Linux Servers
 
5 - Networking in Red Hat
5 - Networking in Red Hat5 - Networking in Red Hat
5 - Networking in Red Hat
 
2- System Initialization in Red Hat
2- System Initialization in Red Hat2- System Initialization in Red Hat
2- System Initialization in Red Hat
 
3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat3 - Disk Partitioning in Red Hat
3 - Disk Partitioning in Red Hat
 
6 - Package Management in Red Hat
6 - Package Management in Red Hat6 - Package Management in Red Hat
6 - Package Management in Red Hat
 
11 - SELinux in Red Hat
11 - SELinux in Red Hat11 - SELinux in Red Hat
11 - SELinux in Red Hat
 
7 - User Administration in Red Hat
7 - User Administration in Red Hat7 - User Administration in Red Hat
7 - User Administration in Red Hat
 
12 - System Security in Red Hat
12 - System Security in Red Hat12 - System Security in Red Hat
12 - System Security in Red Hat
 
15 lecture - acl part1, introduction to access control list
15   lecture  - acl part1, introduction to access control list15   lecture  - acl part1, introduction to access control list
15 lecture - acl part1, introduction to access control list
 
13 lecture - introduction and configuration of eigrp
13   lecture  - introduction and configuration of eigrp13   lecture  - introduction and configuration of eigrp
13 lecture - introduction and configuration of eigrp
 
10 lecture - ospf part1 , introduction to ospf , areas and abr
10   lecture  - ospf part1 , introduction to ospf , areas and abr10   lecture  - ospf part1 , introduction to ospf , areas and abr
10 lecture - ospf part1 , introduction to ospf , areas and abr
 
Chapter 3: Processes
Chapter 3: ProcessesChapter 3: Processes
Chapter 3: Processes
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System Structures
 
Chapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating SystemChapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating System
 
Chapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and NetworksChapter 1: Introduction to Data Communication and Networks
Chapter 1: Introduction to Data Communication and Networks
 
Chapter 20: Internet Protocol
Chapter 20: Internet ProtocolChapter 20: Internet Protocol
Chapter 20: Internet Protocol
 
Chapter 19: Logical Addressing
Chapter 19: Logical AddressingChapter 19: Logical Addressing
Chapter 19: Logical Addressing
 
Chapter 8: Switching
Chapter 8: SwitchingChapter 8: Switching
Chapter 8: Switching
 
Chapter 7: Transmission Media
Chapter 7: Transmission MediaChapter 7: Transmission Media
Chapter 7: Transmission Media
 

Recently uploaded

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 

Recently uploaded (20)

CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 

Block Ciphers Modes of Operation

  • 1. Block cipher modes of operation Second Part
  • 2. IV • All these modes (except ECB) require an initialization vector, or IV -- a sort of 'dummy block' to kick off the process for the first real block, and also to provide some randomization for the process. There is no need for the IV to be secret, in most cases, but it is important that it is never reused with the same key. • The size of the IV depends on the encryption algorithm and on the cryptographic protocol in use and is normally as large as the block size of the cipher or as large as the encryption key • The IV must be known to the recipient of the encrypted information to be able to decrypt it. There are a number of ways to ensure that: by transmitting the IV along with the packet, by agreeing on it beforehand during the key exchange or the handshake,
  • 3. Cipher modes of operation • Any block cipher is essentially just a monoalphabetic substitution cipher using big characters (on 64 bits) • �The same plaintext and the same key will always generate the same ciphertext –this may be exploited sometimes • �E.g., this may be exploited to break the header of a document if we know its structure • �Five modes of operation (originally for DES, applicable to any symmetric cipher) have been defined • �Describe them briefly in the following
  • 4. Electronic Code Book (ECB) Mode • This is the simplest way to use the cipher: break the plaintext into 64-bit blocks and encrypt each of them with the same key • The last block should be padded to 64-bit if it is shorter • Note: same block and same key always yields same cipher block • This can be easily attacked: • If the message always starts with a predefined header, then the attacker may have a number of known plain-cipher pairs
  • 5.
  • 6. Cipher Block Chaining Mode (CBC) • �Devised to defeat the previous attack • �All cipher blocks will be chained so that if one is modified, the cipher text cannot be decrypted correctly (will only produce “garbage”) • �Each plaintext block is XORed with the previous cipher block before encryption • �The first plaintext block is XORed with an initialization vector IV • �An initialization vector (IV), also known as Initialization Value, is a term in Cryptography. IV is a block of bits that is combined with the first block of data in any of several modes of a block cipher.
  • 7. Cipher Feedback Mode (CFB) • makes a block cipher into a self- synchronizing stream cipher. � • Use a shift register (64 bit for DES, 128 bit for AES, etc) that is initially set to an initialization vector IV • Encrypt the content of the register, take leftmost byte of the cipher and XOR with the current plaintext byte P –the result C is transmitted, register is left shifted with one byte and C is placed in the rightmost byte of the register • Decryption works exactly the same way: note that one must use the encryption box here
  • 8.
  • 9.
  • 10. Output Feedback Mode (OFB) (also known as Stream Cipher Mode) • If affecting 64 bits (for DES, 128 bits for AES) by one single inverted bit is too much for an application, use OFB • Encrypt an IV to get an output block; this block is them encrypted to get a second block, etc. –this is the key stream and it will be treated as a one-time pad and XORed with the plaintext to get the ciphertext • Key stream is independent of the data and can be computed in advance • For decryption generate the same key stream using the IV and the key • 1-bit error in the transmission only affects 1-bit in the ciphertext and in the decryption
  • 11.
  • 12.
  • 13. Counter Mode • �Files are sometimes kept on computers in encrypted form� • All modes of operations except ECB make random access to the file impossible: to access data at the end of the file one has to decrypt everything� • Counter Mode fixes this problem • �Plaintext is not encrypted directly • �IV plus a constant is encrypted and the resulting ciphertext is XORed with the plaintext –add 1 to IV in each step • �Note: if the same IV is used twice with the same key, then cryptanalyst may XOR the ciphers to get the XOR of the plaintexts – this could be used in an attack� – IV must be random!� – Encryption/decryption in parallel for multiple blocks� – Simple: decryption algorithm not needed� – Random access to the file
  • 14.
  • 15. RC5 • Symmetric encryption algorithm developed by Rivest; in (RSA DATA SECURITY) • RSA (which stands for Rivest, Shamir and Adleman who first publicly came up with an encrption algo for public-key cryptography. • �Characteristics of RC5 – �Suitable for hardware and software: uses only common operations found on microprocessors – �Fast: simple and word oriented – �Adaptable to processors of different word lengths: – �Variable number of rounds: number of rounds is the 2nd parameter – �Variable-length key: key length is the 3rdparameter of RC5 – �Simple: easy to implement and analyze – �Low memory requirement: suitable for smart cards or other devices with limited memory – �High security – �Data-dependent rotations
  • 16. RC5 • Parameters – w is the word size in bits –RC5 encrypts blocks of 2 words. Allowed values: 16, 32, 64 – r is the number of rounds. Allowed values: 0,1,…,255 – b is the number of 8-bit bytes in the secret key K. Allowed values: 0,1,…,255 • A specific version of RC5 is denoted RC5-w/r/b – The author advises to use RC5-32/12/16 as the “nominal” version – That means: 64-bit plaintext/ciphertext blocks, 12 rounds, 128-bit key • Algorithm – Key expansion – Input manipulation • �Details are on the following slides: – where addition and subtraction (+ and -) are modulo 2w – bitwise XOR is ⊕ – x<<<y is the circular left-shift of x by y bits – x>>>y is the circular right-shift of word x by y bits
  • 17.
  • 18. RC4 Stream Cipher • This is the most popular symmetric stream cipher • Designed by Rivest for RSA Security • Used in SSL/TLS (Secure Sockets Layer/Transport Layer Security) standards for secure communication between Web browsers and servers • Used in WEP, part of the IEEE 802.11 wireless LAN standard • RC4 was kept as a trade secret by RSA Inc but got anonymously posted on the Internet in 1994
  • 19. Stream cipher structure • �Process the message byte by byte (as a stream) • �Typically have a (pseudo) random stream key that is XORed with plaintext bit by bit • �Randomness of stream key completely destroys any statistically properties in the message • �Ci= Mi XOR Stream Key i • �The simplest encryption/decryption algorithm possible! • �A stream cipher is similar to the one-time pad discussed a few lectures back • ��One must never reuse stream key – �Otherwise can remove effect and recover messages – �XOR two ciphertexts obtained with the same key stream to obtain the XOR of the plaintext.
  • 20.
  • 21. Stream cipher design • �Key stream should have a large period –a pseudorandom number generator uses a function that produces a deterministic (if given the same input information will always produce the same output ) stream of bits that eventually repeats • �If treated as a stream of bytes, all 255 values should occur with the same frequency • �Key should be long enough to protect against brute- force attack • �At least 128 bits • �Advantage over block ciphers: generating the stream key is much faster than encrypting and decrypting and less code is needed
  • 22. RC4 algorithm • Key length is variable: from 1 to 256 bytes • Based on the key initialize a 256-byte state vector S: S[0…255] • At all times S contains a permutation of the numbers 0, 1, …, 255 • For encryption and decryption a byte k is selected from S and the entries in S are permuted