深度优先(2): Exploring zk-SNARKs [currently ongoing]

deep into ...

两个关键机构

密码学上的哈希函数

加密哈希函数,它需要尽量满足三个安全性质:

  1. 原像防御(Pre-Image resistance):就是任意给一个hash值h,你很难破解出它的原像m,使得hash(m)=h,这个难度一般是NP难度的,也就是所谓的单向函数。
  2. 弱碰撞防御(Second pre-image resistance):就是给定一个m1,你很难找到另一个m2,使得h(m1)=h(m2)。
  3. 强碰撞防御(Collision resistance):就是你很难找到两个不同的m1和m2,使得h(m1)=h(m2)。

如果符合强碰撞防御,也就是会符合弱碰撞防御,但是不一定符合原像防御。如果只满足前2个,在密码学上是不安全的,一般加密哈希函数应该满足1,2,3。例如SHA-1因为已经在2005年可以被暴力找出碰撞,就不满足性质3,从而已经不再推荐使用了,现在常用的SHA-256,SHA-512都是属于SHA-2这个大类的,最新的则是SHA-3系列。MD5也已经在2004年就不满足强碰撞防御了,也不推荐作为密码哈希函数来用了。

加密哈希函数的使用场景,典型的有在SSL(Secure Sockets Layer)和数字签名(Digital Signature)上使用。需要说明的是非加密哈希函数不需要满足上述三个性质,比如在散列表里面,哈希函数只要尽量满足均匀分布,周期尽量大,计算速度又足够快等即可。

  • cryptographic hash function
    • 1991: MD5
      • MD5 was designed by Ronald Rivest in 1991 to replace an earlier hash function MD4, and was specified in 1992 as RFC 1321.
    • 1993: SHA-1
      • SHA = Secure Hash Algorithm.
      • SHA-1 was developed as part of the U.S. Government's Capstone project. 1993.
    • 1996: RIPEMD-160
      • RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.
    • 2000: Whirlpool
      • It was designed by Vincent Rijmen and Paulo S. L. M. Barreto, who first described it in 2000.
    • 2001: SHA-2
      • designed by the United States National Security Agency (NSA), first published in 2001.
      • SHA-256/SHA-512
    • 2012: BLAKE2
      • An improved version of BLAKE called BLAKE2 was announced in December 21, 2012. It was created by Jean-Philippe Aumasson, Samuel Neves, Zooko Wilcox-O'Hearn, and Christian Winnerlein with the goal to replace widely used, but broken MD5 and SHA-1 algorithms.
    • 2015: SHA-3
      • was released by NIST on August 5, 2015.
      • SHA3-256/SHA3-512
  • security level of a cryptographic hash function
    • Pre-image resistance
    • Second pre-image resistance
    • Collision resistance

密码学的预言机(oracle)模型

密码学的攻击模型

交互式证明

零知识证明

非交互式零知识证明

ZKP as a Signature Algorithm

zk-SNARKs

代码

密码学界/群组

posted @ 2018-12-20 22:24  ffl  阅读(605)  评论(0编辑  收藏  举报