博客
关于我
Zcash中的key aggrement
阅读量:283 次
发布时间:2019-03-01

本文共 2762 字,大约阅读时间需要 9 分钟。

1. 引言

所谓key agreement scheme K A KA KA,是指密码学协议中的双方agree a shared secret,每一方都使用 己方的private key和对方的public key。

key agreement scheme K A KA KA,其public key表示为 K A . P u b l i c KA.Public KA.Public,private key表示为 K A . P r i v a t e KA.Private KA.Private,shared secrets表示为 K A . S h a r e d S e c r e t KA.SharedSecret KA.SharedSecret

  • K A . D e r i v e P u b l i c : K A . P r i v a t e × K A . P u b l i c → K A . P u b l i c KA.DerivePublic: KA.Private\times KA.Public\rightarrow KA.Public KA.DerivePublic:KA.Private×KA.PublicKA.Public,为根据指定的KA private key和base point生成相应KA public key。

  • K A . A g r e e : K A . P r i v a t e × K A . P u b l i c → K A . S h a r e d S e c r e t KA.Agree: KA.Private\times KA.Public\rightarrow KA.SharedSecret KA.Agree:KA.Private×KA.PublicKA.SharedSecret,为the agreement function。

注意:

The range of K A . D e r i v e P u b l i c KA.DerivePublic KA.DerivePublic may be a strict subset of K A . P u b l i c KA.Public KA.Public

安全要求:

  • K A . F o r m a t P r i v a t e KA.FormatPrivate KA.FormatPrivate 必须从输入中保留足够的熵才能用作安全的 KA private key。
  • 下节介绍的key agreement 和 KDF (Key Derivation Function) 均必须满足类似 或 中的suitable adaptive security assumption。

2. Key Derivation

KDF (Key Derivation Function) 为一种特殊的key agreement scheme 和 authenticated one-time symmetric encryption scheme,其输入为:

  • 由key agreement输出的shared secret;
  • 其它参数。

其输出为:

  • a key suitable for the encryption scheme。

实际实现时,Sapling中的 K D F S a p l i n g KDF^{Sapling} KDFSapling的输入为:

  • the shared Diffie-Hellman secret s h a r e d S e c r e t sharedSecret sharedSecret
  • the ephermeral public key e p k epk epk

K D F S a p l i n g KDF^{Sapling} KDFSapling的输出为:

  • key for S y m . E n c r y p t Sym.Encrypt Sym.Encrypt

K D F S a p l i n g : K A S a p l i n g . S h a r e d S e c r e t × B Y [ l j / 8 ] → S y m . K KDF^{Sapling}: KA^{Sapling}.SharedSecret\times\mathbb{B}^{\mathbb{Y}^{[l_j/8]}}\rightarrow Sym.\mathbf{K} KDFSapling:KASapling.SharedSecret×BY[lj/8]Sym.K

【Shielded payment address 中包含的transmission key p k d pk_d pkd 可用于 a “key-private” asymmetric encryption scheme。所谓"key-private"是指,ciphertexts中不会泄露其加密key的信息,只对拥有加密key对应private key(此处也可称为receiving key)的一方可见。该机制主要用于communicate encrypted output notes on the block chain to their intended recipient,拥有receiving key的一方可扫描区块链来获取notes addressed to them 并 decrypt those notes。】

详细见博客 ,其中的基于 p k d pk_d pkd实现的asymmetric encrytion(输出为 C e n c C^{enc} Cenc)的构建过程中用到的 K A S a p l i n g 、 K D F S a p l i n g 和 S y m KA^{Sapling}、KDF^{Sapling}和Sym KASaplingKDFSaplingSym 都要求为 IND-CCA2-secure 和 key-private 的。

Key privacy的定义参见 。

3. Sapling key agreement 具体实现

Sapling key agreement K A S a p l i n g KA^{Sapling} KASapling 的具体实现为:

在这里插入图片描述

4. Sapling key derivation 具体实现

Sapling key derivation K D F S a p l i n g KDF^{Sapling} KDFSapling 的具体实现为:

在这里插入图片描述

参考资料

[1]

转载地址:http://fkqx.baihongyu.com/

你可能感兴趣的文章
MySQL I 有福啦,窗口函数大大提高了取数的效率!
查看>>
mysql id自动增长 初始值 Mysql重置auto_increment初始值
查看>>
MySQL in 太多过慢的 3 种解决方案
查看>>
MySQL InnoDB 三大文件日志,看完秒懂
查看>>
Mysql InnoDB 数据更新导致锁表
查看>>
Mysql Innodb 锁机制
查看>>
MySQL InnoDB中意向锁的作用及原理探
查看>>
MySQL InnoDB事务隔离级别与锁机制深入解析
查看>>
Mysql InnoDB存储引擎 —— 数据页
查看>>
Mysql InnoDB存储引擎中的checkpoint技术
查看>>
Mysql InnoDB存储引擎中缓冲池Buffer Pool、Redo Log、Bin Log、Undo Log、Channge Buffer
查看>>
MySQL InnoDB引擎的锁机制详解
查看>>
Mysql INNODB引擎行锁的3种算法 Record Lock Next-Key Lock Grap Lock
查看>>
mysql InnoDB数据存储引擎 的B+树索引原理
查看>>
mysql innodb通过使用mvcc来实现可重复读
查看>>
mysql insert update 同时执行_MySQL进阶三板斧(三)看清“触发器 (Trigger)”的真实面目...
查看>>
mysql interval显示条件值_MySQL INTERVAL关键字可以使用哪些不同的单位值?
查看>>
Mysql join原理
查看>>
MySQL Join算法与调优白皮书(二)
查看>>
Mysql order by与limit混用陷阱
查看>>