Security - PowerPoint PPT Presentation

About This Presentation
Title:

Security

Description:

Break the entire file into blocks, and encode every block ... CBC Cipher block chaining. Encryption: C0 = E(P0 xor IV). C1 = E(P1 xor C0), and so on. ... – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 12
Provided by: zhen6
Learn more at: http://www.cs.fsu.edu
Category:
Tags: cbc | security

less

Transcript and Presenter's Notes

Title: Security


1
Security
2
Cipher Modes
  • ECB Electronic Code Book Mode. Break the entire
    file into blocks, and encode every block
    individually.
  • Problems. The example in the book. You can
    replace a block if it is good for you.

3
CBC Cipher block chaining
  • Encryption
  • C0 E(P0 xor IV).
  • C1 E(P1 xor C0), and so on.
  • IV is transmitted in plain text.
  • Decryption
  • P0 IV xor D(C0)
  • P1 C0 xor D(C1), and so on.
  • So, same message wont result in the same code.

4
Stream Cipher Mode
  • T0 E(IV).
  • T1 E(T0), and so on.
  • C P xor T.
  • Dont use the same stream twice.

5
Counter mode
  • Ti E(IVi).
  • Ci Pi xor Ti.
  • The advantage is that you can randomly access any
    block.
  • Used by Skype. Often called ICM (Integer counter
    mode).
  • ECB also supports random access. Does it have the
    same problem as ECB? No, because the Ivs are
    different.

6
Public Key / Private Key
  • Talking about Skype, how do you think that two
    Skype users can share the same AES key?

7
Public Key / Private Key
  • Everyone has a public key and private key.
  • With Bs public key (pkB) A can encode data that
    only B can decode with his private key (skB)
    because other people does not have Bs private
    key.
  • D_skBE_pkB(W) W
  • E_pkBD_skB(W) W

8
Public Key /Private key
  • So, A can choose a 128-bit string W as the
    session key and send E_pkB(W) to B. B runs the
    decryption algorithm to get D_skBE_pkB(W) W.
  • Skype actually asks two ends to both contribute
    128 bits to make the 256-bit session key.

9
The RSA algorithm
  • Most common, the RSA algorithm is used to get the
    public key/private key.
  • Choose two large primes, p and q.
  • Compute npq and z(p-1)(q-1).
  • Choose a large number relatively prime to z and
    call it d.
  • Find e such that ed 1 mod z. (such e must
    exist)
  • (e,n) is the public key for encoding and (d,n) is
    the private key for decoding.

10
The RSA algorithm
  • To encrypt a message M, CMe mod n.
  • To decrypt from C, M Cd mod n.
  • D_skBE_pkB(M) M
  • E_pkBD_skB(M) M.

11
Why is RSA secure?
  • The problem is, given (d,n), can you figure out
    e?
  • It is difficult.
  • You can try to find p and q given n. If you
    indeed can, then you get z. Given z and d, you
    get e.
  • But it is difficult to factor large numbers.
Write a Comment
User Comments (0)
About PowerShow.com