Crypto

零知识证明 (ZKP)

Definition

零知识证明 (ZKP) 是一种加密方法,它在不透露底层秘密数据的情况下证明某个陈述为真。

什么是零知识证明(ZKP)?

零知识证明(ZKP)是一种让一方(证明者)说服另一方(验证者)某个声明为真的方式——而不暴露使其成立的私人信息。换句话说,验证者只了解到一件事:声明是正确的。这在加密领域尤其有用,因为区块链被设计为透明的,但许多现实世界的交易和应用需要隐私、选择性披露或保密性。零知识证明(ZKP)是如何工作的?从高层次来看,ZKP将“相信我”转变为“验证我”。证明者有一个秘密(如密码、账户余额或有效签名),并希望证明他们满足某个条件(如“我被允许提款”或“该交易遵循规则”),而不透露秘密本身。大多数ZKP系统围绕三个核心保证构建:1. 完整性:如果声明为真且证明者遵循协议,验证者将接受证明。 2. 健全性:如果声明为假,作弊的证明者不应能够持续欺骗验证者。 3. 零知识:证明不会泄露秘密——只会泄露声明的真实性。在加密术语中,思考它的简单步骤如下:1. 定义声明:例如,“我知道一个控制这个地址的秘密密钥,”或“这笔转账不会凭空创造货币。” 2.

编码规则:声明被表达为一组数学约束(通常在ZK系统中被描述为“电路”)。 3. 生成证明:证明者使用他们的私人输入(秘密)和公共输入(每个人都能看到的内容)来计算一个紧凑的证明。 4. 验证证明:验证者使用公共信息检查证明。如果验证通过,验证者相信规则被遵循——而不学习私人输入。

一个有用的类比:想象一下证明你足够大可以进入一个场所,而不显示你的出生日期。你不是交出你的身份证(这会透露额外的细节),而是提供一个加密的“是/否”证明,证明你的年龄至少达到所需的门槛。保安只了解到你符合资格,而不是你的确切年龄或身份细节。

在区块链系统中,ZKP通常以两种广泛的模式出现:

隐私证明:隐藏交易细节(如金额或参与者),同时仍然证明交易是有效的。

有效性证明:证明一批计算或交易被正确执行,允许其他人信任结果而无需重新做所有工作。零知识证明(ZKP)的实际应用ZKP已经在加密堆栈的多个部分中使用。ZK汇总(扩展):许多第二层网络使用ZKP来证明大量交易在链下被正确处理,然后将简洁的证明发布到第一层区块链。这降低了成本并提高了吞吐量,同时继承了基础链的安全性。私人交易和保护数据:关注隐私的协议使用ZKP来保持敏感交易细节隐藏,同时仍然执行核心规则(没有双重消费、余额相加、授权支出等)。身份和选择性披露的合规性:ZKP可以支持“证明属性,而不是数据”的工作流程——例如证明你不在制裁名单上,或你超过某个年龄,而不透露你的完整身份。这个想法在链上身份、访问控制和受监管的用例中越来越相关。[预言机]和链下数据[证明]:一些预言机设计使用与零知识相关的加密技术来证明数据来自特定来源或满足某些条件,同时保持底层数据的私密性。当智能合约需要对专有或敏感信息做出反应时,这可能很重要。

为什么零知识证明(ZKP)很重要

零知识证明之所以重要,是因为它们有助于调和加密领域中的一个核心矛盾:公开可验证性与隐私。区块链之所以强大,正是因为任何人都可以验证规则是否被遵循——但这种透明性也可能暴露用户行为、商业关系和敏感财务数据。ZKP提供了一条实用的中间道路:用户可以从更好的隐私和更安全的身份验证中受益(共享的个人数据越少,泄露的数据就越少)。开发者可以构建需要保密性的应用程序——例如私人投票、私人DeFi头寸或企业工作流程——而无需放弃可验证性。网络在使用ZKP作为有效性证明时,可以更高效地扩展,因为一个小的证明可以代替大量的计算。没有ZKP,许多系统必须在(a)揭示过多信息以证明正确性或(b)依赖受信任的中介和私有数据库之间做出选择。ZKP通过使“无信任隐私”和“可验证计算”在公共基础设施上更可实现,从而减少了这种权衡。

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop
  • [@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

[@portabletext/react] Unknown block type "span", specify a component for it in the `components.types` prop

Frequently Asked Questions

零知识证明(ZKP)通俗来说是什么?

零知识证明允许你证明某件事情是真实的,而不需要展示使其真实的秘密细节。验证者只知道你的声明是有效的,而不知道底层数据。

零知识证明在区块链上是如何工作的?

用户生成一个加密证明,证明某个交易或计算遵循规则,然后网络使用公共信息验证该证明。链可以在不查看私密输入(如金额、身份或中间步骤)的情况下接受结果。

零知识证明的三个属性是什么?

它们是完整性(真实陈述可以被证明)、健全性(虚假陈述不能被作弊者证明)和零知识性(证明不透露超出有效性之外的任何秘密信息)。这些属性定义了证明既可信又私密的原因。

ZKP仅仅是为了隐私吗?

不——ZKP也广泛用于可扩展性和效率。有效性证明可以确认许多交易被正确处理,而不需要每个验证者重新执行所有计算。

零知识和零信任之间有什么区别?

零知识是一种加密技术,用于在不透露秘密的情况下证明陈述。零信任是一种安全模型,假设默认情况下不应信任任何用户或设备,并要求持续验证;ZKP可以作为零信任系统中的一种工具。