Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor...
-
Upload
dana-turner -
Category
Documents
-
view
212 -
download
0
Transcript of Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor...
![Page 1: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/1.jpg)
Privacy and Integrity:“ Two Essences of Network Security”
Presenter
Prosanta Gope
AdvisorTzonelih
Hwang
Quantum Information and Network Security Lab, NCKU,2015
![Page 2: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/2.jpg)
Flash Back
![Page 3: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/3.jpg)
What we will do if the message size is shorter or larger than the block size?
Say, message Size =224 bit
Block Cipher Supported = 64 bit DES
![Page 4: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/4.jpg)
4
Modes of Operationpacket packetpacket
encrypted packet
encrypted packet
encrypted packet ….….
=
𝐾Encrypt
𝑃1
𝐾Encrypt
𝑃2
𝐾Encrypt
𝑃𝑁
…..
𝐶1 𝐶𝑁𝐶2
ex.ECB mode
BIG PLAINTEXTpacket
![Page 5: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/5.jpg)
Modes of OperationWhy we need to use Modes of Operation?
I. Adapt cryptographic algorithm to applications. II. Increase the strength of a cryptographic algorithmIII. It is necessary to divide bigger plaintext into fixed sized blocks so that cipher can
work on it. (i.e.DES-64bit) i.e. Apply block cipher to a sequence of data blocks or data stream
5
packet packetpacket ….….
DES DES DES
![Page 6: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/6.jpg)
Conventional Modes of Operations
– Electronic Codebook Mode (ECB)– Cipher Block Chaining Mode (CBC) – Cipher Feedback Mode (CFB)– Output Feedback Mode (OFB)– CTR
6
![Page 7: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/7.jpg)
ECB: Electronic Codebook
7
![Page 8: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/8.jpg)
Notations.
– encryption key shared between two entities
- mathematical XOR
– Let P be the message to be encrypted, which is divided into { …}
– Let C be the message to be encrypted, which is divided into { …},
8
![Page 9: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/9.jpg)
Electronic Codebook Book (ECB)
![Page 10: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/10.jpg)
Electronic Codebook Book (ECB)
• message is broken into independent blocks which are encrypted
• each block is a value which is substituted, like a codebook, hence name
• each block is encoded independently of the other blocks Ci = EK(Pi)
• uses: secure transmission of single values
![Page 11: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/11.jpg)
8.11
The simplest mode of operation is called the electronic codebook (ECB) mode.
Electronic Codebook (ECB) Mode
Figure Electronic codebook (ECB) mode
![Page 12: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/12.jpg)
Advantages and Limitations of ECB
message repetitions may show in ciphertext weakness is due to the encrypted message blocks being
independent main use is sending a few blocks of data
![Page 13: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/13.jpg)
An Email between Alice and Bob with Following Header
Alice Bob
{Date: Tue, 21 Oct 2014 13: 34:47}EK
Trudy
Cipher-text Starts With the Encrypted Version of : “Date :Tue” Often Occur on Tuesday
So, Trudy Might be able to Guess Without Knowing the Plaintext that Such Messages are Email on Tuesday.
![Page 14: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/14.jpg)
8.14
Electronic Codebook (ECB)
• Does not hide data patterns, unsuitable for long messages– Wiki example: pixel map using ECB
Plain text ECB mode Other modes
• Susceptible to replay attacks– Example: a wired transfer transaction can be replayed by resending the original message)
![Page 15: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/15.jpg)
Other Issues?
![Page 16: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/16.jpg)
Part 1 Cryptography 16
ECB Cut and Paste• Suppose plaintext is
Alice asks Bob. Trudy asks Tom.• Assuming 64-bit blocks and 8-bit ASCII:
P0 = “Alice as”, P1 = “ks Bob. ”,P2 = “Trudy as”, P3 = “ks Tom. ”
• Ciphertext: C0,C1,C2,C3
• Trudy cuts and pastes: C0,C3,C2,C1
• Decrypts asAlice asks Tom. Trudy asks Bob.
![Page 17: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/17.jpg)
Questions?
![Page 18: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/18.jpg)
Cipher Block Chaining (CBC)
![Page 19: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/19.jpg)
Cipher Block Chaining
(CBC)
![Page 20: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/20.jpg)
Cipher Block Chaining (CBC)
• message is broken into blocks • each previous cipher blocks is chained with current
plaintext block, hence name • use Initial Vector (IV) to start process
Ci = EK(Pi XOR Ci-1)
C-1 = IV
• uses: bulk data encryption, authentication
![Page 21: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/21.jpg)
Weaknesses of CBC
A. Unable to eliminate the problem of some one modifying in transit. That to Leads security vulnerabilities “Bit Flipping Attack”.
B. Unable to detect “Rearranging of the Cipher Blocks”.C. Unable to assure “Integrity Protection”.
![Page 22: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/22.jpg)
“Bit Flipping Attack”
![Page 23: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/23.jpg)
ExampleName Position SalaryAdam President 785446Joe A Security Officer 541220Now Joe wants to Hike her salary and assuming in this case she has prior knowledge of final byte Say, P5.Hence She merely has to flip Penultimate bit of C4.
![Page 24: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/24.jpg)
ResultName Position SalaryAdam President 785446Joe A Security Of#f87%$ 741220
A Human Can Detect this change,What About ,if it is just a Program???
What About if it ‘s a Computer??
![Page 25: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/25.jpg)
Advantages and Limitations of CBC
a ciphertext block depends on all blocks before itneed Initialization Vector (IV)
which must be known to sender & receiver if sent in clear, attacker can change bits of first block, and change IV
to compensate hence IV must either be a fixed value or must be sent encrypted in
ECB mode before rest of message
![Page 26: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/26.jpg)
8.26
In CBC mode, each plaintext block is exclusive-ored with the previous ciphertext block before being encrypted.
Cipher Block Chaining (CBC) Mode
Cipher block chaining (CBC) mode
![Page 27: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/27.jpg)
An Email between Alice and Bob with Following Header
Alice Bob
{Date: Tue, 21 Oct 2014 13: 34:47}EK
Trudy
Plain-text Starts With the Encrypted Version of : “Date :Tue” Often Occur on Tuesday
Can Trudy Guess that?
![Page 28: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/28.jpg)
Major Drawback of ECB and CBC is that, Encryption and Decryption can not start until a complete block of 64 bits of plaintext data is available.
![Page 29: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/29.jpg)
Stream Modes of Operation• block modes encrypt entire block• may need to operate on smaller units
– real time data• convert block cipher into stream cipher
– cipher feedback (CFB) mode– output feedback (OFB) mode– counter (CTR) mode
• use block cipher as some form of pseudo-random number generator
![Page 30: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/30.jpg)
Cipher FeedBack (CFB)• message is treated as a stream of bits • added to the output of the block cipher • result is feed back for next stage (hence name) • standard allows any number of bit (1,8, 64 or 128 etc) to
be feed back – denoted CFB-1, CFB-8, CFB-64, CFB-128 etc
• most efficient to use all bits in block (64 or 128)Ci = Pi XOR EK(Ci-1)
C-1 = IV • uses: stream data encryption, authentication
![Page 31: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/31.jpg)
s-bitCipher FeedBack
(CFB-s)
![Page 32: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/32.jpg)
Encryption in CFB Mode
32
![Page 33: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/33.jpg)
Generating Key Stream for CFB
1
1 1
The input to the block cipher is a shift register ;
its value at stage is denoted as .
Initially, an initial vector (IV).
For 1, shift-left- -bits( ) .
Then, -mos
i
i i i
i
x
i x
x
i x s x C
K s
t-significant-bits(E ( )).K ix
33
![Page 34: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/34.jpg)
Advantages and Limitations of CFB
appropriate when data arrives in bits/bytes most common stream mode limitation is need to stall while do block encryption after
every n-bits note that the block cipher is used in encryption mode at
both ends errors propogate for several blocks after the error
![Page 35: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/35.jpg)
Output Feed Back (OFB)
![Page 36: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/36.jpg)
Output Feed Back (OFB)
![Page 37: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/37.jpg)
Output Feed Back (OFB)
• message is treated as a stream of bits • output of cipher is added to message • output is then feed back (hence name) • feedback is independent of message • can be computed in advance
Oi = EK(Oi-1)
Ci = Pi XOR Oi
O-1 = IV
![Page 38: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/38.jpg)
Advantages and Limitations of OFB
bit errors do not propagate uses: stream encryption on satellite communicationvulnerable to message stream modification
![Page 39: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/39.jpg)
Counter Mode (CTR)
![Page 40: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/40.jpg)
Output Feed Back (OFB)
![Page 41: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/41.jpg)
Counter (CTR)
![Page 42: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/42.jpg)
Counter (CTR)
• a “new” mode, though proposed early on• similar to OFB but encrypts counter value rather than any
feedback value• must have a different counter value for every plaintext block
(never reused)Oi = EK(i)
Ci = Pi XOR Oi
• uses: high-speed network encryptions
![Page 43: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/43.jpg)
Advantages and Limitations of CTR
• efficiency– can do parallel encryptions in h/w or s/w– can preprocess in advance of need– good for bursty high speed links
sender & receiver must remain in sync• Cannot ensure integrity support.
![Page 44: Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,](https://reader035.fdocuments.in/reader035/viewer/2022070413/5697bf951a28abf838c90b08/html5/thumbnails/44.jpg)
Summary of Encryption Modes