Presentation is loading. Please wait.

Presentation is loading. Please wait.

Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,

Similar presentations


Presentation on theme: "Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,"— Presentation transcript:

1

2 Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab, NCKU,2015

3 Flash Back

4 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

5 Modes of Operation 4 packet encrypted packet …. = Encrypt ….. ex.ECB mode BIG PLAINTEXT packet

6 Modes of Operation Why we need to use Modes of Operation? I.Adapt cryptographic algorithm to applications. II.Increase the strength of a cryptographic algorithm III.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 …. DES

7 Conventional Modes of Operations – Electronic Codebook Mode (ECB) – Cipher Block Chaining Mode (CBC) – Cipher Feedback Mode (CFB) – Output Feedback Mode (OFB) – CTR 6

8 ECB: Electronic Codebook 7

9 Notations. 8

10 Electronic Codebook Book (ECB)

11 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 C i = E K (P i ) uses: secure transmission of single values

12 8.11 The simplest mode of operation is called the electronic codebook (ECB) mode. Electronic Codebook (ECB) Mode Figure Electronic codebook (ECB) mode

13 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

14 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.

15 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)

16 Other Issues?

17 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: P 0 = “Alice as”, P 1 = “ks Bob. ”, P 2 = “Trudy as”, P 3 = “ks Tom. ” Ciphertext: C 0,C 1,C 2,C 3 Trudy cuts and pastes: C 0,C 3,C 2,C 1 Decrypts as Alice asks Tom. Trudy asks Bob.

18 Questions?

19 Cipher Block Chaining (CBC)

20

21 message is broken into blocks each previous cipher blocks is chained with current plaintext block, hence name use Initial Vector (IV) to start process C i = E K (P i XOR C i-1 ) C -1 = IV uses: bulk data encryption, authentication

22 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”.

23 “Bit Flipping Attack”

24 Example Name Position Salary Adam President 785446 Joe A Security Officer 541220 Now 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.

25 Result Name Position Salary Adam President 785446 Joe 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??

26 Advantages and Limitations of CBC  a ciphertext block depends on all blocks before it  need 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

27 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

28 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?

29 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.

30 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

31 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) C i = P i XOR E K (C i-1 ) C -1 = IV uses: stream data encryption, authentication

32 s-bit Cipher FeedBack (CFB-s)

33 Encryption in CFB Mode 32

34 Generating Key Stream for CFB 33

35 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

36 Output Feed Back (OFB)

37

38 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 O i = E K (O i-1 ) C i = P i XOR O i O -1 = IV

39 Advantages and Limitations of OFB  bit errors do not propagate uses: stream encryption on satellite communication  vulnerable to message stream modification

40 Counter Mode (CTR)

41 Output Feed Back (OFB)

42 Counter (CTR)

43 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) O i = E K (i) C i = P i XOR O i uses: high-speed network encryptions

44 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.

45 Summary of Encryption Modes


Download ppt "Privacy and Integrity: “ Two Essences of Network Security” Presenter Prosanta Gope Advisor Tzonelih Hwang Quantum Information and Network Security Lab,"

Similar presentations


Ads by Google