forked from Huxpro/huxpro.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
70 changes: 70 additions & 0 deletions
70
_posts/blockchain-Xiao@PKU/btc/2024-10-08-btc-P12-anonymity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: "区块链技术与应用 - P12 - 比特币的匿名性" | ||
layout: post | ||
author: "raftale" | ||
header-style: text | ||
hidden: false | ||
published: true | ||
tags: | ||
- blockchain | ||
- btc | ||
--- | ||
|
||
# 比特币的匿名性 | ||
|
||
比特币的匿名并非真的匿名,而是假的匿名,匿名性不如现金。 | ||
|
||
|
||
## 什么情况下有可能破坏匿名性 | ||
|
||
比特币地址和交易都是在区块链中公开的,且不可篡改的。 | ||
|
||
1. 输入地址和输出地址有可能可以通过交易分析关联起来。 | ||
2. 跟现实身份产生关联的时候: | ||
- 如法币购买或提现的时候 | ||
- 电商支付的时候 | ||
- 社会工程学 | ||
|
||
|
||
## 如何提高匿名性 | ||
|
||
1. network layer use tor | ||
2. application layer use coin mixing | ||
|
||
## 零知识证明 | ||
|
||
零知识证明:一方(证明者)向另一方(验证者)证明一个陈述是正确的,而无需透露该陈述是正确的外的任何信息。 | ||
|
||
同态隐藏的性质: | ||
1. 如果`x`,`y`不同,那么它们的加密函数值`E(x)`和`E(y)`也不相同。 | ||
- 逆否命题:如果`E(x)`和`E(y)`相同,那么`x`,`y`也相同。 | ||
2. 给定`E(x)`的值,很难反推出`x`的值。 | ||
3. 给定`E(x), E(y)`的值,我们可以很容易的计算出某些关于`x, y`的加密函数值 | ||
- 同态加法:通过`E(x), E(y)`计算出`E(x + y)`的值 | ||
- 同态乘法:通过`E(x), E(y)`计算出`E(x*y)`的值 | ||
- 扩展到多项式 | ||
|
||
### 例子 | ||
`Alice`想要向`Bob`证明她知道一组数`x`和`y`使得`x + y = 7`,同时不想要`Bob`知道`x`和`y`的具体值。 | ||
|
||
1. `Alice`把`E(x)`和`E(y)`的值发给Bob:利用了性质2 | ||
2. `Bob`通过`E(x)`和`E(y)`计算出`E(x + y)`的值:利用了性质3 | ||
3. `Bob`同时计算`E(7)`的值,如果`E(x + y) = E(7)`,那么验证通过,否则验证失败:利用了性质1 | ||
|
||
|
||
### 盲签方法 | ||
盲签的特点是 签名的人不知道签名内容的情况下进行签名。 | ||
|
||
1. 用户A提供`SerialNum`,银行在不知道`SerialNum`的情况下返回签名`token`,减少A的存款 | ||
2. 用户A把`SerialNum`和`token`交给B | ||
3. 用户B把`SerialNum`和`token`给银行验证,银行验证通过,增加B的存款 | ||
4. 银行无法把A和B联系起来 | ||
5. 中心化 | ||
|
||
|
||
### 零币和零钞 | ||
|
||
1. 零币和零钞在协议层就融合了匿名化处理,其匿名属性来自密码学保证。 | ||
2. 零币(ZeroCoin)系统中存在基础币和零币,通过基础币和零币的来回转换,消除旧地址和新地址的关联性,其原理类似于混币服务 | ||
3. 零钞(ZeroCash)系统使用`zk-SNARKS`协议,不依赖一种基础币,区块链中只记录交易的存在性和矿工用来验证系统正常运行所需要关键属性的证明。区块链上既不显示交易地址也不显示交易余额,所有交易通过零知识证明验证的方式进行。 | ||
|