RSA signatures and Rabin–Williams signatures the state of the art

合集下载

RSA加密

RSA加密

2、欧拉函数
欧拉函数: 表示少于或等于n的正整数中与n互质的数的数目,又称为φ函数、欧拉商数等。 欧拉 函数,以φ(n)表示。在1到8之中,与8形成互质关系的是1、3、5、7,所以 φ(8) = 4。 φ函数的值: 通式:φ(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…..(1-1/pn),其中p1, p2……pn为x的所有质因 数,x是不为0的整数。φ(1)=1(唯一和1互质的数(小于等于1)就是1本身)。(注意:每种质 因数只一个。比如12=2*2*3那么φ(12)=12*(1-1/2)*(1-1/3)=4。 基本性质: 1. φ(1)=1, 小于等于1的正整数中唯一和1互质的数就是1本身。 2. 如果n是质数,则 φ(n)=n-1 。因为质数与小于它的每一个数,都构成互质关系。比如5 与1、2、3、4都构成互质关系。 3. 如果正整数是质数的次幂, 那么φ(n)=φ(p^k)=p^k – p^(k-1) = (p-1)p^(k-1)。 4. 欧拉函数是积性函数, 即对于两个互质的正整数m和n, φ(mn)=φ(m) φ(n) 。
四、密钥生成的步骤
假设鲍勃要向爱丽丝发送加密信息m,他就要用爱丽丝的公钥 (n,e) 对m进行加密。这里需 要注意,m必须是整数(字符串可以取ascii值或unicode值),且m必须小于n。 所谓"加密",就是算出下式的c: me ≡ c (mod n) 爱丽丝的公钥是 (3233, 17),鲍勃的m假设是65,那么可以算出下面的等式: 6517 ≡ 2790 (mod 3233) 于是,c等于2790,鲍勃就把2790发给了爱丽丝。 (2)解密要用私钥(n,d) 爱丽丝拿到鲍勃发来的2790以后,就用自己的私钥(3233, 2753) 进行解密。可以证明,下面 的等式一定成立: cd ≡ m (mod n) 也就是说,c的d次方除以n的余数为m。现在,c等于2790,私钥是(3233, 2753),那么,爱 丽丝算出 27902753 ≡ 65 (mod 3233) 因此,爱丽丝知道了鲍勃加密前的原文就是65。 至此,"加密--解密"的整个过程全部完成。

一个高效的基于RSA 签名的合同签署协议

一个高效的基于RSA 签名的合同签署协议
Bob 和 TTP 的身份信息。本协议包括 3 个 时限 t , 以及 Alice ,
其中 H 是一个映射到 Z q 上的哈希函数, 得到的证据为 (α β
G M r) , 记为 pf (PS X (m)) 。
证据验证: 当 Y 得到 PS X (m) 和 pf (PS X (m)) , 计算
和非交互的认证技术, 提出一个新的合同签署协议, 分析表明, 新协议不仅具有优化性、 公平性、 实时终止性、 无滥用性、 TTP 的无 状态性等优点, 而且具有高效性的特点。 关键词: 公平交换; 合同签署; 可转化签名; 非交互认证 DOI: 10.3778/j.issn.1002-8331.2011.11.021 文章编号: 1002-8331 (2011) 11-0075-03 文献标识码: A 中图分类号: TP309
被乘法分解为 d1 d 2 , 满足 d1d 2 e = 1 mod ϕ(n) 。 d1 是 Alice 与 TTP 共享的秘密钥, 它将被用来转化部分签名为最终签名。 设交换的双方为 Alice 和 Bob , 可信第三方表示为 TTP。 假定用户之间的通信信道是不可靠的, 即在该信道中传送信 息可能丢失, 但用户与 TTP 之间的信道是可恢复的即如果一 个消息插入这个信道最终将被传递。同时, 要求 TTP 对每次 请求都给予有效且诚实的应答即 TTP 是诚实的。 Alice 执行 交换协议, 发起与 Bob 之间的公平交换。在进行交换之前, 交 换双方有一个协商过程, 二者同意对合同文本 m 进行签署。 而且, 合同文本应明确包含以下信息: 预先确定的一个合理的
1.忻州师范学院 数学系, 山西 忻州 034000 2.西安理工大学 理学院, 西安 710054 1.Department of Mathematics, Xinzhou Teachers’University, Xinzhou, Shanxi 034000, China 2.School of Sciences, Xi’ an University of Technology, Xi’ an 710054, China ZHANG Huifang, WANG Xiaofeng, YANG Ruilan, et al.Efficient contract signing protocol based on RSA puter Engineering and Applications, 2011, 47 (11) : 75-77. Abstract: Fair exchange plays an increasingly important role in e-commerce, the contract signing is a specific example of fair exchange.Based on convertible signature scheme and non-interactive verification technology, a new contract signing protocol is proposed.Analysis shows that the new protocol not only possesses the properties of optimism, fairness, timely termination, abuse-freeness and TTP’ s statelessness, but also has the characteristic of high-efficiency. Key words:fair exchange; contract signing; convertible signature; non-interactive verification 摘 要: 公平交换在电子商务活动中起着越来越重要的作用, 合同签署协议是公平交换的一种具体实例。基于可转化签名思想

rsa算法基本流程及签名流程

rsa算法基本流程及签名流程

1、RSA算法及其实现RSA加密算法是目前应用最广泛的公钥加密算法,特别适用于通过Internet 传送的数据,常用于数字签名和密钥交换,被国际上的一些标准化组织ISO、ITU、SWIFT作为标准来采用。

1.1 RSA算法的基本原理独立地选取两个大素数p≈q(保密)。

计算n=pq(公开),其中∅n为欧拉函数值∅n=p−1q−1(保密)。

随机选取一整数e,满足1≤e≤∅n,gcd e,∅n=1,e是公开的密钥即公钥。

用Euclid算法计算d,d=e−1mod∅n,d是保密的密钥即私钥。

加密变换:对明文m∈Z n,密文为c=E k m=m e mod n。

解密变换:对密文c∈Z n,明文为m=D k c=c d mod n。

其中,加密变换、解密变换两步也可以改为用d加密,e解密,就变成签名和验证过程。

1.2 RSA算法的实现步骤1素数的产生对随机数作素性检测,若通过则为素数,否则增加一个步长后再做素性检测,直到找出素数。

素性检测采用Fermat测试。

这个算法的理论依据是费尔马小定理:如果m是一个素数,且a不是m的倍数,那么根据费尔马小定理a m−1=1 mod m。

实际应用a m−1=1 mod m a m=a mod m a= a m mod m,此对于整数m,需计算a m mod m,再将结果与a比较。

如果两者相同,则m为素数。

选取a=2,则a一定不会是任何素数的倍数。

步骤2随机数的产生随机数不仅用于密钥生成,也用作公钥加密时的填充字符。

它必须具有足够的随机性,以防止破译者掌握随机数的规律后重现密钥的配制过程或者探测到加密块中的明文。

因为在计算机上不可能产生真正的随机数,实际采用周期大于2256位的伪随机序列发生器。

步骤3密钥的生成(1)选择e的值为2623883或者94475891;(2)随机生成大素数p,直到gcd(e, p-1)=1;(3)随机生成不同于p的大素数q,直到gcd(e,q-1)=1;(4)计算n=pq,φ(n)=(p-1)(q-1);(5)计算d,d=e−1mod∅n;(6)计算dmod(p-1),dmod(q-1);(7)计算(q-1)modp;(8)将(e,n) 放入RSA公钥;将n,e,dmod(p-1),dmod(q-1),(q-1)modp放入RSA私钥。

基于RSA的可撤销属性签名Revocation of users in RSA attribute-based signatures

基于RSA的可撤销属性签名Revocation of users in RSA attribute-based signatures
Degree in Mathematics
Title: Revocation of Users in RSA Attribute-Based Signatures Author: María Rosa Fueyo Pestaña Advisor: Javier Herranz Sotoca Department: Matemàtica Aplicada IV Academic year: 2013/2014
María Rosa Fueyo Pestaña
Advisor: Javier Herranz Sotoca
Matemàtica Aplicada IV
Abstract
Keywords: Attribute-based signatures, RSA, privacy, unforgeability, revocation, accumulators, Zero-Knowledge Proof. MSC2000: 92A60, 92A62
Notation
Integer numbers N = P Q RSA modulus ϕ(·) Euler Function ZN ∗ Set of integers less than N and relative prime to N neg (·) Negligible function S Probability space x ←R S Chosen at random according to S PK· Zero-Knowledge Proof of Knowledge P Set of Attributes (P , Γ) Signing Policy
ZCoLeabharlann tentsChapter 1. Introduction Chapter 2. Preliminaries 1. Number-Theoretic assumptions 2. Proofs of Knowledge 3. Attribute-Based Signatures Chapter 3. Universal Accumulators 1. Universal Accumulator 2. Dynamic Universal Accumulator Chapter 4. Ecient Proof that a Committed Value was not Accumulated 1. Formulation of the protocol 2. Detailed analysis of the protocol Chapter 5. Incorporating Revocation of Users into Attribute-Based Signatures 1. Existing Attribute-Based Scheme for a Threshold Signing Policy 2. Incorporating Revocation into the Signature Scheme 3. Eciency Chapter 6. Conclusions References 1 3 3 4 6 9 9 12 15 15 16 21 21 23 24 27 29

rsa公钥 字符串 -回复

rsa公钥 字符串 -回复

rsa公钥字符串-回复RSA公钥字符串是一种用于加密和解密敏感信息的加密算法,它是由三位数学家—罗纳德·瑞文斯特(Ron Rivest)、阿迪·萨莫尔(Adi Shamir)和伦纳德·阿德曼(Leonard Adleman)于1977年共同提出的。

RSA公钥字符串使用两个不同的密钥,即公钥和私钥。

在本文中,我将详细介绍RSA公钥字符串的概念、原理、生成方法和应用。

首先,我们来了解一下RSA公钥字符串的概念。

RSA公钥字符串是一种非对称加密算法,它使用一对密钥来进行加密和解密。

其中,公钥可以公开给所有人使用,用于加密信息;而私钥则只有信息的接收者才能拥有,用于解密已加密的信息。

RSA公钥字符串的安全性基于一个数学问题,即大整数的质因数分解问题,这个问题目前没有有效的解决方法,因此RSA 算法被认为是安全的。

其次,我们来了解一下RSA公钥字符串的原理。

RSA公钥字符串的核心原理是基于模幂运算和模反演的数论问题。

具体来说,将任意长度的消息m转换为一个较短的数字表示,然后利用公钥中的指数和模数对其进行加密。

接收者收到加密的消息后,使用私钥中的指数和模数对其进行解密,从而得到原始的消息。

在这个过程中,模数是一个非常大的素数乘积,这使得对其进行质因数分解变得困难,从而保证了消息的安全性。

接下来,我们来了解一下RSA公钥字符串的生成方法。

RSA公钥字符串的生成分为四个步骤:选取两个大素数、计算模数、选择指数、计算私钥。

首先,选取两个大素数p和q,其中p不等于q,并计算它们的乘积n。

然后,选择一个指数e,它与(p-1)(q-1)互质。

接下来,计算e关于(p-1)(q-1)的模反演d。

最后,将n作为模数,e作为公钥,d作为私钥,得到RSA 公钥字符串。

最后,我们来了解一下RSA公钥字符串的应用。

RSA公钥字符串广泛应用于安全通信、数字签名和密钥交换等领域。

在安全通信领域,发送者可以使用接收者的公钥对敏感信息进行加密,从而保证信息的机密性;而接收者则使用自己的私钥对已加密的信息进行解密。

第7讲 公钥密码体制

第7讲 公钥密码体制

二、RSA密码体制
参数选择:
独立地选取两大素数p1和p2(各512bit的数), 计算 n=p1×p2 其欧拉函数值(n)=(p1-1)(p2-1) 随机选一整数e, 1e<(n),((n), e)=1(因而在模(n)下e有逆元) d=e-1 mod (n) 公钥为n,e; 私钥为d (p1, p2不再需要,可以销毁)
* MIPS-年指以每秒执行1,000,000条指令的计算机运行一年
二、RSA密码体制
安全性:分解模数n
技术进展使分解算法和计算能力在不断提高,计算所需的硬件费用在不断下降 RSA-129: 110位十进制数字早已能分解。 Rivest等最初悬赏$100的RSA-129,已经 由包括五大洲43个国家600多人参加,用1600台机子同时产生820条指令数据, 通过Internet网,耗时8个月,于1994年4月2日
但数学上至今还未证明分解模就是攻击RSA的最佳方法,
也未证明分解大整数就是NP问题, 可能有尚未发现的多项式时间分解算法。 人们完全可以设想有另外的途径破译RSA, 如求出解密指数d或找到(p1-1)(p2-1)等。 但这些途径都不比分解n来得容易。 甚至Alexi等[1988]曾揭示,从RSA加密的密文恢复某些比特的困难性也和 恢复整组明文一样困难。 这一视在困难性问题是个NP问题,但还没人证明它为NPC问题。
因为(e1, e2,)=1,所以由Euclidean算法有r e1+s e2=1
计算 (y1-1)-r y2s = x mod n (假设r是负数)
二、RSA密码体制
安全性:低加密指数攻击
小的e可加快加密和验证签字速度,且所需的存储密钥空间小
但若加密钥e选择得太小,则容易受到攻击 网中三用户的加密钥e均选3,分别模n1, n2, n3 (互素,否则可求出公因子,而降低安全性)

Rabin密码

加密过程:某用户B欲加密明文消息M发送给 用户A,随机选一整数k,0 ≤ k ≤ p-1 计算消息密钥 K : K = yk mod p 计算密文对: C = {C1,C2}
C1≡gk mod p,C2≡ykM mod p,
发送到接收者A
ElGamal 解密
解密过程:首先计算 message key K: K C1x mod p 计算明文: M C2 (C1x )1 mod p 这是因为 C2 (C1x ) 1 mod p y k M ( g kx ) 1 mod p
椭圆曲线公钥密码ECC




椭圆曲线上一个点P的k倍表示表示P+P+…(k个点P “相加”),记为kP。 椭圆曲线上一个点P的所有倍数点组成了椭圆曲线的 子集,该子集是该椭圆曲线关于该“加法”的循环子 群。 给定“椭圆曲线”上的点P,给定整数k,计算 “kP=?”是容易的。(折半相加) 给定“椭圆曲线”上的两个点P和Q,求整数“? P=Q”是困难的。这个问题称为椭圆曲线上的离散对 数问题。
y k M ( y k ) 1 mod p M mod p
ElGamal Example
用户公用 p=97 及本原根 g=5 ; recipient Bob 选择秘密钥xB=58
& 计算并发布公钥yB=558=44 mod 97
Alice 要加密 M=3 to Bob 首先得到 Bob的公开密钥 yB=44,选择随机 k=36 计算: K=4436=75 mod 97 计算密文对: C1 = 536 = 50 mod 97 C2 = 75∙3 mod 97 = 31 mod 97
Rabin密码体制
Rabin密码体制是对RSA的一种修正,它 有以下两个特点: 它不是以一一对应的单向陷门函数为基 础,对同一密文,可能有两个以上对应的明 文; 破译该体制等价于对大整数的分解。 RSA中选取的公开钥e满足1<e<φ(n),且 gcd(e,φ(n))=1。Rabin密码体制则取e=2。

Content Extraction Signatures


Abstract Motivated by emerging needs in online interactions, we define a new type of digital signature called a ‘Content Extraction Signature’ (CES). A CES allows the owner, Bob, of a document signed by Alice, to produce an ‘extracted signature’ on selected extracted portions of the original document, which can be verified to originate from Alice by any third party Cathy, while hiding the unextracted (removed) document portions. The new signature therefore achieves verifiable content extraction with minimal multi-party interaction. We specify desirable functional and security requirements for a CES (including an efficiency requirement: a CES should be more efficient in either computation or communication than the simple multiple signature solution). We propose and analyze four CES constructions which are provably secure with respect to known cryptographic assumptions and compare their performance characteristics. Key Words. Content-extraction, privacy, fragment-extraction, content blinding, fact verification, content verification, digital signatures, provable security.

rsa公钥固定值

rsa公钥固定值(实用版)目录1.RSA 加密算法简介2.RSA 公钥和私钥的概念3.RSA 公钥的固定值4.RSA 的安全性5.RSA 的应用场景正文1.RSA 加密算法简介RSA 加密算法是一种非对称加密算法,由罗纳德·里维、阿迪·萨莫尔和伦纳德·阿德曼三位数学家于 1977 年提出。

该算法安全性高、应用广泛,被广泛应用于数据传输、数字签名等领域。

2.RSA 公钥和私钥的概念在 RSA 加密算法中,每个用户有一个私钥和一个公钥。

私钥由用户自己保管,用于解密和签名;公钥可以公开发布,用于加密和验证签名。

私钥和公钥是通过大素数分解和模运算生成的,它们具有数学关联,但无法通过公钥推导出私钥。

3.RSA 公钥的固定值RSA 公钥的固定值是指在 RSA 加密过程中,公钥的一个特定值,该值在加密过程中保持不变。

这个固定值通常是一个大整数,用于计算加密过程中的模数。

由于 RSA 加密算法的数学原理,这个固定值在算法中具有重要作用,保证了加密过程的安全性和可靠性。

4.RSA 的安全性RSA 加密算法的安全性主要依赖于大素数分解的困难性。

目前,尚无有效的算法能够在合理的时间内分解大素数。

因此,RSA 加密算法被认为是安全的。

然而,随着计算机技术的发展,RSA 的安全性可能会受到威胁。

为了提高安全性,RSA 算法中的模数通常选取很大的数值。

5.RSA 的应用场景RSA 加密算法广泛应用于各种安全通信和数据处理场景,如:- 数据传输:RSA 加密算法可用于加密传输数据,保证数据传输过程中的安全性和完整性。

- 数字签名:RSA 算法可用于对数据进行数字签名,确保数据的真实性和完整性,以及发送者的身份验证。

- 密钥协商:RSA 算法可用于在通信双方之间协商会话密钥,从而实现更高级别的加密通信。

总之,RSA 公钥固定值作为 RSA 加密算法的一个重要组成部分,保证了算法的安全性和可靠性。

rsa 加密 编码方式

rsa 加密编码方式(实用版)目录1.RSA 加密简介2.RSA 加密的编码方式3.RSA 加密的优势与应用正文1.RSA 加密简介RSA 加密是一种非对称加密算法,由罗纳德·里维、阿迪·萨莫尔和伦纳德·阿德曼三位数学家于 1977 年提出。

RSA 加密算法的名称来源于这三位数学家的首字母,它是目前应用最广泛的公钥加密算法之一。

2.RSA 加密的编码方式RSA 加密算法采用公钥和私钥两种不同的密钥进行加密和解密。

公钥和私钥是一对密钥,它们具有数学关联。

公钥可以公开发布,而私钥必须保密。

RSA 加密的过程如下:(1)选择两个大素数 p 和 q,计算它们的乘积 n=pq。

(2)计算 n 的欧拉函数(n)=(p-1)(q-1)。

(3)选择一个整数 e,使其满足 1<e<(n),且 e 和(n) 互质。

(4)计算 e 的模逆元素 d,即满足 (d * e) % (n) = 1 的整数 d。

(5)将公钥设为 (e, n),私钥设为 (d, n)。

(6)发送方选择一个随机数 r,计算 c=m^e mod n,其中 m 为待发送的信息,e 为公钥的指数,mod 表示模运算。

(7)发送方将 c 和公钥 (e, n) 发送给接收方。

(8)接收方计算 m=c^d mod n,即对收到的密文 c 进行私钥解密。

3.RSA 加密的优势与应用RSA 加密算法具有以下优势:(1)安全性高:RSA 加密算法基于大数因子分解问题,目前尚无有效的攻击方法。

(2)可靠性强:RSA 加密算法适用于网络通信等多种场景。

(3)灵活性:RSA 加密可以与其他加密算法结合使用,如对称加密算法、数字签名等。

RSA 加密算法广泛应用于以下场景:(1)数字签名:RSA 加密算法可以用于数字签名,保证数据的完整性和真实性。

(2)密钥协商:RSA 加密算法可以用于安全地协商对称加密算法的密钥。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

RSA signatures and Rabin–Williams signatures:the state of the artDaniel J.BernsteinDepartment of Mathematics,Statistics,and Computer Science(M/C249) The University of Illinois at Chicago,Chicago,IL60607–7045djb@cr.yp.toDate of this document:2008.01.31.Permanent ID of this document:5e92b45abdf8abc4e55ea02607400599.Abstract.State-of-the-art modular-root signature systems incorporatemany useful features that were not present in the original RSA signaturesystem.This paper surveys those features.1IntroductionYou’re a cryptographer.You know the general idea of modular-root signature systems such as“RSA”:a signature is an e th root modulo a public key n whose prime factorization is known to the signer.But did you know that signatures can be compressed to1/2size?That keys can be compressed to1/3size?That signature verification can be much faster than modular cubing—in fact,even faster than modular squaring?State-of-the-art modular-root signature systems have evolved far beyond the very simple signature system published by Rivest,Shamir,and Adleman thirty years ago.Thefirst few steps in this evolution,the most dramatic improvements in speed and in security,are integrated into typical“RSA”descriptions and are well known;but it seems to me that most cryptographers haven’t heard about the most recent improvements and don’t realize how small and fast these signature systems can be.My goal in this paper is to explain,starting from the original1977/1978 RSA signature system,the changes that have produced today’s state-of-the-art signature systems.Specifically:•Section2,hashing(1979Rabin):Messages are scrambled by a public hash function H.A signature of m is an e th root of H(m),not an e th root of m.This is essential for security.•Section3,small exponent(1979Rabin):The exponent e in the signature equation s e≡···is a smallfixed integer such as3,rather than a large integer chosen randomly by the signer.This makes verification much faster, and saves space in public keys.•Section4,exponent2(1979Rabin):The exponent is2rather than3.This slightly complicates signing,but it speeds up verification,and it improves the signature-compression and signature-expansion features discussed later.•Section5,hash randomization(1979Rabin):The signer inserts a B-bit ran-dom string r in front of a message m being signed.A signature of m is a root of H(r,m).Interesting options for B include B=0,B=1,and B=128;each option has advantages and disadvantages.•Section6,tweaks(1980Williams):Square roots s are replaced by tweaked square roots(e,f,s).This speeds up signing.•Section7,signature lifting(1997Bernstein):A square root s of h modulo pq is transmitted as(s,t)satisfying s2−tpq=h.This option doubles the space taken by signatures but allows extremely fast verification.•Section8,message recovery:Hash functions H are designed so that thefirstC bits of(r,m)can be efficiently computed from H(r,m).This allows usersto compress signed messages by C bits with efficient decompression.•Section9,lattice signature compression(2004Bleichenbacher):A square root s is transmitted as the largest under-half-size denominator in the continued fraction for fs/pq.This option requires some computation for compression and decompression,but eliminates1/2of the space taken by signatures.•Section10,lattice key compression(2003Coppersmith):Keys are chosen to share the top2/3of their bits with a standard key.This option takes extra time in key generation but eliminates2/3of the space taken by keys. Implementors will have to consult other sources to see how state-of-the-art hash functions H are constructed,but all other details of modular-root signature systems should be clear from this paper.I don’t mean to suggest that the only interesting signature systems are modular-root signature systems.In applications where signature length is much more important than verification time,systems of ElGamal–Schnorr–ECDSA type are better choices than modular-root signature systems.2HashingIn state-of-the-art systems,messages are scrambled by a public hash function H.A signature of m is not an e th root of m modulo the public key n;it is an e th root of H(m)modulo the public key n.This is essential for security. History.The system proposed by Rivest,Shamir,and Adleman did not hash messages;it was trivially breakable.Specifically,[31,page122,first display] defines a signature S of a message M under a public key B by“S=D B(M),”never mentioning hashing;[31,page122,third display]defines D as a power of its input.One trivial attack is to forge the message1with signature1.Rabin’s system in[30]did hash messages;it remains unbroken today.The apparent security benefit of hashing was mentioned in[30,page10,last sentence]:“Actually,this[attack idea]does not seem a serious threat because of the hashing effected by C(M).”Many authors unjustifiably refer to an oversimplified,trivially breakable, non-hashing system as“Rabin’s system”;consider,for example,the claim by Goldwasser,Micali,and Rivest in[17,Section3]that“Rabin’s signature schemeis totally breakable if the enemy uses a directed chosen-message attack.”Some authors incorrectly describe hashing as merely a way to handle long messages, rather than as an essential component of the system no matter what the message length might be;see,e.g.,[32,Section7.1].Modern treatments of“RSA”usually include hashing but usually fail to give Rabin any credit for the idea.3Small exponentIn state-of-the-art systems,the exponent e in the signature equation s e≡···is a smallfixed integer,rather than a large integer chosen randomly by the signer. This makes verification much faster.It also saves space in public keys. History.The system proposed by Rivest,Shamir,and Adleman used large exponents.See[31,page123,fifth line]:“You then pick the integer d to be a large,random integer which is relatively prime to(p−1)∗(q−1)...The integer e is...the‘multiplicative inverse’of d.”Rabin in[30,page5]pointed out the tremendous speed advantage of small exponents:“computation time for this function is several hundred times faster... than the corresponding algorithms in[the1978RSA paper].”Most modern descriptions of“RSA,”and all serious“RSA”implementations, include smallfixed exponents,typically3or17or65537.Most of the descriptions fail to give Rabin any credit for the idea,and many of the descriptions actively miscredit small exponents to the RSA papers[16]and[31].For example,Knuth in[22,pages386–389](and again in[23,pages403–406])explained an exponent-3system and unjustifiably called it“RSA.”As another example,here’s a quote from a well-known algorithms book by Cormen,Leiserson,Rivest,and Stein:“The RSA cryptosystem...Select a small odd integer e...The RSA cryp-tosystem was proposed in1977by Rivest,Shamir,and Adleman.”(Emphasis added.)Large exponents have inexplicably attracted more attention than smallfixed exponents as the topic of security proofs,even though small exponents are just as easy for theoreticians to handle and much more interesting for practition-ers.Bellare and Rogaway in[6]analyzed a traditional system that they called “FDH,”and a system of their own design called“PSS,”in both cases using large exponents.See[6,Section2.1];see also Coron’s[13,Section2.3]and[15, Definition4].Katz and Wang were exponent-agnostic in[18]:they stated their results for more general“claw-free permutation pairs.”The“PRab”claim in[6, Theorem6.1]used a small exponent,but the proof was merely outlined;[14, Theorem4]used a small exponent,but no proof was given.“Strong RSA”proofs require large exponents,but“strong RSA”signature systems do not provide fast verification and do not seem to have attracted any practical interest.4Exponent2State-of-the-art systems use exponent2rather than exponent3.This speeds up verification,and improves the signature-compression and signature-expansion features discussed in subsequent sections.The signer’s secret primes p and q are chosen from3+4Z to simplify signing.How signers choose square roots.A square h modulo pq usually does not have a unique square root.Which choice does the signer make?One canfind three answers in the literature.Principal square roots:The signerfinds the unique square root s of h such that s is itself a square.The most obvious choice of a square root of h modulo p is h(p+1)/4mod p;the most obvious choice of a square root of h modulo q is h(q+1)/4mod q;combining these two choices by the Chinese remainder theorem produces the principal square root of h modulo pq.This is the simplest,and the most popular,signing algorithm.|Principal|square roots:The signerfinds the principal square root s of h as above,and then replaces s with min{s,pq−s}.The point is that min{s,pq−s} takes a bit less space than s.Unstructured square roots:The signer chooses s from the uniform distri-bution among square roots of h.There is a danger here:revealing two uniform random square roots of h has a good chance of immediately revealing a factor of n.The easiest way to avoid this danger is to usefixed square roots,i.e.,to repeat the same square root of h if the same h appears again.Fixed unstructured square roots might seem to require the signer to remem-ber all previous choices of square roots.However,the signer can produce indistin-guishable results without memory,assuming standard conjectures in secret-key cryptography.The trick is simple:the signer replaces the random bits with se-cret functions of h.This trick was posted to sci.crypt in1997by Barwood and independently by Wigley;see[3]and[33].The general idea of replacing a randomly generated array by output of a secret function,so that the array can be regenerated on demand(and can have exponential size or more)without consuming memory,was published by Goldreich in1986,with credit to Levin; but Goldreich’s signatures were notfixed.Security proofs require different work for principal square roots,|principal| square roots,and unstructured square roots.Unstructured square roots allow the simplest proofs,and seem to allow“tight”proofs in some cases where prin-cipal signatures seem to allow only“loose”proofs.See my paper[10]for further discussion.History.Exponent2was introduced by Rabin in[30].Most writers fail to give credit to Rabin for hashing and small exponents but do give credit to Rabin for exponent2.I see no reason to use any other exponent;perhaps2will eventually become the most popular exponent,and,as a side effect,Rabin will receive more of the recognition that he deserves.5Hash randomization:rIn Rabin’s system,the signer actually computes a square root of H(r,m),not a square root of H(m).Here r is a string selected randomly by the signer.The number of bits of r is a system parameter B.This randomization was introduced by Rabin in[30]:specifically,Rabin suggested that the signer choose a random 60-bit string r.One can see,in the literature,five different strategies to choose the parameter B:•Choose B=0.This means that r is empty and that the H input is not actually randomized.The main argument for this choice is that any largerB means extra effort to generate r,extra effort to include r in the H input,and extra effort to transmit r along with s.•Choose B=1.The main argument for this choice is that a nonzero B is required for the type of tight security proof introduced by Katz and Wang in[18].The conventional wisdom is that B=0does not allow a tight securityproof;see the“FDH”analyses in[6]and[13].On the other hand,my paper[10]proves tight security forfixed unstructured signatures even in the caseB=0.Koblitz and Menezes conjecture in[24,Section3.4]and[25,Section4.3]that B=1has the same security as B=0.•Choose B=8.As a historical matter,Rabin’s system was able to produce signatures for only about1/4of all choices of r(since only a small fraction of all integers mod pq are squares),and Rabin suggested trying again if thefirst r failed;having256choices of r means that all choices will fail with prob-ability about2−106.However,the Rabin–Williams system eliminates these failures,as discussed in Section6.The only remaining argument for B=8 is that it marginally improves the tightness of the Katz–Wang approach.•Choose B large enough to prevent the attacker from guessing r in advance;for example,B=128.This choice allows a different type of tight secu-rity proof that seems to have been rendered obsolete by the idea of“fixed”signatures.•Choose B large enough to prevent all collisions in r:for example,B=256.This choice allows an older type of tight security proof that seems to have been obsolete for many years.My impression is that,in practice,the choice B=0is by far the most popular choice,although I have not done an exhaustive study.One might wonder,from the above description,why large choices of B would attract any interest,and in particular why Rabin chose B=60rather than B= 8.The answer is that large choices of B are often conjectured to make non-generic attacks,attacks that pay attention to the hash function H,more difficult.For example,MD5-based signatures have been broken for B=0but not for B=128. Does a larger B allow us to choose a smaller,faster hash function H?Could this compensate for the direct costs of a longer r?Resolving these questions means understanding the cost-security tradeofffor hash functions,obviously not aneasy task.For the moment I recommend that theoreticians and practitioners remain agnostic and continue to investigate all possible B’s.Reader beware:Many authors have failed to give Rabin proper credit for his randomized signatures(r,s).For example,Goldwasser and Bellare have posted lecture notes(1)claiming that Rabin introduced a signature system with neither H nor r;(2)assigning credit to a1983paper of Goldwasser,Micali,and Yao for “pioneering”randomized signatures;and then(3)describing a“PSS0”system—randomized(r,s)—as if it were new.Similar comments apply to the“PFDH”system in[15]and[18].6The tweaks e and fRecall that Rabin’s system needed to try several values of r,on average about4 values,beforefinding a square H(r,m)modulo pq.The Rabin–Williams system eliminates this problem by using tweaked square roots in place of square roots.A tweaked square root of h modulo pq is a vector(e,f,s)such that e∈{−1,1}, f∈{1,2},and efs2−h∈pq Z;the signer’s secret primes p and q are chosen from3+8Z and7+8Z respectively.Each h has exactly four tweaked square roots,so each choice of r works,speeding up signatures.Avoiding Jacobi symbols.I’ve noticed that some programmers fear exponent 2.There appears to be a widespread belief that fast exponent-2signing requires Euclid-type computations of Jacobi symbols.For example,the“IEEE Standard Specifications for Public-Key Cryptography”claim that,compared to exponent 2,exponent3has a“code-size and speed advantage because there is no need to compute the Jacobi symbol.”The simple fact,however,is that Euclid-type computations of Jacobi symbols are not required for Rabin–Williams signatures.Here is a straightforward high-speed fault-tolerant algorithm that,given h,p,q,computes a tweaked square root (e,f,s)of h modulo pq:pute U←h(q+1)/8mod q.2.If U4−h mod q=0,set e=1;otherwise set e=−1.pute V←(eh)(p−3)/8mod p.4.If(V4(eh)2−eh)mod p=0,set f=1;otherwise set f=2.5.Precompute2(3q−5)/8mod q;compute W←f(3q−5)/8U mod q.6.Precompute2(9p−11)/8mod p;compute X←f(9p−11)/8V3eh mod p.7.Precompute q p−2mod p;compute Y←W+q(q p−2(X−W)mod p).pute s←Y2mod pq.9.Fault tolerance:If efs2mod pq=h,start over.(This never happens if allcalculations are carried out correctly.)The bottlenecks in this algorithm are one exponentiation modulo q in thefirst step and one exponentiation modulo p in the third step.The information that would be extracted from a Euclid-type Jacobi-symbol computation is trivially extracted from a few multiplications.The output of this algorithm is the prin-cipal tweaked square root(e,f,s)of h:this means that s is a square modulopq,that e is1if and only if h is a square modulo q,and that f is1if and only if eh is a square modulo p.History.The tweaks e and f were introduced by Williams in[34].The same tweaks were republished without credit to Williams as the highlight of the Kurosawa–Ogata paper[27]two decades later.Specifically:[27,Section 3]reviews“Rabin’s digital signature scheme”with verification equation“x2= H(M◦R)mod N”;[27,Section4]presents“our basic scheme”with verification equation“x2=αi H(M)mod N”using constantsα0=1,α1,α2,α3=α1α2 with different quadratic characters;[27,Section1]advertises the omission of r and the fact that thefirst square root works(“much faster”);[27,Section5] presents“our improved scheme”that specifiesα1=−1andα2=2;[27,Section 7]presents a“further improvement”where the choice among{−2,−1,1,2}is transmitted as part of the signature rather than reconstructed by the verifier.I posted the comment“The only Jacobi symbols used are b(p−1)/2mod p, in situations where b(p+1)/4mod p is going to be computed in any case”to sci.crypt in October2000,in response to the comment“the Jacobi symbol is hard to grasp by the implementor.”See[8].7Signature expansionThe Rabin–Williams signature system offers another attractive option for appli-cations where verification speed is much more important than signature length: signatures can be expanded for faster verification.Specifically,the signature (e,f,r,s)satisfying efs2≡H(r,m)(mod pq)can be converted into an ex-panded signature(e,f,r,s,t)satisfying efs2−pqt=H(r,m).The verifier can efficiently check the latter equation modulo a random128-bit prime(or several smaller primes)with negligible chance of error.The verifier can amortize the prime-generation cost across any number of signatures by keeping the prime(or prime list)secret and reusing it.A similar idea applies to exponent-3“RSA”but requires a double-length t, considerably slowing down verification.History.I posted this expansion idea to sci.crypt in March1997.See[7].8Message recoveryHash functions H can be,and often are,designed to allow“message recovery.”This means that afixed-length prefix of(r,m),say thefirst C bits,can be computed efficiently from H(r,m).See[6,Section5]and[18,Section4.2]for generically safe methods to construct H from another hash function.The advantage of“message recovery”is that it allows compression of signed messages:one simply omits thefirst C bits of(r,m,s).The verifier sees s,com-putes the alleged H(r,m)by computing s2mod pq,recovers the prefix of(r,m), and then checks that H(r,m)matches.Message recovery is often viewed as an argument for choosing a large B,such as B=128.The argument is as follows:“Message recovery eliminates the space required by r.The space required by r was the only disadvantage of a large B. Maybe a large B stops attacks.”There are several problems with this argument. First,bandwidth is only part of the picture:for example,a larger B means a larger cost to generate r.Second,signed messages are usually uncompressed;one important reason is that uncompressed signatures(and expanded signatures,as discussed in Section7)allow faster verification.Third,except when(r,m)is extremely short,the alleged savings is a myth.Adding128bits to r means pushing128bits of m out of the compressed prefix of(r,m),and therefore adding128bits to the length of the signed message.9Signature compressionAnother way to save space—more effective than message recovery when(r,m)is short—is to transmit all of(r,m)but transmit only the top half of the bits of s. The receiver can use Coppersmith’s algorithm(see,e.g.,my survey[9])tofind a square root of H(r,m)modulo pq given the top half of the bits of the square root. Bleichenbacher in[11]proposed a better approach,allowing the same amount of compression with much faster decompression and verification:s is transmitted as the largest under-half-size denominator in the continued fraction for fs/pq.A similar compression method applies to exponent-3“RSA”but saves only 1/3of the signature bits rather than1/2.10Key compressionYet another way to save space is to compress public keys pq.It is widely known that RSA/Rabin keys can be compressed to1/2size.It is not so widely known that Coppersmith found a method to compress keys to1/3size.It is also not widely known that this compression—done properly!—can be proven to preserve security,not just against generic attacks but against all attacks.The critical point is that generating one key p1q1in the conventional way,and then generating another key pq that shares the top1/2(or2/3)of the bits of p1q1,produces exactly the same distribution of pq that would have been produced by generating pq in the conventional way.Key compression has exactly the same benefits for higher-exponent“RSA,”so it is orthogonal to a comparison of Rabin–Williams with“RSA.”It is,how-ever,relevant to a comparison of Rabin–Williams with signature systems of ElGamal/Schnorr/ECDSA type.For example,a1024-bit Rabin–Williams sig-nature can be compressed to a512-bit signature,and a1024-bit key can be compressed to a352-bit key.A typical ECDSA variant at the same conjectured security level has a smaller signature(320bits)and a smaller key(160bits)but has much slower verification;for many applications,the slowdown in verification outweighs the192-bit savings in signature length.Bleichenbacher pointed out a way to further compress keys pq—all the way down to0bits!—inside vectors(pq,e,f,s,r,m).The idea is to recover pq as a divisor of efs2−H(r,m).The standard compression method(or,as an alterna-tive,Coppersmith’s compression method)already reveals the top1/2(or2/3) of the bits of the divisor,and the remaining bits are easily(or very easily)found by lattice-basis-reduction techniques.References1.Vijay Atluri(program chair),Trent Jaeger(program chair),Proceedings of the10th ACM conference on Computer and communications security,ACM Press, 2003.ISBN1–58113–738–9.See[18].2.Rana Barua,Tanja Lange(editors),Progress in Cryptology—INDOCRYPT2006,7th International Conference on Cryptology in India,Kolkata,India,December11–13,2006,Proceedings,Lecture Notes in Computer Science,4329,Springer,2006.ISBN3–540–49767–6.See[25].3.George Barwood,Digital signatures using elliptic curves,message32f519ad.19609226@ posted to sci.crypt(1997).URL: /group/sci.crypt/msg/b28aba37180dd6c6.Citations in this document:§4.4.Mihir Bellare(editor),Advances in cryptology—CRYPTO2000:proceedings ofthe20th Annual International Cryptology Conference held in Santa Barbara,CA, August20–24,2000,Lecture Notes in Computer Science,1880,Springer-Verlag, Berlin,2000.ISBN3–540–67907–3.MR2002c:94002.See[13].5.Mihir Bellare,Phillip Rogaway,The exact security of digital signatures:how tosign with RSA and Rabin,in[28](1996),399–416;see also newer version[6].6.Mihir Bellare,Phillip Rogaway,The exact security of digital signatures:how tosign with RSA and Rabin(1996);see also older version[5].URL:http://www-cse./~mihir/papers/exactsigs.html.Citations in this document:§3,§3,§3,§5,§8.7.Daniel J.Bernstein,The world’s fastest digital signature system,message1997Mar1104.27.46.12488@ posted to sci.crypt(1997).URL:/group/sci.crypt/msg/840e777ec0fc5679.Ci-tations in this document:§7.8.Daniel J.Bernstein,Choice of public exponent in RSA signatures,message2000Oct208.43.07.252@cr.yp.to posted to sci.crypt(2000).URL:http:// /group/sci.crypt/msg/6b2ecd514293b33e.Citations in this document:§6.9.Daniel J.Bernstein,Reducing lattice bases tofind small-height values of univariatepolynomials,in[12](2007).URL:http://cr.yp.to/papers.html#smallheight.Citations in this document:§9.10.Daniel J.Bernstein,Proving tight security for Rabin–Williams signatures(2008).URL:http://cr.yp.to/papers.html#rwtight.Citations in this document:§4,§5.11.Daniel Bleichenbacher,Compressing Rabin signatures,in[29](2004),126–128.Ci-tations in this document:§9.12.Joe P.Buhler,Peter Stevenhagen(editors),Surveys in algorithmic number theory,Mathematical Sciences Research Institute Publications,44,to appear,Cambridge University Press,New York,2007.See[9].13.Jean-S´e bastien Coron,On the exact security of Full Domain Hash,in[4](2000),229–235.MR2002e:94109.URL:http://www.eleves.ens.fr/home/ coron/publications/publications.html.Citations in this document:§3,§5. 14.Jean-S´e bastien Coron,Security proof for partial-domain hash signature schemes,in[35](2002),613–626.URL:/smart/r d/publications/.Citations in this document:§3.15.Jean-S´e bastien Coron,Optimal security proofs for PSS and other signatureschemes,in[19](2002),272–287.URL:http://www.eleves.ens.fr/home/coron/ publications/publications.html.Citations in this document:§3,§5.16.Martin Gardner,A new kind of cipher that would take millions of years to break,Scientific American(1977),120–124.Citations in this document:§3.17.ShafiGoldwasser,Silvio Micali,Ronald L.Rivest,A digital signature scheme secureagainst adaptive chosen-message attacks,SIAM Journal on Computing17(1988), 281–308.ISSN0097–5397.MR89e:94009.URL:/ ~rivest/publications.html.Citations in this document:§2.18.Jonathan Katz,Nan Wang,Efficiency improvements for signature schemes withtight security reductions,in[1](2003),155–164.URL:/ ~jkatz/papers.html.Citations in this document:§3,§5,§5,§8.rs Knudsen(editor),Advances in cryptology—EUROCRYPT2002:proceedingsof the21st International Annual Conference on the Theory and Applications of Cryptographic Techniques held in Amsterdam,April28–May2,2002,Lecture Notes in Computer Science,2332,Springer-Verlag,Berlin,2002.ISBN3–540–43553–0.See[15].20.Donald E.Knuth,The art of computer programming,volume2:seminumericalalgorithms,1st edition,1st printing,Addison-Wesley,Reading,1969;see also newer version[21].MR44:3531.21.Donald E.Knuth,The art of computer programming,volume2:seminumericalalgorithms,1st edition,2nd printing,Addison-Wesley,Reading,1971;see also older version[20];see also newer version[22].MR44:3531.22.Donald E.Knuth,The art of computer programming,volume2:seminumericalalgorithms,2nd edition,Addison-Wesley,Reading,1981;see also older version[21];see also newer version[23].ISBN0–201–03822–6.MR83i:68003.Citations in this document:§3.23.Donald E.Knuth,The art of computer programming,volume2:seminumericalalgorithms,3rd edition,Addison-Wesley,Reading,1997;see also older version[22].ISBN0–201–89684–2.Citations in this document:§3.24.Neal Koblitz,Alfred J.Menezes,Another look at“provable security”,revised4May2005(2005);see also newer version[26].URL:/ 2004/152/.Citations in this document:§5.25.Neal Koblitz,Alfred J.Menezes,Another look at“provable security”.II,in[2](2006),148–175.URL:/2006/229.Citations in this doc-ument:§5.26.Neal Koblitz,Alfred J.Menezes,Another look at“provable security”,Journal ofCryptology20(2007),3–37;see also older version[24].ISSN0933–2790.27.Kaoru Kurosawa,Wakaha Ogata,Efficient Rabin-type digital signature scheme,Designs,Codes and Cryptography16(1999),53–64.ISSN0925–1022.Citations in this document:§6,§6,§6,§6,§6,§6.28.Ueli M.Maurer(editor),Advances in cryptology—EUROCRYPT’96:Proceed-ings of the Fifteenth International Conference on the Theory and Application of Cryptographic Techniques held in Saragossa,May12–16,1996,Lecture Notes inComputer Science,1070,Springer-Verlag,Berlin,1996.ISBN3–540–61186–X.MR 97g:94002.See[5].29.Tatsuaki Okamoto(editor),Topics in cryptology—CT-RSA2004:the cryptogra-phers’track at the RSA Conference2004,San Francisco,CA,USA,February23–27,2004,proceedings,Lecture Notes in Computer Science,Springer,Berlin,2004.ISBN3–540–20996–4.MR2005d:94157.See[11].30.Michael O.Rabin,Digitalized signatures and public-key functions as intractableas factorization,Technical Report212,MIT Laboratory for Computer Science, 1979.URL:/Dienst/UI/2.0/Describe/ncstrl.mit lcs/ MIT/LCS/TR-212.Citations in this document:§2,§2,§3,§4,§5.31.Ronald L.Rivest,Adi Shamir,Leonard M.Adleman,A method for obtaining dig-ital signatures and public-key cryptosystems,Communications of the ACM21 (1978),120–126.ISSN0001–0782.URL:http://cr.yp.to/bib/entries.html# 1978/rivest.Citations in this document:§2,§2,§3,§3.32.Douglas R.Stinson,Cryptography:theory and practice,CRC Press,Boca Raton,Florida,1995.ISBN0–8493–8521–0.MR96k:94015.Citations in this document:§2.33.John Wigley,Removing need for rng in signatures,message5gov5d$pad@ posted to sci.crypt(1997).URL: /group/sci.crypt/msg/238e1fbc2ea66e6b.Cita-tions in this document:§4.34.Hugh C.Williams,A modification of the RSA public-key encryption procedure,IEEE Transactions on Information Theory26(1980),726–729.ISSN0018–9448.URL:http://cr.yp.to/bib/entries.html#1980/williams.Citations in this doc-ument:§6.35.Moti Yung(editor),Advances in cryptology—CRYPTO2002:22nd annual inter-national cryptology conference,Santa Barbara,California,USA,August2002,pro-ceedings,Lecture Notes in Computer Science,2442,Springer-Verlag,Berlin,2002.ISBN3–540–44050–X.See[14].。

相关文档
最新文档