零知识证明:身份隐私中的 ZK

去中心化金融社区Publicado a 2022-08-12Actualizado a 2022-08-12

Resumen

未来,隐私身份可能是基于区块链与非区块链的结合。

未来,隐私身份可能是基于区块链与非区块链的结合。

在区块链世界中,身份可以以多种方式表现出来。真实世界的实体 ( 如人或组织 ) 可以在一个或多个区块链上采用不同的形式,区块链上的一个身份可以代表几个真实世界的实体。这样的身份可以通过拥有私钥、拥有特殊类型的 NFT、参与某种类型的 DeFi 等进行建立。

图 1:数字身份演示

这种通用且灵活的身份概念可以实现前所未有的用例和体验——但我们也同时需要注意隐私。一个人的身份可能是以一种特定的方式相互关联的多种事物,但只有其中的某一部分可能在一个环境中才是最重要的。例如,一场只允许 BAYC NFT 持有者参加的音乐会的组织者并不真正关心你拥有哪一个 NFT,只要你至少拥有其中一个就可以。参加 DeFi 会议可能要求去年你在某个 DeFi 交易所借出了 5 万个代币,但不确切说明借出了多少、参与了多长时间等。

第一个例子

零知识 (ZK) 证明可以真正实现这样的用例,同时为相关实体提供数学上可证明的隐私。为了进一步阐述这一点,让我们回到前一段的两个例子。对于第一个例子,ZK 证明将表明一个想要参加音乐会的人 P 知道一个地址 A 的密钥,该地址属于 BAYC NFT 持有者的 10,000 个地址集。进一步分解:

公共输入是在链中某一特定 NFT 的所有地址的集合 S;;

私人输入 P 为密钥 sk¹;

我们想在 ZK 中证明的是,从 sk 派生的地址在集合 S 中。

在零知识学术文献中,这种证明通常被称为成员证明。有几种方法可以生成这样的证明。如果集合不是太大,可以使用 RSA 累加器。

使用 RSA 累加器,集合 S 可以用一个短值表示——成员证明也很短。在 S 中添加或删除地址的代价也很低,与累计值的数量无关。然而,在最坏的情况下,累积集合 S 和产生证明所花费的时间可能与 S 的大小成线性关系 ( 实际的时间范围取决于设置的具体情况,甚至可能是恒定时间 )。这里还有另一个问题:我们不仅想证明某个地址 A 在集合中,而且还想证明 A 是从 sk 派生出来的。我们可以为前者设计自定义 ZK 协议(例如,离散对数知识 ) ,但通用的 ZK 系统通常最适合后者。另一个问题是以一种有效的方式将三个组件粘合在一起 ( 成员关系、离散日志和哈希的原像 )。

第二个例子

上面提到的第二个用例比第一个要复杂一些。有兴趣参加 DeFI 会议的人需要表明他们向区块链发送了交易 tx( 如以太坊 ),该区块链在 DeFI 合约中调用了借贷功能,比如 DF。他们还需要表明,tx 转了至少 5 万个代币,并且它被添加到对应于 2021 年开始和结束的两个区块之间的区块链中。现在,根据区块链,一年内可能会生成数十万区块。每个区块包含的所有交易的哈希 ( 通常称为交易哈希 )。ZKP 可以用来表明 tx 被「包含」在某个区块 B 的交易哈希中——而不显示 tx 本身——但这会揭示比预期的还要多的信息。在极端情况下,如果 B 只包含合约 DF 的一笔交易,那么 ZKP 是没有意义的。理想情况下,我们希望证明 tx 包含在 2021 年的其中一个区块的交易哈希中。

生成一个包含 2021 年以来所有区块 ( 或至少有一些 DF 交易的区块 ) 的 Merkle 树,并证明包含 tx 的区块只是 Merkle 树的叶子之一,这将是一个更具可扩展性的方法。对于这个问题:

公共输入是 2021 年以来所有区块集合的 Merkle 根 ( 或至少是它们的正确子集 ),和合约 DF 的代码 ( 通过链上的合约地址引用 );

