zk-IMG:对抗虚假信息

1. 引言

前序博客:

Daniel Kang等人2022年论文《ZK-IMG: Attested Images via Zero-Knowledge Proofs to Fight Disinformation》,在该论文中提供了一个简单的deep fake image示例:
在这里插入图片描述
信任基础设施的核心部分是使用认证的相机,其中私钥存储在相机中,用该私钥对图像进行数字签名。公钥可验证图像是从哪个相机拍摄的。在个别多情况下,需对原始图像进行修改以删除任何敏感信息——如模糊车牌或编辑图像中的人。为此有一组可信的核心图像和一个或多个转换图像。并可将原始图像保密。

如何在能保护原始图像隐私的同时,验证另一张图像是修改后的版本呢?为此,zk-img对原始图像和转换后的图像进行哈希,并使用zk-Snark来证明这是正确计算的。若原始图像的哈希值为 H 1 H_1 H1,而修改后的图像的哈希为 H 2 H_2 H2,则只公开 H 2 H_2 H2

有来自认证相机的原始哈希和签名,作为原始图像( H 1 H_1 H1)的核心证明,但可产生与编辑版本及其哈希( H 2 H_2 H2)相关的zk-Snark。然后,图像的创建者可以证明原始图像(通过相机的签名)和修改后的图像(使用zk-Snark)。如果需要,可以将 H 2 H_2 H2和zk-Snark发布到区块链或可信的时间戳系统,以证明图像何时创建。总体而言,ZK-IMG论文研究团队已经通过Halo2库实现了zk Snarks。

在这里插入图片描述
如上图所示:

  • Bob具有一个认证相机,相机内有一个私钥。
  • 拍照时,相机会使用该私钥对相片进行签名,以证明相片来源。
  • 可使用公钥来验证该签名,并追踪哪个相机拍了该相片。这个原始相片的哈希值为 H 1 H_1 H1
  • 对该相片进行转换,生成新的相片,新相片对应新哈希值 H 2 H_2 H2,并发布该新相片。
  • 使用zk-Snark来证明原始相片与新相片之间的转换。如有需要,可永远不公开原始相片。

ZK-IMG论文作者指出:

  • 密钥生成和证明部分的计算开销大,但验证过程非常快,仅需5.84ms到10.1ms。
  • proof size相对小,为7048字节到14592字节。

在这里插入图片描述
ZK-IMG与PhotoProof对比为:

  • PhotoProof在zk-Snarks之外验证签名和哈希值,需公开中间图像。
  • 忽略密钥生成开销,PhotoProof需要306秒来证明,500ms来验证128x128图像转换;而ZK-IMG仅需要2.74秒来证明(包含密钥生成开销),5.3ms来验证——速度分别提升了112倍和94倍。

更多ZKP知识及应用也可参看:

ZKP+图像示意图:
在这里插入图片描述
相机内拍摄图像防伪证明:
在这里插入图片描述

参考资料

[1] Prof Bill Buchanan OBE 2022年12月博客 zk-IMG … Fighting Disinformation
[2] Ingonyama 2023年博客 How to Beat Deep Fakes (Part 1)

