首页 > 其他分享 >52 Things: Number 16: Describe the key generation, signature and verification algorithms for DSA, Sc

52 Things: Number 16: Describe the key generation, signature and verification algorithms for DSA, Sc

时间:2024-04-11 23:34:40浏览次数:29  
标签:Compute 16 generation Things RSA 签名 signature where mod

52 Things: Number 16: Describe the key generation, signature and verification algorithms for DSA, Schnorr and RSA-FDH.

52件事:第16件:描述DSA、Schnorr和RSA-FDH的密钥生成、签名和验证算法。

  This is the latest in a series of blog posts to address the list of '52 Things Every PhD Student Should Know To Do Cryptography': a set of questions compiled to give PhD candidates a sense of what they should know by the end of their first year. In this week, we describe the key generation, signing and verification algorithms of DSASchnorr and RSA-FDH.
这是一系列博客文章中的最新一篇,旨在解决“每个博士生在做密码学时应该知道的52件事”:这是一组问题,旨在让博士生在第一年结束时了解他们应该知道什么。本周,我们将介绍DSA、Schnorr和RSA-FDH的密钥生成、签名和验证算法。


1. DSA 1.DSA The Digital Signature Scheme (DSA), also known as the Digital Signature Standard (DSS), was proposed by the National Institute of Standards and Technology (NIST) in 1991 [1]. Security of DSA is based on the difficult of computing discrete logarithms. But there is no known proof of its security under a standard assumption (like DL), even in the random oracle model
数字签名方案(DSA),也称为数字签名标准(DSS),由美国国家标准与技术研究所(NIST)于1991年提出[1]。DSA的安全性是基于计算离散对数的困难。但在标准假设(如DL)下,即使在随机预言机模型中,也没有已知的安全性证据。   Domain Parameter Generation
域参数生成
 
  1. Select a prime number p, where 2L−1<p<2L and L is a multiple of 64 and 512≤L≤1024.
    选择一个素数 p ,其中 2L−1<p<2L 和 L 是64和 512≤L≤1024 的倍数。
  2. Select a prime divisor q of p−1, where 2159<q<2160.
    选择 p−1 的素数 q ,其中 2159<q<2160 。
  3. Compute a generator g of the subgroup of order q: choose a random integer r, where 1<r<p−1 such that g=r(p−1)/q mod p and g≠1.
    计算 q 阶子群的生成器 g :选择一个随机整数 r ,其中 1<r<p−1 使得#4和 g≠1 。
Key Generation 密钥生成
  1. Select a random integer x, where 0<x<q.
    选择一个随机整数 x ,其中 0<x<q 。
  2. Compute y=gx mod p. 计算 y=gx mod p 。
Then the public key is y and the private key is x. 
那么公钥是 y ,私钥是 x 。   Signing 签名
  1. Select a random integer k, where 0<k<q.
    选择一个随机整数 k ,其中 0<k<q 。
  2. Compute r=(gk mod p) mod q. 计算 r=(gk mod p) mod q 。
  3. Compute s=(h(m)+x⋅r)⋅k−1 mod q, where h(m) is hash of m using SHA-1
    计算 s=(h(m)+x⋅r)⋅k−1 mod q ,其中 h(m) 是使用SHA-1的#2的哈希
The signature on m is the pair (r,s).
m 上的签名是 (r,s) 对。   Verification 验证
  1. Compute u1=h(m)⋅s−1 mod q. 计算 u1=h(m)⋅s−1 mod q 。
  2. Compute u2=r⋅s−1 mod q. 计算 u2=r⋅s−1 mod q 。
  3. Compute v=(gu1⋅yu2 mod p) mod q. 计算 v=(gu1⋅yu2 mod p) mod q 。
  4. Output 1 if v=r, otherwise output 0.
    如果输出 v=r ,则输出 1 ,否则输出 0 。