私人输入是用于签署 tx 的密钥 sk,tx 本身,包含 tx 的区块 B,以及 B 在 Merkle 树中的路径;

我们想要证明的是:sk 用于签署 tx,tx 包含在 B 中,B 是 Merkle 树的一部分,tx 调用 DF 中的适当函数,并且 tx 转了至少 5 万个代币(其他 tx 的参数应保持隐藏状态)。

我们只是触及了可以在不同用例中进行的大量身份验证的皮毛,ZK 语句已经开始显示出一些复杂性。事实上,一旦我们开始更具体地思考,它们会变得更加复杂 ( 诚然,上面关于 DeFi 会议参与问题的语句相当简单 )。其中的复杂性包括:

DF 不是直接调用的,而是通过另一个合约或一系列合约进行调用的;

tx 包含在区块链中,但对 DF 的状态没有预期的效果;

会议关心的是以今天的利率借出的实际美元数量,而不是代币。

跳出固有思维模式

不过我们不必太担心。ZKP 的美妙之处在于,几乎任何你能想到的语句都可以在零知识中被证明 ( 确切地说,任何可以在多项式时间内被验证的关系也可以在零知识中被证明 )。虽然 ZKP 的非交互式版本最适合解决 L1 上的机密性、隐私、状态增长、完整性等问题,但交互式证明对于需要基于区块链的身份断言的许多应用程序可能很有意义。

图 2:ZKP 交互式版本示例

上述音乐会入场的例子可以用来说明这一点。对于 NFT 所有权的 ZK 成员证明,只需要一个确定的验证者,而不是典型的 L1 设置中的数百或数千个身份不明的验证者。证明者可以主动与验证者接触,并在会话过程中交换多条消息,从而摆脱了非交互式 ZK 证明固有的复杂性。事实上,证明不必很短,验证者的复杂度也不必很低,因此可以充分探索 ZK-SNARK(最流行的非交互式证明系统,也有简洁的证明)之外的 ZK 证明范围。我们将能够使用具有更好的证明复杂性、底层安全假设等的证明系统。

请参阅下表,了解不同证明系统的高级比较。当我们沿着表格往下看时,证明复杂度和安全性假设变得越来越好,而证明大小变得越来越差。虽然基于 mpc 的 ZK 证明系统提供了最好的证明复杂性,并且具备无需信任的设置,但证明是交互式的并且仅适用于特定的验证者(证明者与之交互的那个),所以当身份断言必须对链下的特定一方做出判断时,这可能就不是问题。(ZK 证明系统的其他一些特征,如后量子安全性,在表中没有体现。)

表 1:不同证明系统的高级比较

总之,世界上的身份不一定是基于区块链的,也不一定是基于非区块链的。展望未来,它们当然可以是两者的结合——这将使保护隐私的身份断言变得更加有趣!

Lecturas Relacionadas

A 380% Soar, Shenzhen’s 100-Billion-Yuan IPO Rings the Bell

HKC Holdings, a major Chinese display panel manufacturer, has successfully listed on the Shenzhen Stock Exchange's main board. The company's shares surged over 380% on its debut, pushing its market capitalization to around 350 billion yuan (formerly reaching 500 billion yuan). Founded by Wang Zhiyong in Shenzhen's Huaqiangbei electronics market nearly three decades ago, HKC evolved from assembling monitors to becoming a global top-tier supplier of semiconductor display panels for TVs, monitors, and smartphones. The IPO marks a significant milestone for HKC and its backers. The company's growth into the capital-intensive panel manufacturing sector was supported through partnerships with state-owned capital from regions like Chongqing, Mianyang, and Chuzhou. Its shareholder list also includes BOE Technology's investment arm. In recent years, HKC reported strong financials, with core panel business contributing over 70% of revenue and clients including Samsung, TCL, and Xiaomi. This listing is seen as part of a broader trend in Shenzhen's evolving tech landscape. Beyond established giants, the city is nurturing clusters of leading companies in specialized sectors like robotics—exemplified by the "Shenzhen Robot Valley"—and storage chips, where a group of firms dubbed the "Storage Five Tigers" has achieved a combined trillion-yuan market valuation. Shenzhen's strategic focus on emerging industries such as AI terminals, low-altitude economy, and humanoid robotics aims to build new industrial depth and foster the next generation of tech champions.

