forked from YuZhang/cryptography
-
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
10 changed files
with
155 additions
and
85 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,11 +1,72 @@ | ||
# 10 密码学协议动物园 | ||
|
||
1. 本节学习用于保护信息的完整性和真实性的消息认证码(MAC)和抗碰撞的哈希函数(CRHF)。 | ||
|
||
2. 目录:MAC、构建安全MAC、CBC-MAC、CRHF、HMAC、信息论上MAC。 | ||
|
||
3. | ||
|
||
1. 本节学习密码学协议。这些协议以之前学习的密码学知识为基础实现了一些“奇妙”的事情! | ||
2. 动物园地图 | ||
3. 目录:略。 | ||
4. 协议: | ||
- **通信协议**是为了一个特定目的的数字消息格式与交换规则的形式化描述 | ||
- 协议之于通信,如同算法之于计算 | ||
- 每个人必须知道并同意服从协议 | ||
- 无歧义:每个步骤必须被明确定义且无误解的可能 | ||
- 完备性:对每个可能的情况都必须有一个明确的行为 | ||
- 密码学协议:除了上述属性,还应该不可能比协议中说明的做的更多或者知道的更多 | ||
5. 协议类型 | ||
- 仲裁协议:一个仲裁者是一个公正的可信第三方,帮助完成协议 | ||
- 审判协议:一个法官是也是一个公正的可信第三方。与仲裁者不同,其不直接参与协议,而是来审判协议是否正确执行 | ||
- 自强制协议:最佳的协议类型。协议本身保证公平性。 | ||
- 例子:两人平分蛋糕协议。 | ||
6. 对协议的攻击 | ||
- 被动攻击:攻击者不影响协议 | ||
- 主动攻击:攻击者更改协议以获得优势 | ||
- 作弊者:攻击者是协议中的一方 | ||
- 被动作弊者:按照协议执行,但试图获得比协议所设定的更多的信息 | ||
- 主动作弊者:在协议进程中干扰协议来作弊 | ||
7. 三次传递协议 | ||
- 目的:无共享密钥的通信 | ||
- 类比:同一个箱子来传递秘密。 | ||
9. 中间人攻击 | ||
- 水桶小队攻击 | ||
10. 互锁协议 | ||
- 抵御中间人攻击 | ||
11. 双线性图 | ||
- 两个循环群 | ||
- 双线性图:一个群中两个元素的运算结果,可以映射为另一个群中 | ||
- 定理:如果双线性图的映射是高效的,那么决定性DH问题在$G_1$上是容易的,因为可以通过检查映射后结果是否相等来判断 | ||
12. Jounx密钥交换协议 | ||
- Jounx的一轮、三方密钥协商协议,其中Alice计算密钥$e(bP, cP)^a = e(P, P)^{abc}$; | ||
- 双线性DH(BDH)假设:给定$\left<P, aP, bP, cP \right>$,计算$e(P, P)^{abc}$是难题; | ||
- 定理:给定BDH假设,Jounx协议是安全的 | ||
15. 基于身份的加密 | ||
- IBE: | ||
16. Boneh-Franklin的IBE方案 | ||
17. 盲签名 | ||
18. 群签名 | ||
19. 环签名 | ||
20. 秘密共享 | ||
21. Shamir的秘密共享 | ||
22. 门限密码学 | ||
23. 承诺方案 | ||
24. 零知识证明 | ||
25. 一个玩具例子 | ||
26. 汉弥尔顿环路的零知识证明 | ||
24. 零知识证明和承诺 | ||
- 模拟范式:当一件事Y本来就可以从X得到,那么通过Y并不会从X额外获得什么 | ||
- 在关于是否知道RSA私钥的零知识证明中,验证者给一个密文C后,让证明者给出对应明文M,来验证证明者知道私钥 | ||
- 当没有承诺协议时,验证者可能在不知道明文M时直接给出一个密文C,而证明者返回的消息M令验证者额外知道了M; | ||
- 当加入承诺后时,证明者在给出M之前,先给出对M的承诺,即不泄漏M,又对后面给出的M作出承诺;在验证者提供M后,证明者知道验证者已经知道M了,根据上面的模拟范式可知,之后验证者获得的M对于验证者也不是新信息。 | ||
25. Schnorr协议 | ||
26. 破解RSA能力的零知识证明 | ||
27. 健忘传输 | ||
28. Rabin的健忘传输协议 | ||
29. 二选一健忘传输 | ||
30. 安全多方计算 | ||
31. 同态加密 | ||
32. 端到端投票系统 | ||
33. 三票投票法 | ||
34. 量子密码学 | ||
35. 量子密码学现状 | ||
36. 量子密钥分发 | ||
37. 总结:克拉克三定律之一:任何足够先进的技术和魔法是不可区分的。 | ||
|
||
|
||
|
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
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
Binary file not shown.
Binary file not shown.
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
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
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
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,33 @@ | ||
\begin{tikzpicture}[font=\footnotesize, scale=0.8, every node/.style={scale=0.8}, | ||
ln/.style={text width = 3.5cm, align=left, rounded corners=1ex, draw}, | ||
rn/.style={text width = 3.5cm, align=left, rounded corners=1ex, draw}, | ||
cn/.style={text width = 6cm, align=center, rounded corners=1ex, draw}] | ||
%\node (A) at (0,0) {\Lisa(Client)}; | ||
%\node (B) [right of = A, node distance = 4cm] {\Left\Bart(Server)}; | ||
\node (A) at (0,0) [minimum size=1cm] {}; \Alice{0}{0}{0.4}; \node at (1cm,0) {Client}; | ||
\node (B) [right of = A, node distance = 6.5cm, minimum size=1cm] {}; \Bob{6cm}{0}{0.4}; \node at (7cm,0) {Server}; | ||
\node (1a) [below of=A, node distance=1cm, ln] {gen random $r_c$ \& \\ client key $(sk_c, pk_c)$}; | ||
\node (1b) [below of=B, node distance=1cm] {}; | ||
\draw[-latex] (1a) -- +(4.6,0) node [midway,above] {Hello $r_c, pk_c$}; | ||
\node (2a) [below of=1a, node distance=0.8cm] {}; | ||
\node (2b) [below of=1b, node distance=0.8cm, rn] {gen random $r_s$ \& \\ server key $(sk_s, pk_s)$}; | ||
\draw[-latex] (2b) -- +(-4.6,0) node [midway,above] {Hello $r_s, pk_s$}; | ||
\node (3as) [below of=2a, node distance=1.2cm, ln] {gen shared keys $k^*$ w/ $sk_c, pk_s$, hash(trans)}; | ||
\node (3bs) [below of=2b, node distance=1.2cm, rn] {gen shared keys $k^*$ w/ $sk_s, pk_c$, hash(trans)}; | ||
%\draw[-latex] (3bs) -- (3as) node [midway,above] {}; | ||
\node (3a) [below of=3as, node distance=1.2cm, ln] {verfiy certificate and signature}; | ||
\node (3b) [below of=3bs, node distance=1.2cm, rn] { $\sigma$ = sign($S_{sk}$, trans) \\ $t_s$ = hmac($k^*_s$, trans)}; | ||
\draw[-latex] (3b) -- +(-4.6,0) node [midway,above,text width = 3cm, align=center] {\{certificate of $S_{pk}$\} \\ cert verfiy \{ $\sigma$ \} \\ finished \{ $t_s$ \}}; | ||
\node (4a) [below of=3a, node distance=2cm, ln] {$t_c$ = hmac($k^*_c$, trans)}; | ||
\node (4b) [below of=3b, node distance=2cm] {}; | ||
\draw[-latex] (4a) -- +(4.6,0) node [midway,above] {finished \{$t_c$\}}; | ||
\node (5a) at (3.1,-5.2) [cn] {gen application keys w/ $k^*$, hash(trans)}; | ||
% \node (5a) [below of=4a, node distance=1cm] {Hash of previous msgs}; | ||
% \node (5b) [below of=4b, node distance=1cm] {}; | ||
% \draw[-latex] (5a) -- (5b) node [midway,above] {}; | ||
% \node (6a) [below of=5a, node distance=0.5cm] {}; | ||
% \node (6b) [below of=5b, node distance=0.5cm] {Hash of previous msgs}; | ||
% \draw[-latex] (6b) -- (6a) node [midway,above] {}; | ||
% \node (7a) [below of=6a, node distance=0.5cm] {session keys from $(a, b, s)$}; | ||
% \node (7b) [below of=6b, node distance=0.5cm] {session keys from $(a, b, s)$}; | ||
\end{tikzpicture} |
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