深度优先(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 @   ffl  阅读(632)  评论(0)    收藏  举报
(评论功能已被禁用)
编辑推荐:
· 复杂业务系统线上问题排查过程
· 通过抓包,深入揭秘MCP协议底层通信
· 记一次.NET MAUI项目中绑定Android库实现硬件控制的开发经历
· 糊涂啊!这个需求居然没想到用时间轮来解决
· 浅谈为什么我讨厌分布式事务
阅读排行:
· 为大模型 MCP Code Interpreter 而生:C# Runner 开源发布
· Coze Studio:字节跳动 Coze 的开源版本来了!第一时间深度解析
· 面试时该如何做好自我介绍呢?附带介绍样板示例!!!
· 复杂业务系统线上问题排查过程
· 本可避免的P1事故:Nginx变更导致网关请求均响应400
点击右上角即可分享
微信分享提示