zkML系列博客

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
优化下面代码.bg { width: 100%; height: 100vh; background-image: url('../../assets/img/info-bg.png'); background-size: 100% 100%; background-repeat: no-repeat; position: relative; font-family: AlibabaPuHuiTiR; .goBack { position: absolute; top: 34px; right: 65px; cursor: pointer; color: #ffffff; width: 181px; padding: 15px 10px; background: rgba(24, 31, 30, 0.52); border: 1px solid #4a524e; border-radius: 5px; font-size: 18px; font-family: AlibabaPuHuiTiR; z-index: 111; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .home-left { position: absolute; top: 18%; left: 40px; width: 41%; height: 76%; font-size: 24px; color: #ffffff; } .unit { font-size: 24px; color: #636363; } .home-left-title { font-size: 24px; color: #ffffff; line-height: 36px; } .home-right { position: absolute; top: 18%; right: 88px; width: 46%; height: 78%; } .model { display: flex; justify-content: center; align-items: center; height: 90%; } #threeContained { width: 100%; height: 100%; } .model-qk-img { width: 82%; height: 90%; background-image: url('../../assets/img/howo.png'); background-size: 100% 100%; background-repeat: no-repeat; } .model-zk-img { width: 56%; height: 90%; background-image: url('../../assets/img/heavyT.png'); background-size: 100% 100%; background-repeat: no-repeat; } .model-gj-img { width: 82%; height: 90%; background-image: url('../../assets/img/transit.png'); background-size: 100% 100%; background-repeat: no-repeat; } .car-online { margin-bottom: 50px; } } .day-data { display: flex; flex-direction: row; justify-content: space-between; align-items: center; height: 29%; margin-left: 30px; } .day-val { width: 40%; } .prefix { display: inline-block; width: 6px; height: 14px; background: #ffffff; margin-right: 20px; } .zh-title { margin-left: 30px; padding-top: 30px; font-size: 30px; font-weight: 700; text-align: left; color: #ffffff; line-height: 32px; letter-spacing: 0.3px; font-family: AlibabaPuHuiTiB; } .en-title { margin-left: 30px; font-size: 14px; font-weight: 400; text-align: left; color: #ffffff; line-height: 32px; letter-spacing: -0.91px; font-family: AlibabaPuHuiTiR; }
最新发布
05-31
Here are some suggestions to optimize the code: 1. Use shorthand properties whenever possible. For example, instead of writing `background-size: 100% 100%;`, you can write `background-size: cover;`. 2. Consolidate similar styles into classes, instead of repeating them for every element. For example, you can create a class for the font family and apply it to all elements that use that font. 3. Remove unnecessary styles that are not being used or overwritten by other styles. 4. Use more specific selectors to target elements, instead of relying on the order of elements in the HTML. This will make the code more robust and easier to maintain. 5. Consider using a CSS preprocessor like Sass or Less, which can help you write cleaner and more organized code. Here's an example of how the code could be optimized: ``` .bg { width: 100%; height: 100vh; background: url('../../assets/img/info-bg.png') no-repeat center center / cover; position: relative; font-family: AlibabaPuHuiTiR; } .goBack { position: absolute; top: 34px; right: 65px; cursor: pointer; color: #fff; width: 181px; padding: 15px 10px; background: rgba(24, 31, 30, 0.52); border: 1px solid #4a524e; border-radius: 5px; font-size: 18px; font-family: AlibabaPuHuiTiR; z-index: 111; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } .home-left { position: absolute; top: 18%; left: 40px; width: 41%; height: 76%; font-size: 24px; color: #fff; } .unit { font-size: 24px; color: #636363; } .home-left-title { font-size: 24px; color: #fff; line-height: 36px; } .home-right { position: absolute; top: 18%; right: 88px; width: 46%; height: 78%; } .model { display: flex; justify-content: center; align-items: center; height: 90%; } #threeContained { width: 100%; height: 100%; } .model-qk-img { width: 82%; height: 90%; background: url('../../assets/img/howo.png') no-repeat center center / cover; } .model-zk-img { width: 56%; height: 90%; background: url('../../assets/img/heavyT.png') no-repeat center center / cover; } .model-gj-img { width: 82%; height: 90%; background: url('../../assets/img/transit.png') no-repeat center center / cover; } .car-online { margin-bottom: 50px; } .day-data { display: flex; justify-content: space-between; align-items: center; height: 29%; margin-left: 30px; } .day-val { width: 40%; } .prefix { display: inline-block; width: 6px; height: 14px; background: #fff; margin-right: 20px; } .zh-title { margin-left: 30px; padding-top: 30px; font-size: 30px; font-weight: 700; text-align: left; color: #fff; line-height: 32px; letter-spacing: 0.3px; font-family: AlibabaPuHuiTiB; } .en-title { margin-left: 30px; font-size: 14px; font-weight: 400; text-align: left; color: #fff; line-height: 32px; letter-spacing: -0.91px; font-family: AlibabaPuHuiTiR; } .font-alibaba { font-family: AlibabaPuHuiTiR; } .font-alibaba-bold { font-family: AlibabaPuHuiTiB; } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值