marsbitHace 6 min(s)

A 380% Soar, Shenzhen’s 100-Billion-Yuan IPO Rings the Bell

marsbitHace 6 min(s)

Domestic First Explosion-Proof Certification, World's First Fueling Brain Solution: How Did They Secure Two 'Firsts'?

China's embodied AI sector is booming, with over ¥37 billion in funding this year. The focus has shifted decisively to real-world application, particularly in hazardous, repetitive tasks humans should avoid. A key, often prohibitive, barrier to entry for robots in environments like gas stations and oil fields is obtaining explosion-proof certification, requiring meticulous hardware and circuit design from the ground up. The article explores three main application areas. At gas stations, the challenge lies in executing a long, precise sequence of actions (opening caps, handling the fuel nozzle) with millimeter accuracy across diverse car models. For facility inspections, robots need sustained autonomous patrols combined with real-time anomaly detection and response. Port scenarios introduce the complexity of multi-robot coordination. Addressing the core challenge of long-horizon tasks, the piece highlights a technical breakthrough: a "world model"-driven approach. This enables predictive planning, allowing the AI to visualize the desired end-state (e.g., nozzle returned, cap closed) and work backward to synthesize intermediate visual frames. This "imagination" of the task trajectory, as implemented in the H-GAR architecture, guides action generation, significantly reducing cumulative error in multi-step operations. The three-step H-GAR process involves generating a coarse action draft, synthesizing target-conditioned observation frames, and then refining actions based on visual context and a memory of past successful motions. The conclusion emphasizes that success in specialized, safety-critical fields requires long-term commitment and deep integration of the "embodied brain" (AI) with a purpose-built, certified physical "body." Mastering this brain-body-data闭环 (closed-loop) is positioned as a crucial competitive advantage for commercialization.

marsbitHace 54 min(s)

Domestic First Explosion-Proof Certification, World's First Fueling Brain Solution: How Did They Secure Two 'Firsts'?

marsbitHace 54 min(s)

Bitcoin Bear Market Triggers Crypto Layoffs, Yet Fuels Industry's Most Aggressive M&A Wave Ever

A prolonged Bitcoin downturn is forcing crypto companies to lay off employees and automate operations, but has simultaneously triggered the industry's most aggressive wave of mergers and acquisitions (M&A). In the first half of 2026, crypto M&A deal value reached $93.7 billion, 26 times higher than the same period last year. This activity is primarily driven by traditional financial institutions—banks, payment processors, and asset managers—who are acquiring compliant crypto infrastructure like custody solutions, payment rails, and regulatory licenses instead of building them internally. Examples include Mastercard's acquisition of stablecoin firm BVNK and Franklin Templeton's launch of a dedicated crypto division via acquisition. This consolidation contrasts sharply with a shrinking crypto labor market, where active job openings have plummeted. Companies like Coinbase are restructuring to become "AI-native," leading to a sharp increase in roles requiring AI skills, while engineering and compliance positions now dominate hiring. Financially pressured crypto firms, such as Messari which was acquired at a fraction of its prior valuation, are becoming prime targets. Capital remains available but is highly selective, flowing overwhelmingly into businesses that bridge digital assets with traditional finance, such as tokenization platforms and regulated trading venues. The trend indicates a market where capital is rewarding compliant, utility-focused infrastructure while weaker models consolidate or downsize.

marsbitHace 55 min(s)

Bitcoin Bear Market Triggers Crypto Layoffs, Yet Fuels Industry's Most Aggressive M&A Wave Ever

marsbitHace 55 min(s)

Trading

Spot
Futuros
活动图片