SlideShare ist ein Scribd-Unternehmen logo
1 von 22
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

Weitere ähnliche Inhalte

Was ist angesagt?

CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
CNIT 141: 6. Hash Functions
CNIT 141: 6. Hash FunctionsCNIT 141: 6. Hash Functions
CNIT 141: 6. Hash FunctionsSam Bowne
 
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
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation harshit chavda
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithmsRashmi Burugupalli
 
2. Stream Ciphers
2. Stream Ciphers2. Stream Ciphers
2. Stream CiphersSam Bowne
 
Diffie Hellman Key Exchange
Diffie Hellman Key ExchangeDiffie Hellman Key Exchange
Diffie Hellman Key ExchangeSAURABHDHAGE6
 
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
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distributionRiya Choudhary
 
Substitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSubstitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSunil Meena
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptographyYasser Ali
 
Different types of Symmetric key Cryptography
Different types of Symmetric key CryptographyDifferent types of Symmetric key Cryptography
Different types of Symmetric key Cryptographysubhradeep mitra
 
Ch03 Ch06 Des And Others
Ch03 Ch06 Des And OthersCh03 Ch06 Des And Others
Ch03 Ch06 Des And Othersnathanurag
 

Was ist angesagt? (20)

Modes of Operation
Modes of Operation Modes of Operation
Modes of Operation
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
DES
DESDES
DES
 
CNIT 141: 6. Hash Functions
CNIT 141: 6. Hash FunctionsCNIT 141: 6. Hash Functions
CNIT 141: 6. Hash Functions
 
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 (...
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
 
Feistel cipher
Feistel cipherFeistel cipher
Feistel cipher
 
Ch02 classic nemo
Ch02 classic nemoCh02 classic nemo
Ch02 classic nemo
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
2. Stream Ciphers
2. Stream Ciphers2. Stream Ciphers
2. Stream Ciphers
 
Hash Function
Hash Function Hash Function
Hash Function
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Diffie Hellman Key Exchange
Diffie Hellman Key ExchangeDiffie Hellman Key Exchange
Diffie Hellman Key Exchange
 
Unit 2
Unit 2Unit 2
Unit 2
 
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
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Substitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSubstitution cipher and Its Cryptanalysis
Substitution cipher and Its Cryptanalysis
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Different types of Symmetric key Cryptography
Different types of Symmetric key CryptographyDifferent types of Symmetric key Cryptography
Different types of Symmetric key Cryptography
 
Ch03 Ch06 Des And Others
Ch03 Ch06 Des And OthersCh03 Ch06 Des And Others
Ch03 Ch06 Des And Others
 

Andere mochten auch

block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
 
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
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DESHemant Sharma
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam 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
 
Chapter 1: Overview of Network Security
Chapter 1: Overview of Network SecurityChapter 1: Overview of Network Security
Chapter 1: Overview of Network SecurityShafaan Khaliq Bhatti
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniquesMohd Arif
 
Digital Signature
Digital SignatureDigital Signature
Digital Signaturesaurav5884
 
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 Presentationrllalpha
 
Simple english grammar
Simple english grammarSimple english grammar
Simple english grammarrestuputraku5
 

Andere mochten auch (20)

block ciphers
block ciphersblock ciphers
block ciphers
 
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
 
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
 
Block Cipher
Block CipherBlock Cipher
Block Cipher
 
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
 

Ähnlich wie Block Ciphers Modes of Operation

CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. EncryptionSam Bowne
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. EncryptionSam Bowne
 
Fundamentals of Information Encryption
Fundamentals of Information EncryptionFundamentals of Information Encryption
Fundamentals of Information EncryptionAmna Magzoub
 
CNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersCNIT 141: 5. Stream Ciphers
CNIT 141: 5. Stream CiphersSam Bowne
 
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4  CRYPTOGRAPHIC SYSTEMS.pptxUNIT 4  CRYPTOGRAPHIC SYSTEMS.pptx
UNIT 4 CRYPTOGRAPHIC SYSTEMS.pptxssuserd5e356
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. EncryptionSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
DES-lecture (1).ppt
DES-lecture (1).pptDES-lecture (1).ppt
DES-lecture (1).pptMrsPrabhaBV
 
Module 2.pptx
Module 2.pptxModule 2.pptx
Module 2.pptxseethal9
 
block ciphermodes of operation.pptx
block ciphermodes of operation.pptxblock ciphermodes of operation.pptx
block ciphermodes of operation.pptxDEEPAK948083
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 1. Encryption
CNIT 141: 1. EncryptionCNIT 141: 1. Encryption
CNIT 141: 1. EncryptionSam 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 CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)Sam Bowne
 

Ähnlich wie 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
 
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
 
CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)
 

Mehr von 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 listShafaan 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 eigrpShafaan 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 abrShafaan Khaliq Bhatti
 
Chapter 2: Operating System Structures
Chapter 2: Operating System StructuresChapter 2: Operating System Structures
Chapter 2: Operating System StructuresShafaan Khaliq Bhatti
 
Chapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating SystemChapter 1: Introduction to Operating System
Chapter 1: Introduction to Operating SystemShafaan 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 NetworksShafaan Khaliq Bhatti
 

Mehr von 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
 

Kürzlich hochgeladen

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 

Kürzlich hochgeladen (20)

How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

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