Correctness 正确性 If (r,s) is a valid signature on m, then we have
如果 (r,s) 是 m 上的有效签名,那么我们有 v=gu1⋅yu2=gh(m)⋅(h(m)+x⋅r)−1⋅k⋅gx⋅r⋅(h(m)+x⋅r)−1⋅k mod p =g(h(m)+x⋅r)⋅(h(m)+x⋅r)−1⋅k mod p =gk mod p Thus the verification succeeds. 
验证成功。   2. Schnorr 2.Schnorr The Schnorr signature is an important DLP-based signature scheme. It works in any prime order group and its security is proven in the random oracle model under DL assumption [2]. 
Schnorr签名是一种重要的基于DLP的签名方案。它适用于任何素数阶群,并且在DL假设下的随机预言机模型中证明了它的安全性[2]。   Domain Parameter Generation
域参数生成
  1. Select a prime number p.
    选择一个素数 p 。
  2. Select a prime divisor q of p−1.
    选择 p−1 的一个素数 q 。
  3. Select a generator g of the subgroup of order q.
    选择顺序为 q 的子组的生成器 g 。
Key Generation 密钥生成
  1. Select a random integer x, where 0<x<q.
    选择一个随机整数 x ,其中 0<x<q 。
  2. Compute y=gx mod p. 计算 y=gx mod p 。
The public key is y and the private key is x.
公钥是 y ,私钥是 x 。   Signing 签名
  1. Select a random integer k, where 0<x<q.
    选择一个随机整数 k ,其中 0<x<q 。
  2. Compute a=gk mod p. 计算 a=gk mod p 。
  3. Compute r=h(m∥a), where m is the message to be signed and h:{0,1}∗→Zq is a hash function. 
    计算 r=h(m∥a) ,其中 m 是要签名的消息, h:{0,1}∗→Zq 是哈希函数。
  4. Compute s=(k+r⋅x) mod q 计算 s=(k+r⋅x) mod q
The signature on m is the pair (r,s).
m 上的签名是 (r,s) 对。   Verification 验证
  1. Compute v=gs⋅y−r mod p 计算 v=gs⋅y−r mod p
  2. Output 1 if v=r, otherwise output 0.
    如果输出 v=r ,则输出 1 ,否则输出 0 。
Correctness 正确性 If (r,s) is a valid signature on m, then we have
如果 (r,s) 是 m 上的有效签名,那么我们有 v=gs⋅y−r=gk+r⋅x⋅g−r⋅x=gk=r Thus the verification succeeds.
验证成功。   3. RSA-FDH 3.RSA-FDH The RSA-FDH (full domain hash) scheme was introduced by Bellare and Rogaway in [3]. It is a RSA-based signature scheme and follows the hash-then-sign paradigm. It makes use of the hash function (the image size of the hash function equals to RSA modulus) to generate random-looking output for the plain RSA signature scheme. Thus it prevents the algebraic attacks on the plain RSA signature scheme and it is able to sign messages of arbitrary length. But it is hard to create such hash function in practice. RSA-FDH can be proven EU-CMA secure in the random oracle model
Bellare和Rogaway在[3]中引入了RSA-FDH(全域哈希)方案。它是一种基于RSA的签名方案,遵循先散列后签名的模式。它利用散列函数(散列函数的图像大小等于RSA模数)为普通RSA签名方案生成看起来随机的输出。因此,它防止了对普通RSA签名方案的代数攻击,并且能够对任意长度的消息进行签名。但是在实践中很难创建这样的散列函数。RSA-FDH可以在随机预言机模型中被证明是EU-CMA安全的。   Key Generation 密钥生成
  1. Select two large primes p and q. 
    选择两个大素数 p 和 q 。
  2. Compute N=p⋅q. 计算 N=p⋅q 。
  3. Select a random integer e, where 1<e<ϕ(N), such that gcd(e,ϕ(N))=1.
    选择一个随机整数 e ,其中 1<e<ϕ(N) ,这样#2。
  4. Compute the integer d, where 1<d<ϕ(N), such that e⋅d=1 mod ϕ(N).
    计算整数 d ,其中 1<d<ϕ(N) ,使得 e⋅d=1 mod ϕ(N) 。
