Cryptography | 密码学课程笔记

Cryptography is everywhere!

some applications:

  • secure communication
  • encrypting files on disk
  • content protection
  • user authentication
  • etc

some examples:

  • Alice & Bob communication —— HTTP(SSL/TLS)
    -Handshake Protocol:establish shared secret key——k(public-key)
    -Record layer:transmit data using shared secret key
  • Protected files on disk
    -( LIKE Alice today sends a message to Alice tomorrow )

Two cases:

  • single use key(one time key) : new key generated for every email
  • Multi use key(many time key) : same key used to encrypt many files

Tips:

  • Encryption algorithm is publicly known. Only thing that's kept secret is the secret key k.
  • you should only use algorithms that are public because those have been peer-reviewed by a large community of hundreds of people for many years! Stick to standards ranther than using a proprietary ciper!
  • cryptography has its limitations!
    - cryptography can't solve all security problems (Like software bugs / social engineering attacks)
    - cryptography is not reliable unless implemented and used properly! (Like WEP)
    - cryptography is not something you should try to invent and design yourself! there are standards in cryptography!

What is Cryptography?

Core:

  • secret key establishment
    Alice and Bob share a secret key
  • secure communication
    Attacker can't figure out or update messages

Crypto can do more much!

  • Digital signatures
  • Anonymous communication
  • Anonymous digital cash
  • secure multi-party computation
  • privately outsourcing computation
  • zero knowledge

Three steps in cryptography:

  • precisely specify threat model
  • propose a construction
  • prove that breaking construction under threat model will solve an underlying hard problem

History of Cryptography

symmetric cipher:

  encrypter and decrypter use the same key

substitution cipher:

  Caesar Ciper
  Vigener cipher
  Rotor machines

data encryption standard:

  DES
  AES (Today)

密码学中的离散概率

概率分布的定义

概率分布

事件的定义

事件的定义

并集上界

并集上界

P(A1 U A2)<= P(A1) + P(A2)

随机变量

随机变量

均匀随机变量

均匀随机变量

随机算法

确定算法A(m):给定输入数据m,输出严格相同的结果y
随机算法A(m,r):每次算法运行时,r都从n位字符串里均匀取样,因为r每次不总一样,因此我们得到的结果也不总一样
由随机算法可以引出加密算法 —— A(m;k) = E(k,m)

随机算法

独立性

独立性

XOR异或

异或的性质

假设我们有随机变量y随机分布于{0,1}^n,我们不知道y的概率分布;
假设我们有另一独立的随机变量x均匀分布于{0,1}^n;
then,我们定义一个z是x,y的异或;
结论z是均匀分布于{0,1}^n的随机变量。

异或

生日悖论:

在集合中选取两个人的生日,问要取多少次能得到两人生日相同?我们下意识会认为这很困难,其实我们只需要很少的次数就能得到这个事件,因此称之为悖论!

生日悖论

概率曲线图

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读