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

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

引言

所谓Key Agreement Scheme(KA Scheme),是密码学协议中的一个重要概念。它描述了双方通过各自的私钥和对方的公钥来达成共享秘密的过程。在这个协议中,私钥公钥是如何生成的,以及如何确保共享秘密的安全性,是KA Scheme的核心问题。

在KA Scheme中,公钥通常表示为K.A.Public,而私钥则表示为K.A.Private。共享秘密K.A.SharedSecret是通过这两个密钥生成的。具体来说,K.A.DerivePublic函数将私钥K.A.Private与公钥K.A.Public相乘,生成K.A.Public。而K.A.Agree函数则将私钥K.A.Private与公钥K.A.Public相乘,生成K.A.SharedSecret

需要注意的是,K.A.DerivePublic生成的结果可能是一个K.A.Public的严格子集,这意味着它可能不包含所有可能的公钥。因此,在实际应用中,必须确保生成的私钥具有足够的熵,以确保K.A.Private的安全性。

安全要求

为了确保KA Scheme的安全性,K.A.FormatPrivate函数必须从输入中提取足够的熵,以生成一个安全的私钥K.A.Private。此外,接下来的章节将介绍Key Derivation Function(KDF),特别是Sapling版本的KDF,它需要满足类似的安全假设。

Key Derivation Function(KDF)

**Key Derivation Function(KDF)**是一种特殊的密钥协议和一次性对称加密方案。它的输入包括:

  • 由KA Scheme生成的共享秘密sharedSecret
  • 其他参数,如密钥扩展的基数等。
  • KDF的输出是一个适用于加密方案的密钥。在Sapling版本的KDF中,输入包括共享秘密sharedSecret和临时公钥epk,输出则是一个适用于对称加密方案的密钥。

    Sapling Key Agreement的具体实现

    Sapling Key Agreement(KA^{Sapling})的实现过程如图1所示。它通过将私钥K.A.Private与共享秘密K.A.SharedSecret结合,生成一个新的密钥用于加密数据。

    Sapling Key Derivation的具体实现

    Sapling Key Derivation(KDF^{Sapling})的实现过程如图2所示。它通过将共享秘密K.A.SharedSecret与临时公钥epk结合,并扩展基数B^{Y^{[l_j/8]}},生成一个适用于对称加密的密钥。

    参考资料

    [1] 详细内容可参考相关技术文档和博客文章。

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

    你可能感兴趣的文章
    Notepad ++ 安装与配置教程(非常详细)从零基础入门到精通,看完这一篇就够了
    查看>>
    Notepad++在线和离线安装JSON格式化插件
    查看>>
    notepad++最详情汇总
    查看>>
    notepad++正则表达式替换字符串详解
    查看>>
    notepad如何自动对齐_notepad++怎么自动排版
    查看>>
    Notes on Paul Irish's "Things I learned from the jQuery source" casts
    查看>>
    Notification 使用详解(很全
    查看>>
    NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty()
    查看>>
    NotImplementedError: Could not run torchvision::nms
    查看>>
    nova基于ubs机制扩展scheduler-filter
    查看>>
    Now trying to drop the old temporary tablespace, the session hangs.
    查看>>
    nowcoder—Beauty of Trees
    查看>>
    np.arange()和np.linspace()绘制logistic回归图像时得到不同的结果?
    查看>>
    np.power的使用
    查看>>
    NPM 2FA双重认证的设置方法
    查看>>
    npm build报错Cannot find module ‘webpack/lib/rules/BasicEffectRulePlugin‘解决方法
    查看>>
    npm build报错Cannot find module ‘webpack‘解决方法
    查看>>
    npm ERR! ERESOLVE could not resolve报错
    查看>>
    npm ERR! fatal: unable to connect to github.com:
    查看>>
    npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
    查看>>