The public key is (N,e) and the private key is (d,p,q).
公钥是 (N,e) ,私钥是 (d,p,q) 。   Signing 签名
  1. Compute s=h(m)d mod N, where m is the message to be signed and h:{0,1}∗→ZN is a hash function.
    计算 s=h(m)d mod N ,其中 m 是要签名的消息, h:{0,1}∗→ZN 是哈希函数。
The signature on m is s.
m 上的签名是 s 。   Verification 验证
  1. Output 1 if se=h(m) mod N, otherwise output 0.
    如果输出 se=h(m) mod N ,则输出 1 ,否则输出 0 。
Correctness 正确性 If s is a valid signature on m, then we have
如果 s 是 m 上的有效签名,那么我们有 se=h(m)d⋅emod N=h(m) mod N Thus the verification succeeds.
验证成功。

标签:Compute,16,generation,Things,RSA,签名,signature,where,mod
From: https://www.cnblogs.com/3cH0-Nu1L/p/18106082

相关文章

  • 52 Things: Number 18: Draw a diagram (or describe) the ECB, CBC and CTR modes of
    52Things-Number18:Drawadiagram(ordescribe)theECB,CBCandCTRmodesofoperation52件事-第18件:绘制(或描述)ECB、CBC和CTR的操作模式Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todo......
  • 52 Things: Number 19: The Shamir secret sharing scheme.
    52Things:Number19:TheShamirsecretsharingscheme.52件事:第19件:沙米尔秘密共享计划。 Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCryptography:asetofquestionscompiledtogi......
  • 52 Things: Number 20: How are Merkle-Damgaard style hash functions constructed?
    52Things:Number20:HowareMerkle-Damgaardstylehashfunctionsconstructed?52件事:第20件:Merkle-Damgaard风格的散列函数是如何构建的? Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCr......
  • 蓝桥杯2016国赛-路径之谜
    0.题目小明冒充X星球的骑士,进入了一个奇怪的城堡。城堡里边什么都没有,只有方形石头铺成的地面。假设城堡地面是nxn个方格。【如图1.png】所示。按习俗,骑士要从西北角走到东南角。可以横向或纵向移动,但不能斜着走,也不能跳跃。每走到一个新方格,就要向正北方和正西方各射一......
  • 2024年腾讯云8核16G服务器性能评测:高并发场景下的表现如何?
    在当今的云计算时代,服务器的配置与性能直接关系到应用程序的稳定运行和用户体验。腾讯云作为国内领先的云服务提供商,其8核16G18M配置的云服务器备受关注。那么,这款服务器究竟能支撑多少人的并发量呢?首先,我们要明确一个概念:并发量不仅取决于服务器的硬件配置,还与应用程序的类型......
  • lc162 寻找峰值(二分法)
      二分法找部分有序数组题class Solution {    public int findPeakElement(int[] nums) {     int left=0;     int right=nums.length-1;     while(left<right){//因为这道题需要用mid和mid+1比较,所以左右不可以相等否则mid+1会越界  ......
  • 52 Things: Number 13: Outline the use and advantages of projective point represe
    52Things:Number13:Outlinetheuseandadvantagesofprojectivepointrepresentation.52件事:第13件:概述投影点表示的用途和优点。 Thisisthelatestinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCryptogr......
  • 52 Things: Number 2: What is the difference between a multi-core processor and a
    52Things:Number2:Whatisthedifferencebetweenamulti-coreprocessorandavectorprocessor?52件事:数字2:多核处理器和矢量处理器有什么区别?Onthefaceofit,youmaybeconfusedastowhatthedifferenceisbetweenthesetwoprocessors.Afterall,yo......
  • 52 Things: Number 1 : Different Types of Processors
    52Things:Number1:DifferentTypesofProcessors52件事:数字1:不同类型的处理器Thisisthefirstinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCryptography.Thesetofquestionshasbeencompiledt......
  • 52 Things: Number 3: Computational and storage power of different form factors
    52Things:Number3:Computationalandstoragepowerofdifferentformfactors52件事:数字3:不同外形尺寸的计算和存储能力Thisisthethirdinaseriesofblogpoststoaddressthelistof '52ThingsEveryPhDStudentShouldKnow' todoCryptography.Thes......