Network Working Group                                         J. Jonsson
Request for Comments: 3447                                    B. Kaliski
Obsoletes: 2437                                         RSA Laboratories
Category: Informational                                    February 2003
        
Network Working Group                                         J. Jonsson
Request for Comments: 3447                                    B. Kaliski
Obsoletes: 2437                                         RSA Laboratories
Category: Informational                                    February 2003
        

Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1

公钥加密标准(PKCS)#1:RSA加密规范版本2.1

Status of this Memo

本备忘录的状况

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2003). All Rights Reserved.

版权所有(C)互联网协会(2003年)。版权所有。

Abstract

摘要

This memo represents a republication of PKCS #1 v2.1 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, and change control is retained within the PKCS process. The body of this document is taken directly from the PKCS #1 v2.1 document, with certain corrections made during the publication process.

本备忘录代表了RSA Laboratories公钥加密标准(PKCS)系列中PKCS#1 v2.1的重新发布,PKCS过程中保留更改控制。本文件正文直接摘自PKCS#1 v2.1文件,并在出版过程中进行了某些更正。

Table of Contents

目录

   1.       Introduction...............................................2
   2.       Notation...................................................3
   3.       Key types..................................................6
      3.1      RSA public key..........................................6
      3.2      RSA private key.........................................7
   4.       Data conversion primitives.................................8
      4.1      I2OSP...................................................9
      4.2      OS2IP...................................................9
   5.       Cryptographic primitives..................................10
      5.1      Encryption and decryption primitives...................10
      5.2      Signature and verification primitives..................12
   6.       Overview of schemes.......................................14
   7.       Encryption schemes........................................15
      7.1      RSAES-OAEP.............................................16
      7.2      RSAES-PKCS1-v1_5.......................................23
   8.       Signature schemes with appendix...........................27
      8.1      RSASSA-PSS.............................................29
      8.2      RSASSA-PKCS1-v1_5......................................32
   9.       Encoding methods for signatures with appendix.............35
        
   1.       Introduction...............................................2
   2.       Notation...................................................3
   3.       Key types..................................................6
      3.1      RSA public key..........................................6
      3.2      RSA private key.........................................7
   4.       Data conversion primitives.................................8
      4.1      I2OSP...................................................9
      4.2      OS2IP...................................................9
   5.       Cryptographic primitives..................................10
      5.1      Encryption and decryption primitives...................10
      5.2      Signature and verification primitives..................12
   6.       Overview of schemes.......................................14
   7.       Encryption schemes........................................15
      7.1      RSAES-OAEP.............................................16
      7.2      RSAES-PKCS1-v1_5.......................................23
   8.       Signature schemes with appendix...........................27
      8.1      RSASSA-PSS.............................................29
      8.2      RSASSA-PKCS1-v1_5......................................32
   9.       Encoding methods for signatures with appendix.............35
        
      9.1      EMSA-PSS...............................................36
      9.2      EMSA-PKCS1-v1_5........................................41
   Appendix A. ASN.1 syntax...........................................44
      A.1      RSA key representation.................................44
      A.2      Scheme identification..................................46
   Appendix B. Supporting techniques..................................52
      B.1      Hash functions.........................................52
      B.2      Mask generation functions..............................54
   Appendix C. ASN.1 module...........................................56
   Appendix D. Intellectual Property Considerations...................63
   Appendix E. Revision history.......................................64
   Appendix F. References.............................................65
   Appendix G. About PKCS.............................................70
   Appendix H. Corrections Made During RFC Publication Process........70
   Security Considerations............................................70
   Acknowledgements...................................................71
   Authors' Addresses.................................................71
   Full Copyright Statement...........................................72
        
      9.1      EMSA-PSS...............................................36
      9.2      EMSA-PKCS1-v1_5........................................41
   Appendix A. ASN.1 syntax...........................................44
      A.1      RSA key representation.................................44
      A.2      Scheme identification..................................46
   Appendix B. Supporting techniques..................................52
      B.1      Hash functions.........................................52
      B.2      Mask generation functions..............................54
   Appendix C. ASN.1 module...........................................56
   Appendix D. Intellectual Property Considerations...................63
   Appendix E. Revision history.......................................64
   Appendix F. References.............................................65
   Appendix G. About PKCS.............................................70
   Appendix H. Corrections Made During RFC Publication Process........70
   Security Considerations............................................70
   Acknowledgements...................................................71
   Authors' Addresses.................................................71
   Full Copyright Statement...........................................72
        
1. Introduction
1. 介绍

This document provides recommendations for the implementation of public-key cryptography based on the RSA algorithm [42], covering the following aspects:

本文档提供了基于RSA算法[42]的公钥加密实现建议,涵盖以下方面:

* Cryptographic primitives

* 加密基元

* Encryption schemes

* 加密方案

* Signature schemes with appendix

* 带附录的签名方案

* ASN.1 syntax for representing keys and for identifying the schemes

* ASN.1用于表示密钥和标识方案的语法

The recommendations are intended for general application within computer and communications systems, and as such include a fair amount of flexibility. It is expected that application standards based on these specifications may include additional constraints. The recommendations are intended to be compatible with the standard IEEE-1363-2000 [26] and draft standards currently being developed by the ANSI X9F1 [1] and IEEE P1363 [27] working groups.

这些建议适用于计算机和通信系统中的一般应用,因此具有相当大的灵活性。预计基于这些规范的应用标准可能包括附加约束。这些建议旨在与标准IEEE-1363-2000[26]以及ANSI X9F1[1]和IEEE P1363[27]工作组目前正在制定的标准草案兼容。

This document supersedes PKCS #1 version 2.0 [35][44] but includes compatible techniques.

本文件取代PKCS第1版2.0[35][44],但包含兼容技术。

The organization of this document is as follows:

本文件的组织结构如下:

* Section 1 is an introduction.

* 第一节是导言。

* Section 2 defines some notation used in this document.

* 第2节定义了本文件中使用的一些符号。

* Section 3 defines the RSA public and private key types.

* 第3节定义了RSA公钥和私钥类型。

* Sections 4 and 5 define several primitives, or basic mathematical operations. Data conversion primitives are in Section 4, and cryptographic primitives (encryption-decryption, signature-verification) are in Section 5.

* 第4节和第5节定义了一些基本的数学运算。第4节介绍了数据转换原语,第5节介绍了加密原语(加密解密、签名验证)。

* Sections 6, 7, and 8 deal with the encryption and signature schemes in this document. Section 6 gives an overview. Along with the methods found in PKCS #1 v1.5, Section 7 defines an OAEP-based [3] encryption scheme and Section 8 defines a PSS-based [4][5] signature scheme with appendix.

* 第6、7和8节讨论了本文档中的加密和签名方案。第6节给出了一个概述。与PKCS#1 v1.5中的方法一样,第7节定义了基于OAEP的[3]加密方案,第8节定义了基于PSS的[4][5]签名方案,并附有附录。

* Section 9 defines the encoding methods for the signature schemes in Section 8.

* 第9节定义了第8节中签名方案的编码方法。

* Appendix A defines the ASN.1 syntax for the keys defined in Section 3 and the schemes in Sections 7 and 8.

* 附录A定义了第3节中定义的密钥以及第7节和第8节中定义的方案的ASN.1语法。

* Appendix B defines the hash functions and the mask generation function used in this document, including ASN.1 syntax for the techniques.

* 附录B定义了本文档中使用的哈希函数和掩码生成函数,包括技术的ASN.1语法。

* Appendix C gives an ASN.1 module.

* 附录C给出了ASN.1模块。

* Appendices D, E, F and G cover intellectual property issues, outline the revision history of PKCS #1, give references to other publications and standards, and provide general information about the Public-Key Cryptography Standards.

* 附录D、E、F和G涵盖了知识产权问题,概述了PKCS#1的修订历史,提供了其他出版物和标准的参考,并提供了有关公钥加密标准的一般信息。

2. Notation
2. 符号

c ciphertext representative, an integer between 0 and n-1

c密文代表,介于0和n-1之间的整数

C ciphertext, an octet string

C密文,一个八位字符串

d RSA private exponent

d-RSA私有指数

d_i additional factor r_i's CRT exponent, a positive integer such that

d_i附加因子r_i的CRT指数,一个正整数

                    e * d_i == 1 (mod (r_i-1)), i = 3, ..., u
        
                    e * d_i == 1 (mod (r_i-1)), i = 3, ..., u
        

dP p's CRT exponent, a positive integer such that

dP p的CRT指数,一个正整数

                    e * dP == 1 (mod (p-1))
        
                    e * dP == 1 (mod (p-1))
        

dQ q's CRT exponent, a positive integer such that

dQ的CRT指数,一个正整数

                    e * dQ == 1 (mod (q-1))
        
                    e * dQ == 1 (mod (q-1))
        

e RSA public exponent

e RSA公共指数

EM encoded message, an octet string

EM编码消息,八位字节字符串

emBits (intended) length in bits of an encoded message EM

emBits(预期)编码消息的位长度EM

emLen (intended) length in octets of an encoded message EM

emLen(预期)编码消息的八位字节长度EM

GCD(. , .) greatest common divisor of two nonnegative integers

两个非负整数的GCD(,.)最大公约数

Hash hash function

散列函数

hLen output length in octets of hash function Hash

hLen输出长度(以哈希函数哈希的八位字节为单位)

k length in octets of the RSA modulus n

RSA模n的k长度(以八位字节为单位)

K RSA private key

K RSA私钥

L optional RSAES-OAEP label, an octet string

L可选RSAES-OAEP标签,八位字节字符串

LCM(., ..., .) least common multiple of a list of nonnegative integers

LCM(,…,.)非负整数列表的最小公倍数

m message representative, an integer between 0 and n-1

m消息代表,介于0和n-1之间的整数

M message, an octet string

M消息,八位字节字符串

mask MGF output, an octet string

掩码MGF输出,八位字节字符串

maskLen (intended) length of the octet string mask

八位字节字符串掩码的掩码长度(预期)

MGF mask generation function

MGF掩模生成函数

mgfSeed seed from which mask is generated, an octet string

生成掩码的mgfSeed种子,一个八位组字符串

mLen length in octets of a message M

消息M的最大似然长度(以八位字节为单位)

   n              RSA modulus, n = r_1 * r_2 * ... * r_u , u >= 2
        
   n              RSA modulus, n = r_1 * r_2 * ... * r_u , u >= 2
        

(n, e) RSA public key

(n,e)RSA公钥

p, q first two prime factors of the RSA modulus n

p、 q RSA模n的前两个素因子

qInv CRT coefficient, a positive integer less than p such that

qInv CRT系数,小于p的正整数

                    q * qInv == 1 (mod p)
        
                    q * qInv == 1 (mod p)
        

r_i prime factors of the RSA modulus n, including r_1 = p, r_2 = q, and additional factors if any

RSA模n的r_i素因子,包括r_1=p,r_2=q,以及附加因子(如有)

s signature representative, an integer between 0 and n-1

s签名代表,一个介于0和n-1之间的整数

S signature, an octet string

S签名,八位字节字符串

sLen length in octets of the EMSA-PSS salt

EMSA-PSS盐的sLen长度(以八位字节为单位)

t_i additional prime factor r_i's CRT coefficient, a positive integer less than r_i such that

t_i附加的素因子r_i的CRT系数,一个小于r_i的正整数

r_1 * r_2 * ... * r_(i-1) * t_i == 1 (mod r_i) ,

r_1*r_2*…*r_(i-1)*t_i==1(模r_i),

i = 3, ... , u

i=3,U

u number of prime factors of the RSA modulus, u >= 2

RSA模的素因子的个数,u>=2

x a nonnegative integer

x是一个非负整数

X an octet string corresponding to x

X对应于X的八位字节字符串

xLen (intended) length of the octet string X

xLen(预期)八位字节字符串X的长度

0x indicator of hexadecimal representation of an octet or an octet string; "0x48" denotes the octet with hexadecimal value 48; "(0x)48 09 0e" denotes the string of three consecutive octets with hexadecimal value 48, 09, and 0e, respectively

八位字节或八位字节字符串的十六进制表示的0x指示符;“0x48”表示十六进制值为48的八位字节;“(0x)48 09 0e”表示三个连续的八位字节组成的字符串,其十六进制值分别为48、09和0e

\lambda(n) LCM(r_1-1, r_2-1, ... , r_u-1)

\lambda(n)LCM(r_1-1,r_2-1,…,r_-1)

\xor bit-wise exclusive-or of two octet strings

\两个八位字符串的异或按位异或

\ceil(.) ceiling function; \ceil(x) is the smallest integer larger than or equal to the real number x

\天花板功能\ceil(x)是大于或等于实数x的最小整数

|| concatenation operator

||串联运算符

   ==             congruence symbol; a == b (mod n) means that the
                  integer n divides the integer a - b
        
   ==             congruence symbol; a == b (mod n) means that the
                  integer n divides the integer a - b
        

Note. The CRT can be applied in a non-recursive as well as a recursive way. In this document a recursive approach following Garner's algorithm [22] is used. See also Note 1 in Section 3.2.

笔记CRT既可以以递归方式应用,也可以以非递归方式应用。在本文件中,使用了遵循Garner算法[22]的递归方法。另见第3.2节注释1。

3. Key types
3. 关键类型

Two key types are employed in the primitives and schemes defined in this document: RSA public key and RSA private key. Together, an RSA public key and an RSA private key form an RSA key pair.

本文档中定义的原语和方案中使用了两种密钥类型:RSA公钥和RSA私钥。RSA公钥和RSA私钥一起构成RSA密钥对。

This specification supports so-called "multi-prime" RSA where the modulus may have more than two prime factors. The benefit of multi-prime RSA is lower computational cost for the decryption and signature primitives, provided that the CRT (Chinese Remainder Theorem) is used. Better performance can be achieved on single processor platforms, but to a greater extent on multiprocessor platforms, where the modular exponentiations involved can be done in parallel.

本规范支持所谓的“多素数”RSA,其中模可能有两个以上的素数因子。如果使用CRT(中国剩余定理),多素数RSA的优点是解密和签名原语的计算成本较低。在单处理器平台上可以实现更好的性能,但在多处理器平台上可以实现更大程度的性能,其中所涉及的模幂运算可以并行完成。

For a discussion on how multi-prime affects the security of the RSA cryptosystem, the reader is referred to [49].

有关多重素数如何影响RSA密码系统安全性的讨论,请参阅[49]。

3.1 RSA public key
3.1 RSA公钥

For the purposes of this document, an RSA public key consists of two components:

在本文档中,RSA公钥由两部分组成:

n the RSA modulus, a positive integer e the RSA public exponent, a positive integer

n RSA模,一个正整数e RSA公共指数,一个正整数

In a valid RSA public key, the RSA modulus n is a product of u distinct odd primes r_i, i = 1, 2, ..., u, where u >= 2, and the RSA public exponent e is an integer between 3 and n - 1 satisfying GCD(e, \lambda(n)) = 1, where \lambda(n) = LCM(r_1 - 1, ..., r_u - 1). By convention, the first two primes r_1 and r_2 may also be denoted p and q respectively.

在有效的RSA公钥中,RSA模n是u个不同的奇数素数r_i,i=1,2,…,u的乘积,其中u>=2,并且RSA公共指数e是3到n-1之间的整数,满足GCD(e,\lambda(n))=1,其中\lambda(n)=LCM(r_1-1,…,r_-1)。按照惯例,前两个素数r_1和r_2也可以分别表示为p和q。

A recommended syntax for interchanging RSA public keys between implementations is given in Appendix A.1.1; an implementation's internal representation may differ.

附录A.1.1中给出了在实现之间交换RSA公钥的推荐语法;实现的内部表示可能不同。

3.2 RSA private key
3.2 RSA私钥

For the purposes of this document, an RSA private key may have either of two representations.

在本文档中,RSA私钥可以有两种表示形式之一。

1. The first representation consists of the pair (n, d), where the components have the following meanings:

1. 第一种表示法由一对(n,d)组成,其中组件具有以下含义:

n the RSA modulus, a positive integer d the RSA private exponent, a positive integer

n RSA模,一个正整数d RSA私有指数,一个正整数

2. The second representation consists of a quintuple (p, q, dP, dQ, qInv) and a (possibly empty) sequence of triplets (r_i, d_i, t_i), i = 3, ..., u, one for each prime not in the quintuple, where the components have the following meanings:

2. 第二种表示法由五元组(p,q,dP,dQ,qInv)和三元组序列(可能为空)组成(r_i,d_i,t_i),i=3,…,u,非五元组中的每个素数一个,其中分量具有以下含义:

p the first factor, a positive integer q the second factor, a positive integer dP the first factor's CRT exponent, a positive integer dQ the second factor's CRT exponent, a positive integer qInv the (first) CRT coefficient, a positive integer r_i the i-th factor, a positive integer d_i the i-th factor's CRT exponent, a positive integer t_i the i-th factor's CRT coefficient, a positive integer

p第一个因子,正整数q第二个因子,正整数dP第一个因子的CRT指数,正整数dQ第二个因子的CRT指数,正整数qInv(第一)CRT系数,正整数r_i第i个因子,正整数d_i第i个因子的CRT指数,一个正整数t_i第i个因子的CRT系数,一个正整数

In a valid RSA private key with the first representation, the RSA modulus n is the same as in the corresponding RSA public key and is the product of u distinct odd primes r_i, i = 1, 2, ..., u, where u >= 2. The RSA private exponent d is a positive integer less than n satisfying

在具有第一种表示形式的有效RSA私钥中,RSA模n与相应RSA公钥中的模n相同,并且是u个不同奇数素数r_i,i=1,2,…,u的乘积,其中u>=2。RSA私有指数d是小于n的正整数

e * d == 1 (mod \lambda(n)),

e*d==1(mod\lambda(n)),

where e is the corresponding RSA public exponent and \lambda(n) is defined as in Section 3.1.

其中e是相应的RSA公共指数,λ(n)的定义如第3.1节所述。

In a valid RSA private key with the second representation, the two factors p and q are the first two prime factors of the RSA modulus n (i.e., r_1 and r_2), the CRT exponents dP and dQ are positive integers less than p and q respectively satisfying

在第二种表示形式的有效RSA私钥中,两个因子p和q是RSA模n(即r_1和r_2)的前两个素因子,CRT指数dP和dQ分别是小于p和q的正整数

e * dP == 1 (mod (p-1)) e * dQ == 1 (mod (q-1)) ,

e*dP==1(mod(p-1))e*dQ==1(mod(q-1)),

and the CRT coefficient qInv is a positive integer less than p satisfying

CRT系数qInv是一个小于p的正整数

q * qInv == 1 (mod p).

q*qInv==1(模p)。

If u > 2, the representation will include one or more triplets (r_i, d_i, t_i), i = 3, ..., u. The factors r_i are the additional prime factors of the RSA modulus n. Each CRT exponent d_i (i = 3, ..., u) satisfies

如果u>2,表示将包括一个或多个三元组(r_i,d_i,t_i),i=3,…,u。因子r_i是RSA模n的附加素因子。每个CRT指数d_i(i=3,…,u)满足

e * d_i == 1 (mod (r_i - 1)).

e*d_i==1(mod(r_i-1))。

Each CRT coefficient t_i (i = 3, ..., u) is a positive integer less than r_i satisfying

每个CRT系数t_i(i=3,…,u)是小于r_i的正整数

R_i * t_i == 1 (mod r_i) ,

R_i*t_i==1(模R_i),

where R_i = r_1 * r_2 * ... * r_(i-1).

其中R_i=R_1*R_2*。*r_(i-1)。

A recommended syntax for interchanging RSA private keys between implementations, which includes components from both representations, is given in Appendix A.1.2; an implementation's internal representation may differ.

附录A.1.2给出了在实现之间交换RSA私钥的推荐语法,其中包括两种表示形式的组件;实现的内部表示可能不同。

Notes.

笔记。

1. The definition of the CRT coefficients here and the formulas that use them in the primitives in Section 5 generally follow Garner's algorithm [22] (see also Algorithm 14.71 in [37]). However, for compatibility with the representations of RSA private keys in PKCS #1 v2.0 and previous versions, the roles of p and q are reversed compared to the rest of the primes. Thus, the first CRT coefficient, qInv, is defined as the inverse of q mod p, rather than as the inverse of R_1 mod r_2, i.e., of p mod q.

1. 此处CRT系数的定义以及第5节中原语中使用CRT系数的公式通常遵循Garner算法[22](另见[37]中的算法14.71)。但是,为了与PKCS#1 v2.0和以前版本中的RSA私钥表示兼容,与其他素数相比,p和q的作用是相反的。因此,第一个CRT系数qInv被定义为q mod p的逆,而不是R_1 mod R_2的逆,即p mod q的逆。

2. Quisquater and Couvreur [40] observed the benefit of applying the Chinese Remainder Theorem to RSA operations.

2. Quisquater和Couvreur[40]观察到将中国剩余定理应用于RSA运算的好处。

4. Data conversion primitives
4. 数据转换原语

Two data conversion primitives are employed in the schemes defined in this document:

本文件中定义的方案采用了两种数据转换原语:

* I2OSP - Integer-to-Octet-String primitive

* I2OSP-整数到八位字符串原语

* OS2IP - Octet-String-to-Integer primitive

* OS2IP-八位字符串到整数原语

For the purposes of this document, and consistent with ASN.1 syntax, an octet string is an ordered sequence of octets (eight-bit bytes). The sequence is indexed from first (conventionally, leftmost) to last (rightmost). For purposes of conversion to and from integers, the first octet is considered the most significant in the following conversion primitives.

为了本文档的目的,并且与ASN.1语法一致,八位字节字符串是八位字节的有序序列(八位字节)。序列从第一个(通常是最左边的)到最后一个(最右边的)进行索引。为了与整数进行转换,在下面的转换原语中,第一个八位元被认为是最重要的。

4.1 I2OSP
4.1 I2OSP

I2OSP converts a nonnegative integer to an octet string of a specified length.

I2OSP将非负整数转换为指定长度的八位字节字符串。

I2OSP (x, xLen)

I2OSP(x,xLen)

Input: x nonnegative integer to be converted xLen intended length of the resulting octet string

输入:x个非负整数,转换为结果八位字节字符串的指定长度

Output: X corresponding octet string of length xLen

输出:X对应长度为xLen的八位字节字符串

Error: "integer too large"

错误:“整数太大”

Steps:

步骤:

1. If x >= 256^xLen, output "integer too large" and stop.

1. 如果x>=256^xLen,则输出“整数太大”并停止。

2. Write the integer x in its unique xLen-digit representation in base 256:

2. 将整数x以其唯一的xLen数字表示形式写入基数256:

x = x_(xLen-1) 256^(xLen-1) + x_(xLen-2) 256^(xLen-2) + ... + x_1 256 + x_0,

x=x(xLen-1)256^(xLen-1)+x(xLen-2)256^(xLen-2)+…+x_1 256+x_0,

where 0 <= x_i < 256 (note that one or more leading digits will be zero if x is less than 256^(xLen-1)).

其中0<=x_i<256(注意,如果x小于256^(xLen-1),则一个或多个前导数字将为零)。

3. Let the octet X_i have the integer value x_(xLen-i) for 1 <= i <= xLen. Output the octet string

3. 让八位元X_i具有整数值X_(xLen-i),表示1<=i<=xLen。输出八进制字符串

X = X_1 X_2 ... X_xLen.

X=X_1 X_2。。。克斯伦。

4.2 OS2IP
4.2 OS2IP

OS2IP converts an octet string to a nonnegative integer.

OS2IP将八位字节字符串转换为非负整数。

OS2IP (X)

OS2IP(X)

Input: X octet string to be converted

输入:要转换的X个八位字节字符串

Output: x corresponding nonnegative integer

输出:x对应的非负整数

Steps:

步骤:

1. Let X_1 X_2 ... X_xLen be the octets of X from first to last, and let x_(xLen-i) be the integer value of the octet X_i for 1 <= i <= xLen.

1. 让X_1 X_2。。。X_xLen是X从第一个到最后一个的八位字节,X_(xLen-i)是八位字节X_i的整数值,表示1<=i<=xLen。

2. Let x = x_(xLen-1) 256^(xLen-1) + x_(xLen-2) 256^(xLen-2) + ... + x_1 256 + x_0.

2. 设x=x(xLen-1)256^(xLen-1)+x(xLen-2)256^(xLen-2)+…+x_1 256+x_0。

3. Output x.

3. 输出x。

5. Cryptographic primitives
5. 加密基元

Cryptographic primitives are basic mathematical operations on which cryptographic schemes can be built. They are intended for implementation in hardware or as software modules, and are not intended to provide security apart from a scheme.

密码原语是可以建立密码方案的基本数学运算。它们旨在以硬件或软件模块的形式实现,并且不打算提供方案之外的安全性。

Four types of primitive are specified in this document, organized in pairs: encryption and decryption; and signature and verification.

本文档中指定了四种类型的原语,它们成对组织:加密和解密;以及签名和验证。

The specifications of the primitives assume that certain conditions are met by the inputs, in particular that RSA public and private keys are valid.

原语的规范假定输入满足某些条件,特别是RSA公钥和私钥有效。

5.1 Encryption and decryption primitives
5.1 加密和解密原语

An encryption primitive produces a ciphertext representative from a message representative under the control of a public key, and a decryption primitive recovers the message representative from the ciphertext representative under the control of the corresponding private key.

加密原语在公钥的控制下从消息代表生成密文代表,解密原语在相应私钥的控制下从密文代表恢复消息代表。

One pair of encryption and decryption primitives is employed in the encryption schemes defined in this document and is specified here: RSAEP/RSADP. RSAEP and RSADP involve the same mathematical operation, with different keys as input.

本文档中定义的加密方案中使用了一对加密和解密原语,并在此处指定:RSAEP/RSADP。RSAEP和RSADP涉及相同的数学运算,输入的键不同。

The primitives defined here are the same as IFEP-RSA/IFDP-RSA in IEEE Std 1363-2000 [26] (except that support for multi-prime RSA has been added) and are compatible with PKCS #1 v1.5.

此处定义的原语与IEEE Std 1363-2000[26]中的IFEP-RSA/IFDP-RSA相同(除了增加了对多素数RSA的支持),并且与PKCS#1 v1.5兼容。

The main mathematical operation in each primitive is exponentiation.

每个基元的主要数学运算是指数运算。

5.1.1 RSAEP
5.1.1 RSAEP

RSAEP ((n, e), m)

RSAEP((北,东,米)

Input: (n, e) RSA public key m message representative, an integer between 0 and n - 1

输入:(n,e)RSA公钥m消息代表,一个介于0和n-1之间的整数

Output: c ciphertext representative, an integer between 0 and n - 1

输出:c密文代表,一个介于0和n-1之间的整数

Error: "message representative out of range"

错误:“消息代表超出范围”

Assumption: RSA public key (n, e) is valid

假设:RSA公钥(n,e)有效

Steps:

步骤:

1. If the message representative m is not between 0 and n - 1, output "message representative out of range" and stop.

1. 如果消息代表m不在0和n-1之间,则输出“消息代表超出范围”并停止。

2. Let c = m^e mod n.

2. 设c=m^e模n。

3. Output c.

3. 输出c。

5.1.2 RSADP
5.1.2 RSADP

RSADP (K, c)

RSADP(K,c)

Input: K RSA private key, where K has one of the following forms: - a pair (n, d) - a quintuple (p, q, dP, dQ, qInv) and a possibly empty sequence of triplets (r_i, d_i, t_i), i = 3, ..., u c ciphertext representative, an integer between 0 and n - 1

输入:K RSA私钥,其中K具有以下形式之一:-一对(n,d)-五元组(p,q,dP,dQ,qInv)和可能为空的三元组序列(r_i,d_i,t_i),i=3,…,u c密文代表,0和n-1之间的整数

Output: m message representative, an integer between 0 and n - 1

输出:m消息代表,一个介于0和n-1之间的整数

Error: "ciphertext representative out of range"

错误:“密文代表超出范围”

Assumption: RSA private key K is valid

假设:RSA私钥K是有效的

Steps:

步骤:

1. If the ciphertext representative c is not between 0 and n - 1, output "ciphertext representative out of range" and stop.

1. 如果密文代表c不在0和n-1之间,则输出“密文代表超出范围”并停止。

2. The message representative m is computed as follows.

2. 消息代表m的计算如下。

a. If the first form (n, d) of K is used, let m = c^d mod n.

a. 如果使用K的第一种形式(n,d),则设m=c^d mod n。

b. If the second form (p, q, dP, dQ, qInv) and (r_i, d_i, t_i) of K is used, proceed as follows:

b. 如果使用了K的第二种形式(p,q,dP,dQ,qInv)和(r_i,d_i,t_i),则按照以下步骤进行:

i. Let m_1 = c^dP mod p and m_2 = c^dQ mod q.

i. 设m_1=c^dP mod p,m_2=c^dQ mod q。

ii. If u > 2, let m_i = c^(d_i) mod r_i, i = 3, ..., u.

二,。如果u>2,则设m_i=c^(d_i)mod r_i,i=3,…,u。

         iii.  Let h = (m_1 - m_2) * qInv mod p.
        
         iii.  Let h = (m_1 - m_2) * qInv mod p.
        

iv. Let m = m_2 + q * h.

设m=m2+q*h。

         v.    If u > 2, let R = r_1 and for i = 3 to u do
        
         v.    If u > 2, let R = r_1 and for i = 3 to u do
        

1. Let R = R * r_(i-1).

1. 设R=R*R(i-1)。

2. Let h = (m_i - m) * t_i mod r_i.

2. 设h=(m_i-m)*t_i mod r_i。

3. Let m = m + R * h.

3. 设m=m+R*h。

3. Output m.

3. 输出m。

Note. Step 2.b can be rewritten as a single loop, provided that one reverses the order of p and q. For consistency with PKCS #1 v2.0, however, the first two primes p and q are treated separately from the additional primes.

笔记步骤2.b可以重写为单个循环,前提是将p和q的顺序颠倒。然而,为了与PKCS#1 v2.0保持一致,前两个素数p和q与其他素数分开处理。

5.2 Signature and verification primitives
5.2 签名和验证原语

A signature primitive produces a signature representative from a message representative under the control of a private key, and a verification primitive recovers the message representative from the signature representative under the control of the corresponding public key. One pair of signature and verification primitives is employed in the signature schemes defined in this document and is specified here: RSASP1/RSAVP1.

签名原语在私钥的控制下从消息代表生成签名代表,验证原语在相应公钥的控制下从签名代表恢复消息代表。本文档中定义的签名方案中使用了一对签名和验证原语,并在此处指定:RSASP1/RSAVP1。

The primitives defined here are the same as IFSP-RSA1/IFVP-RSA1 in IEEE 1363-2000 [26] (except that support for multi-prime RSA has been added) and are compatible with PKCS #1 v1.5.

此处定义的原语与IEEE 1363-2000[26]中的IFSP-RSA1/IFVP-RSA1相同(除了增加了对多素数RSA的支持),并且与PKCS#1 v1.5兼容。

The main mathematical operation in each primitive is exponentiation, as in the encryption and decryption primitives of Section 5.1. RSASP1 and RSAVP1 are the same as RSADP and RSAEP except for the names of their input and output arguments; they are distinguished as they are intended for different purposes.

每个原语的主要数学运算是指数运算,如第5.1节中的加密和解密原语。RSASP1和RSAVP1与RSADP和RSAEP相同,只是输入和输出参数的名称不同;它们因用途不同而不同。

5.2.1 RSASP1
5.2.1 RSASP1

RSASP1 (K, m)

RSASP1(K,m)

Input: K RSA private key, where K has one of the following forms: - a pair (n, d) - a quintuple (p, q, dP, dQ, qInv) and a (possibly empty) sequence of triplets (r_i, d_i, t_i), i = 3, ..., u m message representative, an integer between 0 and n - 1

输入:K RSA私钥,其中K具有以下形式之一:-一对(n,d)-五元组(p,q,dP,dQ,qInv)和三元组(r_i,d_i,t_i)的(可能为空)序列(r_i,d_i,t_i),i=3,…,u m消息代表,0和n-1之间的整数

Output: s signature representative, an integer between 0 and n - 1

输出:s签名代表,一个介于0和n-1之间的整数

Error: "message representative out of range"

错误:“消息代表超出范围”

Assumption: RSA private key K is valid

假设:RSA私钥K是有效的

Steps:

步骤:

1. If the message representative m is not between 0 and n - 1, output "message representative out of range" and stop.

1. 如果消息代表m不在0和n-1之间,则输出“消息代表超出范围”并停止。

2. The signature representative s is computed as follows.

2. 签名代表s的计算如下。

a. If the first form (n, d) of K is used, let s = m^d mod n.

a. 如果使用K的第一种形式(n,d),则设s=m^d mod n。

b. If the second form (p, q, dP, dQ, qInv) and (r_i, d_i, t_i) of K is used, proceed as follows:

b. 如果使用了K的第二种形式(p,q,dP,dQ,qInv)和(r_i,d_i,t_i),则按照以下步骤进行:

i. Let s_1 = m^dP mod p and s_2 = m^dQ mod q.

i. 设s_1=m^dP mod p,s_2=m^dQ mod q。

ii. If u > 2, let s_i = m^(d_i) mod r_i, i = 3, ..., u.

二,。如果u>2,则设s_i=m^(d_i)mod r_i,i=3,…,u。

         iii.  Let h = (s_1 - s_2) * qInv mod p.
        
         iii.  Let h = (s_1 - s_2) * qInv mod p.
        

iv. Let s = s_2 + q * h.

iv.设s=s_2+q*h。

         v.    If u > 2, let R = r_1 and for i = 3 to u do
        
         v.    If u > 2, let R = r_1 and for i = 3 to u do
        

1. Let R = R * r_(i-1).

1. 设R=R*R(i-1)。

2. Let h = (s_i - s) * t_i mod r_i.

2. 设h=(s_i-s)*t_i mod r_i。

3. Let s = s + R * h.

3. 设s=s+R*h。

3. Output s.

3. 输出s。

Note. Step 2.b can be rewritten as a single loop, provided that one reverses the order of p and q. For consistency with PKCS #1 v2.0, however, the first two primes p and q are treated separately from the additional primes.

笔记步骤2.b可以重写为单个循环,前提是将p和q的顺序颠倒。然而,为了与PKCS#1 v2.0保持一致,前两个素数p和q与其他素数分开处理。

5.2.2 RSAVP1
5.2.2 RSAVP1

RSAVP1 ((n, e), s)

RSAVP1(北、东、南)

Input: (n, e) RSA public key s signature representative, an integer between 0 and n - 1

输入:(n,e)RSA公钥的签名代表,一个介于0和n-1之间的整数

Output: m message representative, an integer between 0 and n - 1

输出:m消息代表,一个介于0和n-1之间的整数

Error: "signature representative out of range"

错误:“签名代表超出范围”

Assumption: RSA public key (n, e) is valid

假设:RSA公钥(n,e)有效

Steps:

步骤:

1. If the signature representative s is not between 0 and n - 1, output "signature representative out of range" and stop.

1. 如果签名代表s不在0和n-1之间,则输出“签名代表超出范围”并停止。

2. Let m = s^e mod n.

2. 设m=s^e模n。

3. Output m.

3. 输出m。

6. Overview of schemes
6. 计划概览

A scheme combines cryptographic primitives and other techniques to achieve a particular security goal. Two types of scheme are specified in this document: encryption schemes and signature schemes with appendix.

一个方案结合了密码原语和其他技术来实现特定的安全目标。本文件规定了两类方案:加密方案和带附录的签名方案。

The schemes specified in this document are limited in scope in that their operations consist only of steps to process data with an RSA public or private key, and do not include steps for obtaining or validating the key. Thus, in addition to the scheme operations, an application will typically include key management operations by which

本文档中指定的方案的范围有限,因为其操作仅包括使用RSA公钥或私钥处理数据的步骤,不包括获取或验证密钥的步骤。因此,除了方案操作之外,应用程序通常还将包括密钥管理操作,其中

parties may select RSA public and private keys for a scheme operation. The specific additional operations and other details are outside the scope of this document.

各方可以为方案操作选择RSA公钥和私钥。具体的附加操作和其他细节不在本文件范围内。

As was the case for the cryptographic primitives (Section 5), the specifications of scheme operations assume that certain conditions are met by the inputs, in particular that RSA public and private keys are valid. The behavior of an implementation is thus unspecified when a key is invalid. The impact of such unspecified behavior depends on the application. Possible means of addressing key validation include explicit key validation by the application; key validation within the public-key infrastructure; and assignment of liability for operations performed with an invalid key to the party who generated the key.

与加密原语一样(第5节),方案操作规范假定输入满足某些条件,特别是RSA公钥和私钥有效。因此,当密钥无效时,实现的行为是未指定的。此类未指定行为的影响取决于应用程序。解决密钥验证的可能方法包括应用程序的显式密钥验证;公钥基础设施内的密钥验证;以及将使用无效密钥执行的操作的责任分配给生成密钥的一方。

A generally good cryptographic practice is to employ a given RSA key pair in only one scheme. This avoids the risk that vulnerability in one scheme may compromise the security of the other, and may be essential to maintain provable security. While RSAES-PKCS1-v1_5 (Section 7.2) and RSASSA-PKCS1-v1_5 (Section 8.2) have traditionally been employed together without any known bad interactions (indeed, this is the model introduced by PKCS #1 v1.5), such a combined use of an RSA key pair is not recommended for new applications.

一个通常良好的密码实践是在一个方案中只使用给定的RSA密钥对。这避免了一个方案中的漏洞可能危及另一个方案的安全性的风险,并且可能是维护可证明安全性的关键。虽然RSAES-PKCS1-v1_5(第7.2节)和RSASSA-PKCS1-v1_5(第8.2节)传统上是在没有任何已知不良交互的情况下一起使用的(事实上,这是PKCS#1 v1.5引入的模型),但这种RSA密钥对的组合使用不建议用于新的应用程序。

To illustrate the risks related to the employment of an RSA key pair in more than one scheme, suppose an RSA key pair is employed in both RSAES-OAEP (Section 7.1) and RSAES-PKCS1-v1_5. Although RSAES-OAEP by itself would resist attack, an opponent might be able to exploit a weakness in the implementation of RSAES-PKCS1-v1_5 to recover messages encrypted with either scheme. As another example, suppose an RSA key pair is employed in both RSASSA-PSS (Section 8.1) and RSASSA-PKCS1-v1_5. Then the security proof for RSASSA-PSS would no longer be sufficient since the proof does not account for the possibility that signatures might be generated with a second scheme. Similar considerations may apply if an RSA key pair is employed in one of the schemes defined here and in a variant defined elsewhere.

为了说明在多个方案中使用RSA密钥对的相关风险,假设RSAES-OAEP(第7.1节)和RSAES-PKCS1-v1_5中都使用了RSA密钥对。尽管RSAES-OAEP本身可以抵抗攻击,但对手可能能够利用RSAES-PKCS1-v1_5实现中的弱点来恢复使用任一方案加密的消息。作为另一个示例,假设RSASSA-PSS(第8.1节)和RSASSA-PKCS1-v1_5中都使用了RSA密钥对。那么,RSASSA-PSS的安全性证明将不再足够,因为该证明没有考虑到使用第二个方案生成签名的可能性。如果在此处定义的方案之一和其他地方定义的变体中使用RSA密钥对,则可能需要考虑类似的问题。

7. Encryption schemes
7. 加密方案

For the purposes of this document, an encryption scheme consists of an encryption operation and a decryption operation, where the encryption operation produces a ciphertext from a message with a recipient's RSA public key, and the decryption operation recovers the message from the ciphertext with the recipient's corresponding RSA private key.

在本文档中,加密方案由加密操作和解密操作组成,其中加密操作使用收件人的RSA公钥从消息中生成密文,解密操作使用收件人的相应RSA私钥从密文中恢复消息。

An encryption scheme can be employed in a variety of applications. A typical application is a key establishment protocol, where the message contains key material to be delivered confidentially from one party to another. For instance, PKCS #7 [45] employs such a protocol to deliver a content-encryption key from a sender to a recipient; the encryption schemes defined here would be suitable key-encryption algorithms in that context.

加密方案可用于各种应用。典型的应用是密钥建立协议,其中消息包含从一方秘密传递到另一方的密钥材料。例如,PKCS#7[45]使用这样的协议将内容加密密钥从发送方传递给接收方;这里定义的加密方案将是该上下文中合适的密钥加密算法。

Two encryption schemes are specified in this document: RSAES-OAEP and RSAES-PKCS1-v1_5. RSAES-OAEP is recommended for new applications; RSAES-PKCS1-v1_5 is included only for compatibility with existing applications, and is not recommended for new applications.

本文件规定了两种加密方案:RSAES-OAEP和RSAES-PKCS1-v1_5。建议新应用使用RSAES-OAEP;RSAES-PKCS1-v1_5仅用于与现有应用程序兼容,不建议用于新应用程序。

The encryption schemes given here follow a general model similar to that employed in IEEE Std 1363-2000 [26], combining encryption and decryption primitives with an encoding method for encryption. The encryption operations apply a message encoding operation to a message to produce an encoded message, which is then converted to an integer message representative. An encryption primitive is applied to the message representative to produce the ciphertext. Reversing this, the decryption operations apply a decryption primitive to the ciphertext to recover a message representative, which is then converted to an octet string encoded message. A message decoding operation is applied to the encoded message to recover the message and verify the correctness of the decryption.

这里给出的加密方案遵循与IEEE Std 1363-2000[26]中采用的模型类似的通用模型,将加密和解密原语与加密的编码方法相结合。加密操作对消息应用消息编码操作以生成编码消息,然后将其转换为整数消息代表。加密原语应用于消息代表以生成密文。与此相反,解密操作将解密原语应用于密文以恢复消息代表,然后将其转换为八进制字符串编码的消息。对编码的消息应用消息解码操作,以恢复消息并验证解密的正确性。

To avoid implementation weaknesses related to the way errors are handled within the decoding operation (see [6] and [36]), the encoding and decoding operations for RSAES-OAEP and RSAES-PKCS1-v1_5 are embedded in the specifications of the respective encryption schemes rather than defined in separate specifications. Both encryption schemes are compatible with the corresponding schemes in PKCS #1 v2.0.

为了避免与解码操作中错误处理方式相关的实现缺陷(参见[6]和[36]),RSAES-OAEP和RSAES-PKCS1-v1_5的编码和解码操作嵌入在各自加密方案的规范中,而不是在单独的规范中定义。这两种加密方案都与PKCS#1 v2.0中的相应方案兼容。

7.1 RSAES-OAEP
7.1 RSAES-OAEP

RSAES-OAEP combines the RSAEP and RSADP primitives (Sections 5.1.1 and 5.1.2) with the EME-OAEP encoding method (step 1.b in Section 7.1.1 and step 3 in Section 7.1.2). EME-OAEP is based on Bellare and Rogaway's Optimal Asymmetric Encryption scheme [3]. (OAEP stands for "Optimal Asymmetric Encryption Padding."). It is compatible with the IFES scheme defined in IEEE Std 1363-2000 [26], where the encryption and decryption primitives are IFEP-RSA and IFDP-RSA and the message encoding method is EME-OAEP. RSAES-OAEP can operate on messages of length up to k - 2hLen - 2 octets, where hLen is the length of the output from the underlying hash function and k is the length in octets of the recipient's RSA modulus.

RSAES-OAEP将RSAEP和RSADP原语(第5.1.1节和第5.1.2节)与EME-OAEP编码方法相结合(第7.1.1节中的步骤1.b和第7.1.2节中的步骤3)。EME-OAEP基于Bellare和Rogaway的最优非对称加密方案[3]。(OAEP代表“最佳非对称加密填充”)。它与IEEE Std 1363-2000[26]中定义的IFES方案兼容,其中加密和解密原语为IFEP-RSA和IFDP-RSA,消息编码方法为EME-OAEP。RSAES-OAEP可以对长度高达k-2hLen-2个八位字节的消息进行操作,其中hLen是基础哈希函数输出的长度,k是收件人RSA模数的八位字节长度。

Assuming that computing e-th roots modulo n is infeasible and the mask generation function in RSAES-OAEP has appropriate properties, RSAES-OAEP is semantically secure against adaptive chosen-ciphertext attacks. This assurance is provable in the sense that the difficulty of breaking RSAES-OAEP can be directly related to the difficulty of inverting the RSA function, provided that the mask generation function is viewed as a black box or random oracle; see [21] and the note below for further discussion.

假设计算模n的第e根是不可行的,并且RSAES-OAEP中的掩码生成函数具有适当的性质,则RSAES-OAEP在语义上是安全的,可以抵抗自适应选择密文攻击。如果屏蔽生成函数被视为黑匣子或随机预言器,则从打破RSAES-OAEP的难度与反转RSA函数的难度直接相关的角度来看,该保证是可证明的;有关进一步的讨论,请参见[21]和下面的注释。

Both the encryption and the decryption operations of RSAES-OAEP take the value of a label L as input. In this version of PKCS #1, L is the empty string; other uses of the label are outside the scope of this document. See Appendix A.2.1 for the relevant ASN.1 syntax.

RSAES-OAEP的加密和解密操作都将标签L的值作为输入。在这个版本的PKCS#1中,L是空字符串;标签的其他用途不在本文件范围内。有关ASN.1语法,请参见附录A.2.1。

RSAES-OAEP is parameterized by the choice of hash function and mask generation function. This choice should be fixed for a given RSA key. Suggested hash and mask generation functions are given in Appendix B.

RSAES-OAEP通过选择哈希函数和掩码生成函数进行参数化。对于给定的RSA密钥,此选项应该是固定的。附录B中给出了建议的哈希和掩码生成函数。

Note. Recent results have helpfully clarified the security properties of the OAEP encoding method [3] (roughly the procedure described in step 1.b in Section 7.1.1). The background is as follows. In 1994, Bellare and Rogaway [3] introduced a security concept that they denoted plaintext awareness (PA94). They proved that if a deterministic public-key encryption primitive (e.g., RSAEP) is hard to invert without the private key, then the corresponding OAEP-based encryption scheme is plaintext-aware (in the random oracle model), meaning roughly that an adversary cannot produce a valid ciphertext without actually "knowing" the underlying plaintext. Plaintext awareness of an encryption scheme is closely related to the resistance of the scheme against chosen-ciphertext attacks. In such attacks, an adversary is given the opportunity to send queries to an oracle simulating the decryption primitive. Using the results of these queries, the adversary attempts to decrypt a challenge ciphertext.

笔记最近的结果有助于阐明OAEP编码方法[3]的安全属性(大致与第7.1.1节步骤1.b中描述的过程相同)。背景如下。1994年,Bellare和Rogaway[3]引入了一个安全概念,表示明文意识(PA94)。他们证明,如果确定性公钥加密原语(例如,RSAEP)在没有私钥的情况下很难反转,那么相应的基于OAEP的加密方案是纯文本感知的(在随机oracle模型中),这大致意味着对手在没有实际“了解”底层纯文本的情况下无法生成有效的密文。加密方案的明文感知与方案抵抗选定密文攻击的能力密切相关。在这种攻击中,对手有机会向模拟解密原语的oracle发送查询。利用这些查询的结果,对手试图解密挑战密文。

However, there are two flavors of chosen-ciphertext attacks, and PA94 implies security against only one of them. The difference relies on what the adversary is allowed to do after she is given the challenge ciphertext. The indifferent attack scenario (denoted CCA1) does not admit any queries to the decryption oracle after the adversary is given the challenge ciphertext, whereas the adaptive scenario (denoted CCA2) does (except that the decryption oracle refuses to decrypt the challenge ciphertext once it is published). In 1998, Bellare and Rogaway, together with Desai and Pointcheval [2], came up with a new, stronger notion of plaintext awareness (PA98) that does imply security against CCA2.

然而,有两种类型的选择密文攻击,而PA94只意味着对其中一种攻击的安全性。区别取决于对手在收到挑战密码后可以做什么。无关攻击场景(表示为CCA1)在对手收到质询密文后不允许对解密oracle进行任何查询,而自适应场景(表示为CCA2)则允许(除非解密oracle在质询密文发布后拒绝解密)。1998年,Bellare和Rogaway以及Desai和Pointcheval[2]提出了一个新的、更强大的明文意识概念(PA98),这确实意味着针对CCA2的安全性。

To summarize, there have been two potential sources for misconception: that PA94 and PA98 are equivalent concepts; or that CCA1 and CCA2 are equivalent concepts. Either assumption leads to the conclusion that the Bellare-Rogaway paper implies security of OAEP against CCA2, which it does not.

总而言之,有两个潜在的误解来源:PA94和PA98是等价的概念;或者CCA1和CCA2是等效概念。任何一种假设都会得出结论,即Bellare-Rogaway论文暗示了OAEP对CCA2的安全性,而事实并非如此。

(Footnote: It might be fair to mention that PKCS #1 v2.0 cites [3] and claims that "a chosen ciphertext attack is ineffective against a plaintext-aware encryption scheme such as RSAES-OAEP" without specifying the kind of plaintext awareness or chosen ciphertext attack considered.)

(脚注:可以公平地说,PKCS#1 v2.0引用了[3]并声称“选择密文攻击对RSAES-OAEP等明文感知加密方案无效”,但没有指定所考虑的明文感知或选择密文攻击的类型。)

OAEP has never been proven secure against CCA2; in fact, Victor Shoup [48] has demonstrated that such a proof does not exist in the general case. Put briefly, Shoup showed that an adversary in the CCA2 scenario who knows how to partially invert the encryption primitive but does not know how to invert it completely may well be able to break the scheme. For example, one may imagine an attacker who is able to break RSAES-OAEP if she knows how to recover all but the first 20 bytes of a random integer encrypted with RSAEP. Such an attacker does not need to be able to fully invert RSAEP, because she does not use the first 20 octets in her attack.

OAEP从未被证明对CCA2安全;事实上,Victor Shoup[48]已经证明,一般情况下不存在这样的证据。简言之,Shoup指出,CCA2场景中的对手知道如何部分反转加密原语,但不知道如何完全反转加密原语,很可能会破坏该方案。例如,如果攻击者知道如何恢复使用RSAEP加密的随机整数的前20个字节以外的所有字节,则可以想象攻击者能够破坏RSAES-OAEP。这样的攻击者不需要能够完全反转RSAEP,因为她在攻击中不使用前20个八位组。

Still, RSAES-OAEP is secure against CCA2, which was proved by Fujisaki, Okamoto, Pointcheval, and Stern [21] shortly after the announcement of Shoup's result. Using clever lattice reduction techniques, they managed to show how to invert RSAEP completely given a sufficiently large part of the pre-image. This observation, combined with a proof that OAEP is secure against CCA2 if the underlying encryption primitive is hard to partially invert, fills the gap between what Bellare and Rogaway proved about RSAES-OAEP and what some may have believed that they proved. Somewhat paradoxically, we are hence saved by an ostensible weakness in RSAEP (i.e., the whole inverse can be deduced from parts of it).

尽管如此,RSAES-OAEP对CCA2是安全的,Fujisaki、Okamoto、Pointcheval和Stern[21]在Shoup结果公布后不久就证明了这一点。通过使用巧妙的晶格缩减技术,他们成功地展示了如何在给定足够大的预图像部分的情况下完全反转RSAEP。这一观察结果,加上如果基础加密原语难以部分反转,OAEP对CCA2是安全的证明,填补了Bellare和Rogaway关于RSAES-OAEP的证明与一些人可能认为他们的证明之间的差距。有些自相矛盾的是,我们因此被RSAEP中一个表面上的弱点所拯救(也就是说,可以从它的一部分推导出整个倒数)。

Unfortunately however, the security reduction is not efficient for concrete parameters. While the proof successfully relates an adversary Adv against the CCA2 security of RSAES-OAEP to an algorithm Inv inverting RSA, the probability of success for Inv is only approximately \epsilon^2 / 2^18, where \epsilon is the probability of success for Adv.

然而,不幸的是,对于具体参数,安全性降低并不有效。虽然证明成功地将对手Adv与RSAES-OAEP的CCA2安全性关联到算法Inv反转RSA,Inv的成功概率仅约为\epsilon^2/2^18,其中\epsilon是Adv的成功概率。

(Footnote: In [21] the probability of success for the inverter was \epsilon^2 / 4. The additional factor 1 / 2^16 is due to the eight fixed zero bits at the beginning of the encoded message EM, which are not present in the variant of OAEP considered in [21] (Inv must apply Adv twice to invert RSA, and each application corresponds to a factor 1 / 2^8).)

(脚注:在[21]中,逆变器的成功概率为\epsilon^2/4。附加系数1/2^16是由于编码消息EM开头的八个固定零位,而在[21]中考虑的OAEP变体中不存在这八个固定零位。)(Inv必须应用Adv两次以反转RSA,每次应用对应一个系数1/2^8)。)

In addition, the running time for Inv is approximately t^2, where t is the running time of the adversary. The consequence is that we cannot exclude the possibility that attacking RSAES-OAEP is considerably easier than inverting RSA for concrete parameters. Still, the existence of a security proof provides some assurance that the RSAES-OAEP construction is sounder than ad hoc constructions such as RSAES-PKCS1-v1_5.

此外,Inv的运行时间约为t^2,其中t是对手的运行时间。其结果是,我们不能排除攻击RSAES-OAEP比反转具体参数的RSA容易得多的可能性。尽管如此,安全证明的存在提供了一些保证,即RSAES-OAEP构造比特殊构造(如RSAES-PKCS1-v1_5)更可靠。

Hybrid encryption schemes based on the RSA-KEM key encapsulation paradigm offer tight proofs of security directly applicable to concrete parameters; see [30] for discussion. Future versions of PKCS #1 may specify schemes based on this paradigm.

基于RSA-KEM密钥封装范式的混合加密方案为直接适用于具体参数的安全性提供了严密的证明;有关讨论,请参见[30]。PKCS#1的未来版本可能会指定基于此范例的方案。

7.1.1 Encryption operation
7.1.1 加密操作

RSAES-OAEP-ENCRYPT ((n, e), M, L)

RSAES-OAEP-ENCRYPT((n,e),M,L)

Options: Hash hash function (hLen denotes the length in octets of the hash function output) MGF mask generation function

选项:哈希哈希函数(hLen表示哈希函数输出的长度,以八位字节为单位)MGF掩码生成函数

Input: (n, e) recipient's RSA public key (k denotes the length in octets of the RSA modulus n) M message to be encrypted, an octet string of length mLen, where mLen <= k - 2hLen - 2 L optional label to be associated with the message; the default value for L, if L is not provided, is the empty string

输入:(n,e)收件人的RSA公钥(k表示要加密的RSA模n的长度(以八位字节为单位)M消息,长度为mLen的八位字节字符串,其中mLen<=k-2hLen-2l可选标签与消息关联;如果未提供L,则L的默认值为空字符串

Output: C ciphertext, an octet string of length k

输出:C密文,长度为k的八位字节字符串

Errors: "message too long"; "label too long"

错误:“消息太长”;“标签太长”

Assumption: RSA public key (n, e) is valid

假设:RSA公钥(n,e)有效

Steps:

步骤:

1. Length checking:

1. 长度检查:

a. If the length of L is greater than the input limitation for the hash function (2^61 - 1 octets for SHA-1), output "label too long" and stop.

a. 如果L的长度大于哈希函数的输入限制(SHA-1为2^61-1个八位字节),则输出“标签太长”并停止。

b. If mLen > k - 2hLen - 2, output "message too long" and stop.

b. 如果mLen>k-2hLen-2,则输出“消息太长”并停止。

2. EME-OAEP encoding (see Figure 1 below):

2. EME-OAEP编码(参见下图1):

a. If the label L is not provided, let L be the empty string. Let lHash = Hash(L), an octet string of length hLen (see the note below).

a. 如果没有提供标签L,则让L为空字符串。设lHash=Hash(L),一个长度为hLen的八位字节字符串(见下面的注释)。

b. Generate an octet string PS consisting of k - mLen - 2hLen - 2 zero octets. The length of PS may be zero.

b. 生成由k-mLen-2hLen-2个零八位元组成的八位元字符串PS。PS的长度可以为零。

c. Concatenate lHash, PS, a single octet with hexadecimal value 0x01, and the message M to form a data block DB of length k - hLen - 1 octets as

c. 将lHash、PS、一个十六进制值为0x01的八位字节和消息M连接起来,形成一个长度为k-hLen-1八位字节的数据块DB,如下所示:

DB = lHash || PS || 0x01 || M.

DB=lHash | | PS | | 0x01 | | M。

d. Generate a random octet string seed of length hLen.

d. 生成长度为hLen的随机八位组字符串种子。

e. Let dbMask = MGF(seed, k - hLen - 1).

e. 设dbMask=MGF(seed,k-hLen-1)。

f. Let maskedDB = DB \xor dbMask.

f. 让maskedDB=DB\xor dbMask。

g. Let seedMask = MGF(maskedDB, hLen).

g. 设seedMask=MGF(maskedDB,hLen)。

h. Let maskedSeed = seed \xor seedMask.

h. 让maskedSeed=seed\xor seedMask。

i. Concatenate a single octet with hexadecimal value 0x00, maskedSeed, and maskedDB to form an encoded message EM of length k octets as

i. 将单个八位字节与十六进制值0x00、maskedSeed和maskedDB连接起来,形成长度为k个八位字节的编码消息EM,如下所示:

EM = 0x00 || maskedSeed || maskedDB.

EM=0x00 | | | | | | maskedDB。

3. RSA encryption:

3. RSA加密:

a. Convert the encoded message EM to an integer message representative m (see Section 4.2):

a. 将编码消息EM转换为代表m的整数消息(见第4.2节):

m = OS2IP (EM).

m=OS2IP(EM)。

b. Apply the RSAEP encryption primitive (Section 5.1.1) to the RSA public key (n, e) and the message representative m to produce an integer ciphertext representative c:

b. 将RSAEP加密原语(第5.1.1节)应用于RSA公钥(n,e)和消息代表m,以生成整数密文代表c:

c = RSAEP ((n, e), m).

c=RSAEP((n,e),m)。

c. Convert the ciphertext representative c to a ciphertext C of length k octets (see Section 4.1):

c. 将密文代表c转换为长度为k个八位字节的密文c(见第4.1节):

C = I2OSP (c, k).

C=I2OSP(C,k)。

4. Output the ciphertext C.

4. 输出密文C。

Note. If L is the empty string, the corresponding hash value lHash has the following hexadecimal representation for different choices of Hash:

笔记如果L是空字符串,则对于不同的哈希选择,相应的哈希值lHash具有以下十六进制表示形式:

SHA-1: (0x)da39a3ee 5e6b4b0d 3255bfef 95601890 afd80709 SHA-256: (0x)e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b934c a495991b 7852b855 SHA-384: (0x)38b060a7 51ac9638 4cd9327e b1b1e36a 21fdb711 14be0743 4c0cc7bf 63f6e1da 274edebf e76f65fb d51ad2f1 4898b95b SHA-512: (0x)cf83e135 7eefb8bd f1542850 d66d8007 d620e405 0b5715dc 83f4a921 d36ce9ce 47d0d13c 5d85f2b0 ff8318d2 877eec2f 63b931bd 47417a81 a538327a f927da3e

SHA-1:(0x)da39a3ee 5e6b4b0d 3255BFEFEF 95601890 afd80709 SHA-256:(0x)e3b0c442 98fc1c14 9afbf4c8 996fb924 27ae41e4 649b934c a495991b 7852b855 SHA-384:(0x)38b060a7 51ac9638 4cd9327e b1b1e36a 21fdb711 14be0743 4CC7BF 63f6e1da 274edebf e76f65fb d51ad2f1 4898b95b SHA-512:(0x)cf83e135 7eefb8bd f1542850 d66d8007 d620e405 0b5715dc 83f4a921 d36ce9ce 47d0d13c 5d85f2b0 ff8318d2 877eec2f 63b931bd 47417a81 a538327a f927da3e

   __________________________________________________________________
        
   __________________________________________________________________
        
                             +----------+---------+-------+
                        DB = |  lHash   |    PS   |   M   |
                             +----------+---------+-------+
                                            |
                  +----------+              V
                  |   seed   |--> MGF ---> xor
                  +----------+              |
                        |                   |
               +--+     V                   |
               |00|    xor <----- MGF <-----|
               +--+     |                   |
                 |      |                   |
                 V      V                   V
               +--+----------+----------------------------+
         EM =  |00|maskedSeed|          maskedDB          |
               +--+----------+----------------------------+
   __________________________________________________________________
        
                             +----------+---------+-------+
                        DB = |  lHash   |    PS   |   M   |
                             +----------+---------+-------+
                                            |
                  +----------+              V
                  |   seed   |--> MGF ---> xor
                  +----------+              |
                        |                   |
               +--+     V                   |
               |00|    xor <----- MGF <-----|
               +--+     |                   |
                 |      |                   |
                 V      V                   V
               +--+----------+----------------------------+
         EM =  |00|maskedSeed|          maskedDB          |
               +--+----------+----------------------------+
   __________________________________________________________________
        

Figure 1: EME-OAEP encoding operation. lHash is the hash of the optional label L. Decoding operation follows reverse steps to recover M and verify lHash and PS.

图1:EME-OAEP编码操作。lHash是可选标签L的散列。解码操作遵循相反的步骤来恢复M并验证lHash和PS。

7.1.2 Decryption operation
7.1.2 解密操作

RSAES-OAEP-DECRYPT (K, C, L)

RSAES-OAEP-DECRYPT(K,C,L)

Options: Hash hash function (hLen denotes the length in octets of the hash function output) MGF mask generation function

选项:哈希哈希函数(hLen表示哈希函数输出的长度,以八位字节为单位)MGF掩码生成函数

Input: K recipient's RSA private key (k denotes the length in octets of the RSA modulus n) C ciphertext to be decrypted, an octet string of length k, where k = 2hLen + 2 L optional label whose association with the message is to be verified; the default value for L, if L is not provided, is the empty string

输入:K收件人的RSA私钥(K表示RSA模数n的长度,以八位字节表示)C要解密的密文,长度为K的八位字节字符串,其中K=2hLen+2 L可选标签,其与消息的关联将被验证;如果未提供L,则L的默认值为空字符串

   Output:
   M        message, an octet string of length mLen, where mLen <= k -
            2hLen - 2
        
   Output:
   M        message, an octet string of length mLen, where mLen <= k -
            2hLen - 2
        

Error: "decryption error"

错误:“解密错误”

Steps:

步骤:

1. Length checking:

1. 长度检查:

a. If the length of L is greater than the input limitation for the hash function (2^61 - 1 octets for SHA-1), output "decryption error" and stop.

a. 如果L的长度大于哈希函数的输入限制(SHA-1为2^61-1个八位字节),则输出“解密错误”并停止。

b. If the length of the ciphertext C is not k octets, output "decryption error" and stop.

b. 如果密文C的长度不是k个八位字节,则输出“解密错误”并停止。

c. If k < 2hLen + 2, output "decryption error" and stop.

c. 如果k<2hLen+2,则输出“解密错误”并停止。

2. RSA decryption:

2. RSA解密:

a. Convert the ciphertext C to an integer ciphertext representative c (see Section 4.2):

a. 将密文C转换为整数密文代表C(见第4.2节):

c = OS2IP (C).

c=OS2IP(c)。

b. Apply the RSADP decryption primitive (Section 5.1.2) to the RSA private key K and the ciphertext representative c to produce an integer message representative m:

b. 将RSADP解密原语(第5.1.2节)应用于RSA私钥K和密文代表c,以生成代表m的整数消息:

m = RSADP (K, c).

m=RSADP(K,c)。

If RSADP outputs "ciphertext representative out of range" (meaning that c >= n), output "decryption error" and stop.

如果RSADP输出“密文代表超出范围”(表示c>=n),则输出“解密错误”并停止。

c. Convert the message representative m to an encoded message EM of length k octets (see Section 4.1):

c. 将消息代表m转换为长度为k个八位字节的编码消息EM(见第4.1节):

EM = I2OSP (m, k).

EM=I2OSP(m,k)。

3. EME-OAEP decoding:

3. EME-OAEP解码:

a. If the label L is not provided, let L be the empty string. Let lHash = Hash(L), an octet string of length hLen (see the note in Section 7.1.1).

a. 如果没有提供标签L,则让L为空字符串。设lHash=Hash(L),长度为hLen的八位字节字符串(见第7.1.1节中的注释)。

b. Separate the encoded message EM into a single octet Y, an octet string maskedSeed of length hLen, and an octet string maskedDB of length k - hLen - 1 as

b. 将编码的消息EM分离为单个八位字节Y、长度为hLen的八位字节字符串maskedSeed和长度为k-hLen-1的八位字节字符串maskedDB,如下所示:

EM = Y || maskedSeed || maskedDB.

EM=Y | | | | | | | maskedDB。

c. Let seedMask = MGF(maskedDB, hLen).

c. 设seedMask=MGF(maskedDB,hLen)。

d. Let seed = maskedSeed \xor seedMask.

d. 让seed=maskedSeed\xor seedMask。

e. Let dbMask = MGF(seed, k - hLen - 1).

e. 设dbMask=MGF(seed,k-hLen-1)。

f. Let DB = maskedDB \xor dbMask.

f. 设DB=maskedDB\xor dbMask。

g. Separate DB into an octet string lHash' of length hLen, a (possibly empty) padding string PS consisting of octets with hexadecimal value 0x00, and a message M as

g. 将数据库分成长度为hLen的八位字节字符串lHash',由十六进制值0x00的八位字节组成的填充字符串PS(可能为空),以及消息M as

DB = lHash' || PS || 0x01 || M.

DB=lHash'|| PS | | 0x01 | | M。

If there is no octet with hexadecimal value 0x01 to separate PS from M, if lHash does not equal lHash', or if Y is nonzero, output "decryption error" and stop. (See the note below.)

如果没有十六进制值0x01的八位字节将PS与M分开,如果lHash不等于lHash',或者如果Y不为零,则输出“解密错误”并停止。(请参见下面的注释。)

4. Output the message M.

4. 输出消息M。

Note. Care must be taken to ensure that an opponent cannot distinguish the different error conditions in Step 3.g, whether by error message or timing, or, more generally, learn partial information about the encoded message EM. Otherwise an opponent may be able to obtain useful information about the decryption of the ciphertext C, leading to a chosen-ciphertext attack such as the one observed by Manger [36].

笔记必须注意确保对手无法区分步骤3.g中的不同错误条件,无论是通过错误消息还是计时,或者更一般地说,了解有关编码消息EM的部分信息。否则,对手可能能够获得有关密文C解密的有用信息,导致选择密文攻击,如Manger观察到的攻击[36]。

7.2 RSAES-PKCS1-v1_5
7.2 RSAES-PKCS1-v1_5

RSAES-PKCS1-v1_5 combines the RSAEP and RSADP primitives (Sections 5.1.1 and 5.1.2) with the EME-PKCS1-v1_5 encoding method (step 1 in Section 7.2.1 and step 3 in Section 7.2.2). It is mathematically equivalent to the encryption scheme in PKCS #1 v1.5. RSAES-PKCS1- v1_5 can operate on messages of length up to k - 11 octets (k is the octet length of the RSA modulus), although care should be taken to

RSAES-PKCS1-v1_5将RSAEP和RSADP原语(第5.1.1节和第5.1.2节)与EME-PKCS1-v1_5编码方法相结合(第7.2.1节中的步骤1和第7.2.2节中的步骤3)。它在数学上等同于PKCS#1 v1.5中的加密方案。RSAES-PKCS1-v1_5可以在长度不超过k-11个八位字节(k是RSA模数的八位字节长度)的消息上运行,但应注意

avoid certain attacks on low-exponent RSA due to Coppersmith, Franklin, Patarin, and Reiter when long messages are encrypted (see the third bullet in the notes below and [10]; [14] contains an improved attack). As a general rule, the use of this scheme for encrypting an arbitrary message, as opposed to a randomly generated key, is not recommended.

在加密长消息时,避免因Coppersmith、Franklin、Patarin和Reiter而对低指数RSA进行某些攻击(请参见下面注释中的第三项,[10];[14]包含改进的攻击)。作为一般规则,不建议使用此方案加密任意消息,而不是随机生成的密钥。

It is possible to generate valid RSAES-PKCS1-v1_5 ciphertexts without knowing the corresponding plaintexts, with a reasonable probability of success. This ability can be exploited in a chosen- ciphertext attack as shown in [6]. Therefore, if RSAES-PKCS1-v1_5 is to be used, certain easily implemented countermeasures should be taken to thwart the attack found in [6]. Typical examples include the addition of structure to the data to be encoded, rigorous checking of PKCS #1 v1.5 conformance (and other redundancy) in decrypted messages, and the consolidation of error messages in a client-server protocol based on PKCS #1 v1.5. These can all be effective countermeasures and do not involve changes to a PKCS #1 v1.5-based protocol. See [7] for a further discussion of these and other countermeasures. It has recently been shown that the security of the SSL/TLS handshake protocol [17], which uses RSAES-PKCS1-v1_5 and certain countermeasures, can be related to a variant of the RSA problem; see [32] for discussion.

可以在不知道相应明文的情况下生成有效的RSAES-PKCS1-v1_5密文,并具有合理的成功概率。如[6]所示,这种能力可以在选择密文攻击中被利用。因此,如果要使用RSAES-PKCS1-v1_5,则应采取某些易于实施的对策来挫败[6]中的攻击。典型示例包括向要编码的数据添加结构、严格检查解密消息中的PKCS#1 v1.5一致性(和其他冗余),以及在基于PKCS#1 v1.5的客户机-服务器协议中整合错误消息。这些都是有效的对策,不涉及对基于PKCS#1 v1.5的协议的更改。有关这些和其他对策的进一步讨论,请参见[7]。最近已经证明,使用RSAES-PKCS1-v1_5和某些对策的SSL/TLS握手协议[17]的安全性可能与RSA问题的一种变体有关;有关讨论,请参见[32]。

Note. The following passages describe some security recommendations pertaining to the use of RSAES-PKCS1-v1_5. Recommendations from version 1.5 of this document are included as well as new recommendations motivated by cryptanalytic advances made in the intervening years.

笔记以下段落描述了与RSAES-PKCS1-v1_5使用相关的一些安全建议。本文件第1.5版中的建议以及受其间几年密码分析进展推动的新建议也包括在内。

* It is recommended that the pseudorandom octets in step 2 in Section 7.2.1 be generated independently for each encryption process, especially if the same data is input to more than one encryption process. Haastad's results [24] are one motivation for this recommendation.

* 建议为每个加密过程独立生成第7.2.1节第2步中的伪随机八位字节,尤其是当相同数据输入到多个加密过程时。Haastad的结果[24]是这项建议的动机之一。

* The padding string PS in step 2 in Section 7.2.1 is at least eight octets long, which is a security condition for public-key operations that makes it difficult for an attacker to recover data by trying all possible encryption blocks.

* 第7.2.1节步骤2中的填充字符串PS至少有八个八位字节长,这是公钥操作的安全条件,使得攻击者很难通过尝试所有可能的加密块来恢复数据。

* The pseudorandom octets can also help thwart an attack due to Coppersmith et al. [10] (see [14] for an improvement of the attack) when the size of the message to be encrypted is kept small. The attack works on low-exponent RSA when similar messages are encrypted with the same RSA public key. More specifically, in one flavor of the attack, when two inputs to RSAEP agree on a large fraction of bits (8/9) and low-exponent RSA (e = 3) is used

* 当要加密的消息的大小保持较小时,伪随机八位组还可以帮助阻止Coppersmith等人[10]提出的攻击(参见[14]了解攻击的改进)。当相似的消息使用相同的RSA公钥加密时,该攻击在低指数RSA上有效。更具体地说,在一种攻击中,当RSAEP的两个输入在很大一部分位(8/9)上一致时,使用低指数RSA(e=3)

to encrypt both of them, it may be possible to recover both inputs with the attack. Another flavor of the attack is successful in decrypting a single ciphertext when a large fraction (2/3) of the input to RSAEP is already known. For typical applications, the message to be encrypted is short (e.g., a 128-bit symmetric key) so not enough information will be known or common between two messages to enable the attack. However, if a long message is encrypted, or if part of a message is known, then the attack may be a concern. In any case, the RSAES-OAEP scheme overcomes the attack.

要对它们进行加密,可能需要通过攻击恢复两个输入。另一种攻击方式是,当RSAEP的大部分输入(2/3)已知时,成功解密单个密文。对于典型应用程序,要加密的消息很短(例如,128位对称密钥),因此两条消息之间没有足够的已知信息或公共信息来发起攻击。但是,如果长消息被加密,或者消息的一部分是已知的,那么攻击可能是一个问题。无论如何,RSAES-OAEP方案克服了攻击。

7.2.1 Encryption operation
7.2.1 加密操作

RSAES-PKCS1-V1_5-ENCRYPT ((n, e), M)

RSAES-PKCS1-V1_5-加密((n,e),M)

Input: (n, e) recipient's RSA public key (k denotes the length in octets of the modulus n) M message to be encrypted, an octet string of length mLen, where mLen <= k - 11

输入:(n,e)收件人的RSA公钥(k表示要加密的模n的长度(以八位字节为单位)M消息,长度为mLen的八位字节字符串,其中mLen<=k-11

Output: C ciphertext, an octet string of length k

输出:C密文,长度为k的八位字节字符串

Error: "message too long"

错误:“消息太长”

Steps:

步骤:

1. Length checking: If mLen > k - 11, output "message too long" and stop.

1. 长度检查:如果mLen>k-11,输出“消息太长”并停止。

2. EME-PKCS1-v1_5 encoding:

2. EME-PKCS1-v1_5编码:

a. Generate an octet string PS of length k - mLen - 3 consisting of pseudo-randomly generated nonzero octets. The length of PS will be at least eight octets.

a. 生成长度为k-mLen-3的八位元字符串PS,由伪随机生成的非零八位元组成。PS的长度至少为八个八位字节。

b. Concatenate PS, the message M, and other padding to form an encoded message EM of length k octets as

b. 将PS、消息M和其他填充连接起来,形成长度为k个八位字节的编码消息EM,如下所示:

EM = 0x00 || 0x02 || PS || 0x00 || M.

EM=0x00 | | 0x02 | | PS | | 0x00 | | M。

3. RSA encryption:

3. RSA加密:

a. Convert the encoded message EM to an integer message representative m (see Section 4.2):

a. 将编码消息EM转换为代表m的整数消息(见第4.2节):

m = OS2IP (EM).

m=OS2IP(EM)。

b. Apply the RSAEP encryption primitive (Section 5.1.1) to the RSA public key (n, e) and the message representative m to produce an integer ciphertext representative c:

b. 将RSAEP加密原语(第5.1.1节)应用于RSA公钥(n,e)和消息代表m,以生成整数密文代表c:

c = RSAEP ((n, e), m).

c=RSAEP((n,e),m)。

c. Convert the ciphertext representative c to a ciphertext C of length k octets (see Section 4.1):

c. 将密文代表c转换为长度为k个八位字节的密文c(见第4.1节):

C = I2OSP (c, k).

C=I2OSP(C,k)。

4. Output the ciphertext C.

4. 输出密文C。

7.2.2 Decryption operation
7.2.2 解密操作

RSAES-PKCS1-V1_5-DECRYPT (K, C)

RSAES-PKCS1-V1_5-解密(K,C)

Input: K recipient's RSA private key C ciphertext to be decrypted, an octet string of length k, where k is the length in octets of the RSA modulus n

输入:K收件人的RSA私钥C待解密密文,长度为K的八位字节字符串,其中K是RSA模n的八位字节长度

Output: M message, an octet string of length at most k - 11

输出:M消息,长度最多为k-11的八位字节字符串

Error: "decryption error"

错误:“解密错误”

Steps:

步骤:

1. Length checking: If the length of the ciphertext C is not k octets (or if k < 11), output "decryption error" and stop.

1. 长度检查:如果密文C的长度不是k个八位字节(或者如果k<11),则输出“解密错误”并停止。

2. RSA decryption:

2. RSA解密:

a. Convert the ciphertext C to an integer ciphertext representative c (see Section 4.2):

a. 将密文C转换为整数密文代表C(见第4.2节):

c = OS2IP (C).

c=OS2IP(c)。

b. Apply the RSADP decryption primitive (Section 5.1.2) to the RSA private key (n, d) and the ciphertext representative c to produce an integer message representative m:

b. 将RSADP解密原语(第5.1.2节)应用于RSA私钥(n,d)和密文代表c,以生成代表m的整数消息:

m = RSADP ((n, d), c).

m=RSADP((n,d),c)。

If RSADP outputs "ciphertext representative out of range" (meaning that c >= n), output "decryption error" and stop.

如果RSADP输出“密文代表超出范围”(表示c>=n),则输出“解密错误”并停止。

c. Convert the message representative m to an encoded message EM of length k octets (see Section 4.1):

c. 将消息代表m转换为长度为k个八位字节的编码消息EM(见第4.1节):

EM = I2OSP (m, k).

EM=I2OSP(m,k)。

3. EME-PKCS1-v1_5 decoding: Separate the encoded message EM into an octet string PS consisting of nonzero octets and a message M as

3. EME-PKCS1-v1_5解码:将编码消息EM分离为八位字节字符串PS,由非零八位字节和消息M as组成

EM = 0x00 || 0x02 || PS || 0x00 || M.

EM=0x00 | | 0x02 | | PS | | 0x00 | | M。

If the first octet of EM does not have hexadecimal value 0x00, if the second octet of EM does not have hexadecimal value 0x02, if there is no octet with hexadecimal value 0x00 to separate PS from M, or if the length of PS is less than 8 octets, output "decryption error" and stop. (See the note below.)

如果EM的第一个八位字节没有十六进制值0x00,如果EM的第二个八位字节没有十六进制值0x02,如果没有十六进制值0x00的八位字节将PS与M分开,或者如果PS的长度小于8个八位字节,则输出“解密错误”并停止。(请参见下面的注释。)

4. Output M.

4. 输出M。

Note. Care shall be taken to ensure that an opponent cannot distinguish the different error conditions in Step 3, whether by error message or timing. Otherwise an opponent may be able to obtain useful information about the decryption of the ciphertext C, leading to a strengthened version of Bleichenbacher's attack [6]; compare to Manger's attack [36].

笔记应注意确保对手无法通过错误消息或计时来区分步骤3中的不同错误条件。否则,对手可能会获得有关密文C解密的有用信息,从而导致Bleichenbacher攻击的强化版本[6];与经理的攻击相比[36]。

8. Signature schemes with appendix
8. 带附录的签名方案

For the purposes of this document, a signature scheme with appendix consists of a signature generation operation and a signature verification operation, where the signature generation operation produces a signature from a message with a signer's RSA private key, and the signature verification operation verifies the signature on the message with the signer's corresponding RSA public key. To verify a signature constructed with this type of scheme it is necessary to have the message itself. In this way, signature schemes with appendix are distinguished from signature schemes with message recovery, which are not supported in this document.

就本文件而言,附录签名方案包括签名生成操作和签名验证操作,其中签名生成操作使用签名者的RSA私钥从消息生成签名,签名验证操作使用签名者对应的RSA公钥验证消息上的签名。要验证用这种类型的方案构造的签名,必须具有消息本身。这样,带有附录的签名方案与带有消息恢复的签名方案是不同的,这在本文档中不受支持。

A signature scheme with appendix can be employed in a variety of applications. For instance, the signature schemes with appendix defined here would be suitable signature algorithms for X.509 certificates [28]. Related signature schemes could be employed in PKCS #7 [45], although for technical reasons the current version of PKCS #7 separates a hash function from a signature scheme, which is different than what is done here; see the note in Appendix A.2.3 for more discussion.

带有附录的签名方案可以应用于多种应用。例如,此处定义的带有附录的签名方案将是适用于X.509证书的签名算法[28]。PKCS#7[45]中可以使用相关的签名方案,但由于技术原因,PKCS#7的当前版本将哈希函数与签名方案分离,这与此处所做的不同;更多讨论见附录A.2.3中的注释。

Two signature schemes with appendix are specified in this document: RSASSA-PSS and RSASSA-PKCS1-v1_5. Although no attacks are known against RSASSA-PKCS1-v1_5, in the interest of increased robustness, RSASSA-PSS is recommended for eventual adoption in new applications. RSASSA-PKCS1-v1_5 is included for compatibility with existing applications, and while still appropriate for new applications, a gradual transition to RSASSA-PSS is encouraged.

本文件规定了两个带有附录的签名方案:RSASSA-PSS和RSASSA-PKCS1-v1_5。虽然目前还没有针对RSASSA-PKCS1-v1_5的攻击,但为了增强鲁棒性,建议最终在新的应用程序中采用RSASSA-PSS。包括RSASSA-PKCS1-v1_5是为了与现有应用程序兼容,虽然仍适用于新应用程序,但鼓励逐步过渡到RSASSA-PSS。

The signature schemes with appendix given here follow a general model similar to that employed in IEEE Std 1363-2000 [26], combining signature and verification primitives with an encoding method for signatures. The signature generation operations apply a message encoding operation to a message to produce an encoded message, which is then converted to an integer message representative. A signature primitive is applied to the message representative to produce the signature. Reversing this, the signature verification operations apply a signature verification primitive to the signature to recover a message representative, which is then converted to an octet string encoded message. A verification operation is applied to the message and the encoded message to determine whether they are consistent.

此处给出的带有附录的签名方案遵循与IEEE Std 1363-2000[26]中采用的模型类似的通用模型,将签名和验证原语与签名的编码方法相结合。签名生成操作将消息编码操作应用于消息以生成编码消息,然后将其转换为整数消息代表。签名原语应用于消息代表以生成签名。与此相反,签名验证操作将签名验证原语应用于签名,以恢复消息代表,然后将其转换为八位字节字符串编码的消息。验证操作应用于消息和编码消息,以确定它们是否一致。

If the encoding method is deterministic (e.g., EMSA-PKCS1-v1_5), the verification operation may apply the message encoding operation to the message and compare the resulting encoded message to the previously derived encoded message. If there is a match, the signature is considered valid. If the method is randomized (e.g., EMSA-PSS), the verification operation is typically more complicated. For example, the verification operation in EMSA-PSS extracts the random salt and a hash output from the encoded message and checks whether the hash output, the salt, and the message are consistent; the hash output is a deterministic function in terms of the message and the salt.

如果编码方法是确定性的(例如,EMSA-PKCS1-v1_5),则验证操作可将消息编码操作应用于消息,并将生成的编码消息与先前导出的编码消息进行比较。如果存在匹配项,则认为签名有效。如果该方法是随机的(例如,EMSA-PSS),验证操作通常更复杂。例如,EMSA-PSS中的验证操作从编码的消息中提取随机salt和哈希输出,并检查哈希输出、salt和消息是否一致;散列输出是消息和salt的确定函数。

For both signature schemes with appendix defined in this document, the signature generation and signature verification operations are readily implemented as "single-pass" operations if the signature is placed after the message. See PKCS #7 [45] for an example format in the case of RSASSA-PKCS1-v1_5.

对于本文档中定义的带有附录的两个签名方案,如果签名放在消息之后,则签名生成和签名验证操作很容易实现为“单次传递”操作。有关RSASSA-PKCS1-v1#5的示例格式,请参见PKCS#7[45]。

8.1 RSASSA-PSS
8.1 RSASSA-PSS

RSASSA-PSS combines the RSASP1 and RSAVP1 primitives with the EMSA-PSS encoding method. It is compatible with the IFSSA scheme as amended in the IEEE P1363a draft [27], where the signature and verification primitives are IFSP-RSA1 and IFVP-RSA1 as defined in IEEE Std 1363-2000 [26] and the message encoding method is EMSA4. EMSA4 is slightly more general than EMSA-PSS as it acts on bit strings rather than on octet strings. EMSA-PSS is equivalent to EMSA4 restricted to the case that the operands as well as the hash and salt values are octet strings.

RSASSA-PSS将RSASP1和RSAVP1原语与EMSA-PSS编码方法相结合。它与IEEE P1363a草案[27]中修订的IFSSA方案兼容,其中签名和验证原语为IEEE Std 1363-2000[26]中定义的IFSP-RSA1和IFVP-RSA1,消息编码方法为EMSA4。EMSA4比EMSA-PSS更通用,因为它作用于位字符串而不是八位字符串。EMSA-PSS相当于EMSA4,仅限于操作数以及哈希值和salt值为八位字符串的情况。

The length of messages on which RSASSA-PSS can operate is either unrestricted or constrained by a very large number, depending on the hash function underlying the EMSA-PSS encoding method.

RSASSA-PSS可操作的消息长度不受限制或受到很大数量的限制,具体取决于EMSA-PSS编码方法的哈希函数。

Assuming that computing e-th roots modulo n is infeasible and the hash and mask generation functions in EMSA-PSS have appropriate properties, RSASSA-PSS provides secure signatures. This assurance is provable in the sense that the difficulty of forging signatures can be directly related to the difficulty of inverting the RSA function, provided that the hash and mask generation functions are viewed as black boxes or random oracles. The bounds in the security proof are essentially "tight", meaning that the success probability and running time for the best forger against RSASSA-PSS are very close to the corresponding parameters for the best RSA inversion algorithm; see [4][13][31] for further discussion.

假设计算模n的e次根是不可行的,并且EMSA-PSS中的哈希和掩码生成函数具有适当的属性,RSASSA-PSS提供安全签名。如果哈希和掩码生成函数被视为黑匣子或随机预言器,则伪造签名的难度与反转RSA函数的难度直接相关,这一保证是可以证明的。安全证明中的边界本质上是“紧的”,这意味着针对RSASSA-PSS的最佳伪造者的成功概率和运行时间非常接近于最佳RSA反演算法的相应参数;进一步讨论见[4][13][31]。

In contrast to the RSASSA-PKCS1-v1_5 signature scheme, a hash function identifier is not embedded in the EMSA-PSS encoded message, so in theory it is possible for an adversary to substitute a different (and potentially weaker) hash function than the one selected by the signer. Therefore, it is recommended that the EMSA-PSS mask generation function be based on the same hash function. In this manner the entire encoded message will be dependent on the hash function and it will be difficult for an opponent to substitute a different hash function than the one intended by the signer. This matching of hash functions is only for the purpose of preventing hash function substitution, and is not necessary if hash function substitution is addressed by other means (e.g., the verifier accepts only a designated hash function). See [34] for further discussion of these points. The provable security of RSASSA-PSS does not rely on the hash function in the mask generation function being the same as the hash function applied to the message.

与RSASSA-PKCS1-v1_5签名方案相比,EMSA-PSS编码的消息中没有嵌入哈希函数标识符,因此理论上,对手可以替换不同于签名者选择的哈希函数(可能较弱)的哈希函数。因此,建议EMSA-PSS掩码生成函数基于相同的哈希函数。以这种方式,整个编码的消息将依赖于散列函数,并且对手将很难替换与签名者预期的散列函数不同的散列函数。散列函数的这种匹配只是为了防止散列函数替换,并且如果散列函数替换是通过其他方式解决的(例如,验证器仅接受指定的散列函数),则不需要这种匹配。有关这些要点的进一步讨论,请参见[34]。RSASSA-PSS的可证明安全性不依赖于掩码生成函数中的哈希函数与应用于消息的哈希函数相同。

RSASSA-PSS is different from other RSA-based signature schemes in that it is probabilistic rather than deterministic, incorporating a randomly generated salt value. The salt value enhances the security

RSASSA-PSS不同于其他基于RSA的签名方案,因为它是概率的而不是确定性的,包含了随机生成的salt值。盐值提高了安全性

of the scheme by affording a "tighter" security proof than deterministic alternatives such as Full Domain Hashing (FDH); see [4] for discussion. However, the randomness is not critical to security. In situations where random generation is not possible, a fixed value or a sequence number could be employed instead, with the resulting provable security similar to that of FDH [12].

通过提供比全域散列(FDH)等确定性替代方案更“严格”的安全性证明,对该方案进行验证;有关讨论,请参见[4]。然而,随机性对安全性并不重要。在不可能随机生成的情况下,可以使用固定值或序列号,其结果可证明安全性类似于FDH[12]。

8.1.1 Signature generation operation
8.1.1 签名生成操作

RSASSA-PSS-SIGN (K, M)

RSASSA-PSS-SIGN(K,M)

Input: K signer's RSA private key M message to be signed, an octet string

输入:K签名者的RSA私钥M要签名的消息,八位字节字符串

Output: S signature, an octet string of length k, where k is the length in octets of the RSA modulus n

输出:S签名,长度为k的八位字节字符串,其中k是RSA模n的八位字节长度

Errors: "message too long;" "encoding error"

错误:“消息太长;”“编码错误”

Steps:

步骤:

1. EMSA-PSS encoding: Apply the EMSA-PSS encoding operation (Section 9.1.1) to the message M to produce an encoded message EM of length \ceil ((modBits - 1)/8) octets such that the bit length of the integer OS2IP (EM) (see Section 4.2) is at most modBits - 1, where modBits is the length in bits of the RSA modulus n:

1. EMSA-PSS编码:对消息M应用EMSA-PSS编码操作(第9.1.1节),以生成长度为\ceil((modBits-1)/8)八位字节的编码消息EM,从而使整数OS2IP(EM)(参见第4.2节)的位长度最多为modBits-1,其中modBits是RSA模n的位长度:

EM = EMSA-PSS-ENCODE (M, modBits - 1).

EM=EMSA-PSS-ENCODE(M,模位-1)。

Note that the octet length of EM will be one less than k if modBits - 1 is divisible by 8 and equal to k otherwise. If the encoding operation outputs "message too long," output "message too long" and stop. If the encoding operation outputs "encoding error," output "encoding error" and stop.

请注意,如果modBits-1可被8整除,则EM的八位字节长度将比k小1,否则等于k。如果编码操作输出“message too long”,则输出“message too long”并停止。如果编码操作输出“编码错误”,则输出“编码错误”并停止。

2. RSA signature:

2. RSA签名:

a. Convert the encoded message EM to an integer message representative m (see Section 4.2):

a. 将编码消息EM转换为代表m的整数消息(见第4.2节):

m = OS2IP (EM).

m=OS2IP(EM)。

b. Apply the RSASP1 signature primitive (Section 5.2.1) to the RSA private key K and the message representative m to produce an integer signature representative s:

b. 将RSASP1签名原语(第5.2.1节)应用于RSA私钥K和消息代表m,以生成代表s的整数签名:

s = RSASP1 (K, m).

s=RSASP1(K,m)。

c. Convert the signature representative s to a signature S of length k octets (see Section 4.1):

c. 将签名代表s转换为长度为k个八位字节的签名s(见第4.1节):

S = I2OSP (s, k).

S=I2OSP(S,k)。

3. Output the signature S.

3. 输出签名S。

8.1.2 Signature verification operation
8.1.2 签名验证操作

RSASSA-PSS-VERIFY ((n, e), M, S)

RSASSA-PSS-VERIFY(北、东、南)

Input: (n, e) signer's RSA public key M message whose signature is to be verified, an octet string S signature to be verified, an octet string of length k, where k is the length in octets of the RSA modulus n

输入:(n,e)签名者的RSA公钥M消息,其签名将被验证,一个八位组字符串s签名将被验证,一个长度为k的八位组字符串,其中k是RSA模n的长度(以八位组为单位)

Output: "valid signature" or "invalid signature"

输出:“有效签名”或“无效签名”

Steps:

步骤:

1. Length checking: If the length of the signature S is not k octets, output "invalid signature" and stop.

1. 长度检查:如果签名S的长度不是k个八位字节,则输出“无效签名”并停止。

2. RSA verification:

2. RSA验证:

a. Convert the signature S to an integer signature representative s (see Section 4.2):

a. 将签名S转换为整数签名代表S(见第4.2节):

s = OS2IP (S).

s=OS2IP(s)。

b. Apply the RSAVP1 verification primitive (Section 5.2.2) to the RSA public key (n, e) and the signature representative s to produce an integer message representative m:

b. 将RSAVP1验证原语(第5.2.2节)应用于RSA公钥(n,e)和签名代表s,以生成整数消息代表m:

m = RSAVP1 ((n, e), s).

m=RSAVP1((n,e),s)。

If RSAVP1 output "signature representative out of range," output "invalid signature" and stop.

如果RSAVP1输出“签名代表超出范围”,则输出“无效签名”并停止。

c. Convert the message representative m to an encoded message EM of length emLen = \ceil ((modBits - 1)/8) octets, where modBits is the length in bits of the RSA modulus n (see Section 4.1):

c. 将消息代表m转换为长度为emLen=\ceil((modBits-1)/8)八位字节的编码消息EM,其中modBits是RSA模n的位长度(参见第4.1节):

EM = I2OSP (m, emLen).

EM=I2OSP(m,emLen)。

Note that emLen will be one less than k if modBits - 1 is divisible by 8 and equal to k otherwise. If I2OSP outputs "integer too large," output "invalid signature" and stop.

注意,如果modBits-1可被8整除,则emLen将比k小1,否则等于k。如果I2OSP输出“整数太大”,则输出“无效签名”并停止。

3. EMSA-PSS verification: Apply the EMSA-PSS verification operation (Section 9.1.2) to the message M and the encoded message EM to determine whether they are consistent:

3. EMSA-PSS验证:将EMSA-PSS验证操作(第9.1.2节)应用于消息M和编码消息EM,以确定它们是否一致:

Result = EMSA-PSS-VERIFY (M, EM, modBits - 1).

结果=EMSA-PSS-VERIFY(M、EM、modBits-1)。

4. If Result = "consistent," output "valid signature." Otherwise, output "invalid signature."

4. 如果Result=“consistent”,则输出“有效签名”。否则,输出“无效签名”

8.2. RSASSA-PKCS1-v1_5
8.2. RSASSA-PKCS1-v1_5

RSASSA-PKCS1-v1_5 combines the RSASP1 and RSAVP1 primitives with the EMSA-PKCS1-v1_5 encoding method. It is compatible with the IFSSA scheme defined in IEEE Std 1363-2000 [26], where the signature and verification primitives are IFSP-RSA1 and IFVP-RSA1 and the message encoding method is EMSA-PKCS1-v1_5 (which is not defined in IEEE Std 1363-2000, but is in the IEEE P1363a draft [27]).

RSASSA-PKCS1-v1_5将RSASP1和RSAVP1原语与EMSA-PKCS1-v1_5编码方法相结合。它与IEEE Std 1363-2000[26]中定义的IFSSA方案兼容,其中签名和验证原语为IFSP-RSA1和IFVP-RSA1,消息编码方法为EMSA-PKCS1-v1_5(未在IEEE Std 1363-2000中定义,但在IEEE P1363a草案[27]中定义)。

The length of messages on which RSASSA-PKCS1-v1_5 can operate is either unrestricted or constrained by a very large number, depending on the hash function underlying the EMSA-PKCS1-v1_5 method.

RSASSA-PKCS1-v1_5可操作的消息长度不受限制或受很大数量的限制,具体取决于EMSA-PKCS1-v1_5方法的哈希函数。

Assuming that computing e-th roots modulo n is infeasible and the hash function in EMSA-PKCS1-v1_5 has appropriate properties, RSASSA-PKCS1-v1_5 is conjectured to provide secure signatures. More precisely, forging signatures without knowing the RSA private key is conjectured to be computationally infeasible. Also, in the encoding method EMSA-PKCS1-v1_5, a hash function identifier is embedded in the encoding. Because of this feature, an adversary trying to find a message with the same signature as a previously signed message must find collisions of the particular hash function being used; attacking a different hash function than the one selected by the signer is not useful to the adversary. See [34] for further discussion.

假设计算模n的e次根是不可行的,并且EMSA-PKCS1-v1_5中的哈希函数具有适当的属性,则推测RSASSA-PKCS1-v1_5提供安全签名。更准确地说,在不知道RSA私钥的情况下伪造签名在计算上是不可行的。此外,在编码方法EMSA-PKCS1-v1_5中,在编码中嵌入了散列函数标识符。由于该特性,试图查找与先前签名的消息具有相同签名的消息的对手必须找到所使用的特定哈希函数的冲突;攻击与签名者选择的散列函数不同的散列函数对对手没有用处。有关进一步的讨论,请参见[34]。

Note. As noted in PKCS #1 v1.5, the EMSA-PKCS1-v1_5 encoding method has the property that the encoded message, converted to an integer message representative, is guaranteed to be large and at least somewhat "random". This prevents attacks of the kind proposed by

笔记如PKCS#1 v1.5中所述,EMSA-PKCS1-v1#5编码方法具有这样的特性,即转换为整数消息代表的编码消息保证是大的,并且至少有点“随机”。这可以防止所建议的那种攻击

Desmedt and Odlyzko [16] where multiplicative relationships between message representatives are developed by factoring the message representatives into a set of small values (e.g., a set of small primes). Coron, Naccache, and Stern [15] showed that a stronger form of this type of attack could be quite effective against some instances of the ISO/IEC 9796-2 signature scheme. They also analyzed the complexity of this type of attack against the EMSA-PKCS1-v1_5 encoding method and concluded that an attack would be impractical, requiring more operations than a collision search on the underlying hash function (i.e., more than 2^80 operations). Coppersmith, Halevi, and Jutla [11] subsequently extended Coron et al.'s attack to break the ISO/IEC 9796-1 signature scheme with message recovery. The various attacks illustrate the importance of carefully constructing the input to the RSA signature primitive, particularly in a signature scheme with message recovery. Accordingly, the EMSA-PKCS-v1_5 encoding method explicitly includes a hash operation and is not intended for signature schemes with message recovery. Moreover, while no attack is known against the EMSA-PKCS-v1_5 encoding method, a gradual transition to EMSA-PSS is recommended as a precaution against future developments.

Desmedt和Odlyzko[16],其中,通过将消息代表分解为一组小值(例如,一组小素数)来建立消息代表之间的乘法关系。Coron、Naccache和Stern[15]表明,针对ISO/IEC 9796-2签名方案的某些实例,这种攻击的更强形式可能非常有效。他们还分析了针对EMSA-PKCS1-v1_5编码方法的此类攻击的复杂性,并得出结论,攻击是不切实际的,需要的操作多于对底层哈希函数的冲突搜索(即超过2^80个操作)。Coppersmith、Halevi和Jutla[11]随后扩展了Coron等人的攻击,以通过消息恢复破坏ISO/IEC 9796-1签名方案。各种攻击说明了仔细构造RSA签名原语输入的重要性,特别是在具有消息恢复的签名方案中。因此,EMSA-PKCS-v1_5编码方法明确地包括散列操作,并且不用于具有消息恢复的签名方案。此外,虽然目前还不知道有针对EMSA-PKCS-v1_5编码方法的攻击,但建议逐步过渡到EMSA-PSS,以防止未来的发展。

8.2.1 Signature generation operation
8.2.1 签名生成操作

RSASSA-PKCS1-V1_5-SIGN (K, M)

RSASSA-PKCS1-V1_5-符号(K,M)

Input: K signer's RSA private key M message to be signed, an octet string

输入:K签名者的RSA私钥M要签名的消息,八位字节字符串

Output: S signature, an octet string of length k, where k is the length in octets of the RSA modulus n

输出:S签名,长度为k的八位字节字符串,其中k是RSA模n的八位字节长度

Errors: "message too long"; "RSA modulus too short"

错误:“消息太长”;“RSA模数太短”

Steps:

步骤:

1. EMSA-PKCS1-v1_5 encoding: Apply the EMSA-PKCS1-v1_5 encoding operation (Section 9.2) to the message M to produce an encoded message EM of length k octets:

1. EMSA-PKCS1-v1_5编码:对消息M应用EMSA-PKCS1-v1_5编码操作(第9.2节),以生成长度为k个八位字节的编码消息EM:

EM = EMSA-PKCS1-V1_5-ENCODE (M, k).

EM=EMSA-PKCS1-V1_5-ENCODE(M,k)。

If the encoding operation outputs "message too long," output "message too long" and stop. If the encoding operation outputs "intended encoded message length too short," output "RSA modulus too short" and stop.

如果编码操作输出“message too long”,则输出“message too long”并停止。如果编码操作输出“预期编码消息长度太短”,则输出“RSA模数太短”并停止。

2. RSA signature:

2. RSA签名:

a. Convert the encoded message EM to an integer message representative m (see Section 4.2):

a. 将编码消息EM转换为代表m的整数消息(见第4.2节):

m = OS2IP (EM).

m=OS2IP(EM)。

b. Apply the RSASP1 signature primitive (Section 5.2.1) to the RSA private key K and the message representative m to produce an integer signature representative s:

b. 将RSASP1签名原语(第5.2.1节)应用于RSA私钥K和消息代表m,以生成代表s的整数签名:

s = RSASP1 (K, m).

s=RSASP1(K,m)。

c. Convert the signature representative s to a signature S of length k octets (see Section 4.1):

c. 将签名代表s转换为长度为k个八位字节的签名s(见第4.1节):

S = I2OSP (s, k).

S=I2OSP(S,k)。

3. Output the signature S.

3. 输出签名S。

8.2.2 Signature verification operation
8.2.2 签名验证操作

RSASSA-PKCS1-V1_5-VERIFY ((n, e), M, S)

RSASSA-PKCS1-V1_5-验证(北、东、南)

Input: (n, e) signer's RSA public key M message whose signature is to be verified, an octet string S signature to be verified, an octet string of length k, where k is the length in octets of the RSA modulus n

输入:(n,e)签名者的RSA公钥M消息,其签名将被验证,一个八位组字符串s签名将被验证,一个长度为k的八位组字符串,其中k是RSA模n的长度(以八位组为单位)

Output: "valid signature" or "invalid signature"

输出:“有效签名”或“无效签名”

Errors: "message too long"; "RSA modulus too short"

错误:“消息太长”;“RSA模数太短”

Steps:

步骤:

1. Length checking: If the length of the signature S is not k octets, output "invalid signature" and stop.

1. 长度检查:如果签名S的长度不是k个八位字节,则输出“无效签名”并停止。

2. RSA verification:

2. RSA验证:

a. Convert the signature S to an integer signature representative s (see Section 4.2):

a. 将签名S转换为整数签名代表S(见第4.2节):

s = OS2IP (S).

s=OS2IP(s)。

b. Apply the RSAVP1 verification primitive (Section 5.2.2) to the RSA public key (n, e) and the signature representative s to produce an integer message representative m:

b. 将RSAVP1验证原语(第5.2.2节)应用于RSA公钥(n,e)和签名代表s,以生成整数消息代表m:

m = RSAVP1 ((n, e), s).

m=RSAVP1((n,e),s)。

If RSAVP1 outputs "signature representative out of range," output "invalid signature" and stop.

如果RSAVP1输出“签名代表超出范围”,则输出“无效签名”并停止。

c. Convert the message representative m to an encoded message EM of length k octets (see Section 4.1):

c. 将消息代表m转换为长度为k个八位字节的编码消息EM(见第4.1节):

EM' = I2OSP (m, k).

EM'=I2OSP(m,k)。

If I2OSP outputs "integer too large," output "invalid signature" and stop.

如果I2OSP输出“整数太大”,则输出“无效签名”并停止。

3. EMSA-PKCS1-v1_5 encoding: Apply the EMSA-PKCS1-v1_5 encoding operation (Section 9.2) to the message M to produce a second encoded message EM' of length k octets:

3. EMSA-PKCS1-v1_5编码:将EMSA-PKCS1-v1_5编码操作(第9.2节)应用于消息M,以生成长度为k个八位字节的第二条编码消息EM':

EM' = EMSA-PKCS1-V1_5-ENCODE (M, k).

EM'=EMSA-PKCS1-V1_5-ENCODE(M,k)。

If the encoding operation outputs "message too long," output "message too long" and stop. If the encoding operation outputs "intended encoded message length too short," output "RSA modulus too short" and stop.

如果编码操作输出“message too long”,则输出“message too long”并停止。如果编码操作输出“预期编码消息长度太短”,则输出“RSA模数太短”并停止。

4. Compare the encoded message EM and the second encoded message EM'. If they are the same, output "valid signature"; otherwise, output "invalid signature."

4. 比较编码消息EM和第二个编码消息EM'。如果相同,则输出“有效签名”;否则,输出“无效签名”

Note. Another way to implement the signature verification operation is to apply a "decoding" operation (not specified in this document) to the encoded message to recover the underlying hash value, and then to compare it to a newly computed hash value. This has the advantage that it requires less intermediate storage (two hash values rather than two encoded messages), but the disadvantage that it requires additional code.

笔记实现签名验证操作的另一种方法是对编码消息应用“解码”操作(本文档中未指定),以恢复基础哈希值,然后将其与新计算的哈希值进行比较。这样做的优点是需要较少的中间存储(两个哈希值而不是两个编码的消息),但缺点是需要额外的代码。

9. Encoding methods for signatures with appendix
9. 带附录的签名编码方法

Encoding methods consist of operations that map between octet string messages and octet string encoded messages, which are converted to and from integer message representatives in the schemes. The integer message representatives are processed via the primitives. The encoding methods thus provide the connection between the schemes, which process messages, and the primitives.

编码方法由八位字节字符串消息和八位字节字符串编码消息之间的映射操作组成,这些操作在方案中转换为整数消息代表或从整数消息代表转换而来。整数消息表示通过原语进行处理。因此,编码方法提供了处理消息的方案与原语之间的连接。

An encoding method for signatures with appendix, for the purposes of this document, consists of an encoding operation and optionally a verification operation. An encoding operation maps a message M to an encoded message EM of a specified length. A verification operation determines whether a message M and an encoded message EM are consistent, i.e., whether the encoded message EM is a valid encoding of the message M.

就本文件而言,附录签名的编码方法包括编码操作和可选的验证操作。编码操作将消息M映射到指定长度的编码消息EM。验证操作确定消息M和编码消息EM是否一致,即,编码消息EM是否是消息M的有效编码。

The encoding operation may introduce some randomness, so that different applications of the encoding operation to the same message will produce different encoded messages, which has benefits for provable security. For such an encoding method, both an encoding and a verification operation are needed unless the verifier can reproduce the randomness (e.g., by obtaining the salt value from the signer). For a deterministic encoding method only an encoding operation is needed.

编码操作可能会引入一些随机性,因此编码操作对同一消息的不同应用将产生不同的编码消息,这有利于可证明的安全性。对于这种编码方法,除非验证者能够再现随机性(例如,通过从签名者获得salt值),否则编码和验证操作都是必需的。对于确定性编码方法,只需要一个编码操作。

Two encoding methods for signatures with appendix are employed in the signature schemes and are specified here: EMSA-PSS and EMSA-PKCS1- v1_5.

签名方案中采用了两种带附录的签名编码方法:EMSA-PSS和EMSA-PKCS1-v1_5。

9.1 EMSA-PSS
9.1 EMSA-PSS

This encoding method is parameterized by the choice of hash function, mask generation function, and salt length. These options should be fixed for a given RSA key, except that the salt length can be variable (see [31] for discussion). Suggested hash and mask generation functions are given in Appendix B. The encoding method is based on Bellare and Rogaway's Probabilistic Signature Scheme (PSS) [4][5]. It is randomized and has an encoding operation and a verification operation.

该编码方法通过选择哈希函数、掩码生成函数和salt长度进行参数化。对于给定的RSA密钥,这些选项应该是固定的,但salt长度可以是可变的(有关讨论,请参见[31])。建议的哈希和掩码生成函数见附录B。编码方法基于Bellare和Rogaway的概率签名方案(PSS)[4][5]。它是随机的,具有编码操作和验证操作。

Figure 2 illustrates the encoding operation.

图2说明了编码操作。

   __________________________________________________________________
        
   __________________________________________________________________
        
                                  +-----------+
                                  |     M     |
                                  +-----------+
                                        |
                                        V
                                      Hash
                                        |
                                        V
                          +--------+----------+----------+
                     M' = |Padding1|  mHash   |   salt   |
                          +--------+----------+----------+
                                         |
               +--------+----------+     V
         DB =  |Padding2|maskedseed|   Hash
               +--------+----------+     |
                         |               |
                         V               |    +--+
                        xor <--- MGF <---|    |bc|
                         |               |    +--+
                         |               |      |
                         V               V      V
               +-------------------+----------+--+
         EM =  |    maskedDB       |maskedseed|bc|
               +-------------------+----------+--+
   __________________________________________________________________
        
                                  +-----------+
                                  |     M     |
                                  +-----------+
                                        |
                                        V
                                      Hash
                                        |
                                        V
                          +--------+----------+----------+
                     M' = |Padding1|  mHash   |   salt   |
                          +--------+----------+----------+
                                         |
               +--------+----------+     V
         DB =  |Padding2|maskedseed|   Hash
               +--------+----------+     |
                         |               |
                         V               |    +--+
                        xor <--- MGF <---|    |bc|
                         |               |    +--+
                         |               |      |
                         V               V      V
               +-------------------+----------+--+
         EM =  |    maskedDB       |maskedseed|bc|
               +-------------------+----------+--+
   __________________________________________________________________
        

Figure 2: EMSA-PSS encoding operation. Verification operation follows reverse steps to recover salt, then forward steps to recompute and compare H.

图2:EMSA-PSS编码操作。验证操作遵循反向步骤以回收盐,然后向前步骤以重新计算和比较H。

Notes.

笔记。

1. The encoding method defined here differs from the one in Bellare and Rogaway's submission to IEEE P1363a [5] in three respects:

1. 此处定义的编码方法与Bellare和Rogaway提交给IEEE P1363a[5]的编码方法在三个方面不同:

* It applies a hash function rather than a mask generation function to the message. Even though the mask generation function is based on a hash function, it seems more natural to apply a hash function directly.

* 它对消息应用哈希函数而不是掩码生成函数。尽管掩码生成函数基于哈希函数,但直接应用哈希函数似乎更为自然。

* The value that is hashed together with the salt value is the string (0x)00 00 00 00 00 00 00 00 || mHash rather than the message M itself. Here, mHash is the hash of M. Note that the

* 与salt值一起散列的值是字符串(0x)00 | | mHash,而不是消息M本身。这里,mHash是M的散列

hash function is the same in both steps. See Note 3 below for further discussion. (Also, the name "salt" is used instead of "seed", as it is more reflective of the value's role.)

两个步骤中的哈希函数相同。进一步讨论见下文注3。(此外,使用“salt”而不是“seed”,因为它更能反映价值的作用。)

* The encoded message in EMSA-PSS has nine fixed bits; the first bit is 0 and the last eight bits form a "trailer field", the octet 0xbc. In the original scheme, only the first bit is fixed. The rationale for the trailer field is for compatibility with the Rabin-Williams IFSP-RW signature primitive in IEEE Std 1363-2000 [26] and the corresponding primitive in the draft ISO/IEC 9796-2 [29].

* EMSA-PSS中的编码信息有九个固定位;第一位为0,最后八位形成“拖车字段”,即八位字节0xbc。在原始方案中,只有第一位是固定的。拖车字段的基本原理是与IEEE Std 1363-2000[26]中的Rabin Williams IFSP-RW签名原语以及ISO/IEC 9796-2草案[29]中的相应原语兼容。

2. Assuming that the mask generation function is based on a hash function, it is recommended that the hash function be the same as the one that is applied to the message; see Section 8.1 for further discussion.

2. 假设掩码生成函数基于哈希函数,建议哈希函数与应用于消息的哈希函数相同;进一步讨论见第8.1节。

3. Without compromising the security proof for RSASSA-PSS, one may perform steps 1 and 2 of EMSA-PSS-ENCODE and EMSA-PSS-VERIFY (the application of the hash function to the message) outside the module that computes the rest of the signature operation, so that mHash rather than the message M itself is input to the module. In other words, the security proof for RSASSA-PSS still holds even if an opponent can control the value of mHash. This is convenient if the module has limited I/O bandwidth, e.g., a smart card. Note that previous versions of PSS [4][5] did not have this property. Of course, it may be desirable for other security reasons to have the module process the full message. For instance, the module may need to "see" what it is signing if it does not trust the component that computes the hash value.

3. 在不损害RSASSA-PSS的安全性证明的情况下,可以在计算其余签名操作的模块外部执行EMSA-PSS-ENCODE和EMSA-PSS-VERIFY(将哈希函数应用于消息)的步骤1和2,以便将mHash而不是消息M本身输入到模块。换句话说,即使对手可以控制mHash的值,RSASSA-PSS的安全证明仍然有效。如果模块具有有限的I/O带宽,例如智能卡,则这非常方便。请注意,PSS[4][5]的早期版本没有此属性。当然,出于其他安全原因,可能需要让模块处理完整消息。例如,如果模块不信任计算哈希值的组件,则可能需要“查看”它正在签名的内容。

4. Typical salt lengths in octets are hLen (the length of the output of the hash function Hash) and 0. In both cases the security of RSASSA-PSS can be closely related to the hardness of inverting RSAVP1. Bellare and Rogaway [4] give a tight lower bound for the security of the original RSA-PSS scheme, which corresponds roughly to the former case, while Coron [12] gives a lower bound for the related Full Domain Hashing scheme, which corresponds roughly to the latter case. In [13] Coron provides a general treatment with various salt lengths ranging from 0 to hLen; see [27] for discussion. See also [31], which adapts the security proofs in [4][13] to address the differences between the original and the present version of RSA-PSS as listed in Note 1 above.

4. 八位字节中的典型salt长度是hLen(散列函数hash的输出长度)和0。在这两种情况下,RSASSA-PSS的安全性与反向RSAVP1的硬度密切相关。Bellare和Rogaway[4]给出了原始RSA-PSS方案安全性的严格下界,大致对应于前一种情况,而Coron[12]给出了相关全域哈希方案的下界,大致对应于后一种情况。在[13]中,Coron提供了一种一般处理方法,其盐的长度范围为0到hLen;有关讨论,请参见[27]。另请参见[31],其中修改了[4][13]中的安全性证明,以解决上述注释1中列出的RSA-PSS原始版本和当前版本之间的差异。

5. As noted in IEEE P1363a [27], the use of randomization in signature schemes - such as the salt value in EMSA-PSS - may provide a "covert channel" for transmitting information other than the message being signed. For more on covert channels, see [50].

5. 如IEEE P1363a[27]中所述,在签名方案中使用随机化(如EMSA-PSS中的salt值)可能会为传输被签名消息以外的信息提供“隐蔽通道”。有关隐蔽通道的更多信息,请参见[50]。

9.1.1 Encoding operation
9.1.1 编码操作

EMSA-PSS-ENCODE (M, emBits)

EMSA-PSS-ENCODE(M,emBits)

Options:

选项:

Hash hash function (hLen denotes the length in octets of the hash function output) MGF mask generation function sLen intended length in octets of the salt

散列散列函数(hLen表示散列函数输出的八位字节长度)MGF掩码生成函数sLen表示salt的八位字节长度

Input: M message to be encoded, an octet string emBits maximal bit length of the integer OS2IP (EM) (see Section 4.2), at least 8hLen + 8sLen + 9

输入:M要编码的消息,一个八位字符串emBits整数OS2IP(EM)的最大位长度(见第4.2节),至少8hLen+8sLen+9

Output: EM encoded message, an octet string of length emLen = \ceil (emBits/8)

输出:EM编码的消息,长度为emLen=\ceil(emBits/8)的八位字节字符串

Errors: "encoding error"; "message too long"

错误:“编码错误”;“消息太长”

Steps:

步骤:

1. If the length of M is greater than the input limitation for the hash function (2^61 - 1 octets for SHA-1), output "message too long" and stop.

1. 如果M的长度大于哈希函数的输入限制(SHA-1为2^61-1个八位字节),则输出“message too long”并停止。

2. Let mHash = Hash(M), an octet string of length hLen.

2. 设mHash=Hash(M),长度为hLen的八位字节字符串。

3. If emLen < hLen + sLen + 2, output "encoding error" and stop.

3. 如果emLen<hLen+sLen+2,则输出“编码错误”并停止。

4. Generate a random octet string salt of length sLen; if sLen = 0, then salt is the empty string.

4. 生成长度为sLen的随机八位组字符串salt;如果sLen=0,则salt是空字符串。

5. Let M' = (0x)00 00 00 00 00 00 00 00 || mHash || salt;

5. 设M'=(0x)00 | | mHash | | salt;

M' is an octet string of length 8 + hLen + sLen with eight initial zero octets.

M'是长度为8+hLen+sLen的八位字节字符串,具有八个初始零八位字节。

6. Let H = Hash(M'), an octet string of length hLen.

6. 设H=Hash(M'),长度为hLen的八位字节字符串。

7. Generate an octet string PS consisting of emLen - sLen - hLen - 2 zero octets. The length of PS may be 0.

7. 生成由emLen-sLen-hLen-2个零八位元组成的八位元字符串PS。PS的长度可以是0。

8. Let DB = PS || 0x01 || salt; DB is an octet string of length emLen - hLen - 1.

8. 设DB=PS | | 0x01 | | salt;DB是长度为emLen-hLen-1的八位字节字符串。

9. Let dbMask = MGF(H, emLen - hLen - 1).

9. 设dbMask=MGF(H,emLen-hLen-1)。

10. Let maskedDB = DB \xor dbMask.

10. 让maskedDB=DB\xor dbMask。

11. Set the leftmost 8emLen - emBits bits of the leftmost octet in maskedDB to zero.

11. 将maskedDB中最左侧八位字节的最左侧8emLen-emBits设置为零。

12. Let EM = maskedDB || H || 0xbc.

12. 设EM=maskedDB | | H | | 0xbc。

13. Output EM.

13. 输出EM。

9.1.2 Verification operation
9.1.2 验证操作

EMSA-PSS-VERIFY (M, EM, emBits)

EMSA-PSS-VERIFY(M、EM、emBits)

Options: Hash hash function (hLen denotes the length in octets of the hash function output) MGF mask generation function sLen intended length in octets of the salt

选项:哈希哈希函数(hLen表示哈希函数输出的八位字节长度)MGF掩码生成函数sLen salt的预期八位字节长度

Input: M message to be verified, an octet string EM encoded message, an octet string of length emLen = \ceil (emBits/8) emBits maximal bit length of the integer OS2IP (EM) (see Section 4.2), at least 8hLen + 8sLen + 9

输入:M要验证的消息,一个八位字符串EM编码的消息,一个长度为emLen=\ceil(emBits/8)emBits的八位字符串整数OS2IP(EM)的最大位长度(见第4.2节),至少8hLen+8sLen+9

Output: "consistent" or "inconsistent"

输出:“一致”或“不一致”

Steps:

步骤:

1. If the length of M is greater than the input limitation for the hash function (2^61 - 1 octets for SHA-1), output "inconsistent" and stop.

1. 如果M的长度大于哈希函数的输入限制(SHA-1为2^61-1个八位字节),则输出“不一致”并停止。

2. Let mHash = Hash(M), an octet string of length hLen.

2. 设mHash=Hash(M),长度为hLen的八位字节字符串。

3. If emLen < hLen + sLen + 2, output "inconsistent" and stop.

3. 如果emLen<hLen+sLen+2,则输出“不一致”并停止。

4. If the rightmost octet of EM does not have hexadecimal value 0xbc, output "inconsistent" and stop.

4. 如果EM最右边的八位字节没有十六进制值0xbc,则输出“不一致”并停止。

5. Let maskedDB be the leftmost emLen - hLen - 1 octets of EM, and let H be the next hLen octets.

5. 设maskedDB为EM最左边的emLen-hLen-1八位组,H为下一个hLen八位组。

6. If the leftmost 8emLen - emBits bits of the leftmost octet in maskedDB are not all equal to zero, output "inconsistent" and stop.

6. 如果maskedDB中最左侧八位字节的最左侧8emLen-emBits不全部等于零,则输出“不一致”并停止。

7. Let dbMask = MGF(H, emLen - hLen - 1).

7. 设dbMask=MGF(H,emLen-hLen-1)。

8. Let DB = maskedDB \xor dbMask.

8. 设DB=maskedDB\xor dbMask。

9. Set the leftmost 8emLen - emBits bits of the leftmost octet in DB to zero.

9. 将以DB为单位的最左侧八位字节的最左侧8emLen-emBits设置为零。

10. If the emLen - hLen - sLen - 2 leftmost octets of DB are not zero or if the octet at position emLen - hLen - sLen - 1 (the leftmost position is "position 1") does not have hexadecimal value 0x01, output "inconsistent" and stop.

10. 如果DB的emLen-hLen-sLen-2最左边的八位字节不为零,或者如果emLen-hLen-sLen-1位置的八位字节(最左边的位置是“位置1”)没有十六进制值0x01,则输出“不一致”并停止。

11. Let salt be the last sLen octets of DB.

11. 让salt成为DB的最后一个sLen八位组。

12. Let M' = (0x)00 00 00 00 00 00 00 00 || mHash || salt ;

12. 设M'=(0x)00 | | mHash | | salt;

M' is an octet string of length 8 + hLen + sLen with eight initial zero octets.

M'是长度为8+hLen+sLen的八位字节字符串,具有八个初始零八位字节。

13. Let H' = Hash(M'), an octet string of length hLen.

13. 设H'=Hash(M'),长度为hLen的八位字节字符串。

14. If H = H', output "consistent." Otherwise, output "inconsistent."

14. 如果H=H,则输出“一致”。否则,输出“不一致”

9.2 EMSA-PKCS1-v1_5
9.2 EMSA-PKCS1-v1_5

This encoding method is deterministic and only has an encoding operation.

此编码方法是确定性的,并且只有一个编码操作。

EMSA-PKCS1-v1_5-ENCODE (M, emLen)

EMSA-PKCS1-v1_5-编码(M,emLen)

Option: Hash hash function (hLen denotes the length in octets of the hash function output)

选项:哈希函数(hLen表示哈希函数输出的长度(以八位字节为单位)

Input: M message to be encoded emLen intended length in octets of the encoded message, at least tLen + 11, where tLen is the octet length of the DER encoding T of a certain value computed during the encoding operation

输入:要编码的M消息emLen编码消息的预期长度(以八位字节为单位),至少为tLen+11,其中tLen是在编码操作期间计算的特定值的DER编码T的八位字节长度

Output: EM encoded message, an octet string of length emLen

输出:EM编码的消息,长度为emLen的八位字节字符串

Errors: "message too long"; "intended encoded message length too short"

错误:“消息太长”;“预期的编码消息长度太短”

Steps:

步骤:

1. Apply the hash function to the message M to produce a hash value H:

1. 将哈希函数应用于消息M以生成哈希值H:

H = Hash(M).

H=散列(M)。

If the hash function outputs "message too long," output "message too long" and stop.

如果哈希函数输出“message too long”,则输出“message too long”并停止。

2. Encode the algorithm ID for the hash function and the hash value into an ASN.1 value of type DigestInfo (see Appendix A.2.4) with the Distinguished Encoding Rules (DER), where the type DigestInfo has the syntax

2. 使用可分辨编码规则(DER)将哈希函数的算法ID和哈希值编码为DigestInfo类型的ASN.1值(见附录A.2.4),其中DigestInfo类型具有以下语法

      DigestInfo ::= SEQUENCE {
          digestAlgorithm AlgorithmIdentifier,
          digest OCTET STRING
      }
        
      DigestInfo ::= SEQUENCE {
          digestAlgorithm AlgorithmIdentifier,
          digest OCTET STRING
      }
        

The first field identifies the hash function and the second contains the hash value. Let T be the DER encoding of the DigestInfo value (see the notes below) and let tLen be the length in octets of T.

第一个字段标识哈希函数,第二个字段包含哈希值。设T为DigestInfo值的DER编码(见下面的注释),设tLen为T的八位字节长度。

3. If emLen < tLen + 11, output "intended encoded message length too short" and stop.

3. 如果emLen<tLen+11,则输出“预期编码消息长度太短”并停止。

4. Generate an octet string PS consisting of emLen - tLen - 3 octets with hexadecimal value 0xff. The length of PS will be at least 8 octets.

4. 生成一个八位字节字符串PS,由十六进制值0xff的emLen-tLen-3个八位字节组成。PS的长度至少为8个八位字节。

5. Concatenate PS, the DER encoding T, and other padding to form the encoded message EM as

5. 将PS、DER编码T和其他填充连接起来,形成编码消息EM as

EM = 0x00 || 0x01 || PS || 0x00 || T.

EM=0x00 | | 0x01 | | PS | | 0x00 | | T。

6. Output EM.

6. 输出EM。

Notes.

笔记。

1. For the six hash functions mentioned in Appendix B.1, the DER encoding T of the DigestInfo value is equal to the following:

1. 对于附录B.1中提到的六个散列函数,DigestInfo值的DER编码T等于以下值:

MD2: (0x)30 20 30 0c 06 08 2a 86 48 86 f7 0d 02 02 05 00 04 10 || H. MD5: (0x)30 20 30 0c 06 08 2a 86 48 86 f7 0d 02 05 05 00 04 10 || H. SHA-1: (0x)30 21 30 09 06 05 2b 0e 03 02 1a 05 00 04 14 || H. SHA-256: (0x)30 31 30 0d 06 09 60 86 48 01 65 03 04 02 01 05 00 04 20 || H. SHA-384: (0x)30 41 30 0d 06 09 60 86 48 01 65 03 04 02 02 05 00 04 30 || H. SHA-512: (0x)30 51 30 0d 06 09 60 86 48 01 65 03 04 02 03 05 00 04 40 || H.

MD2:(0x)302030C006082A 86 48 86 f7 0d 02 02 05 00 04 10|||H.MD5:(0x)302030C00608 2a 86 48 86 f7 0d 02 05 00 04 10||H.SHA-1:(0x)302130 09 05 2b 0e 02 1a 05 04 14||H.SHA-256:(0x)303130 30 30 0d 06 09 60 86 48 01 65 03 04 01 01 01 05 00 04 20|H.SHA-384:(0x)30 41 30 0d 06 09 60 86 48 01 65 03 04 02 05 00 04 30||||H.SHA-512:(0x)30 51 30 D 06 09 60 86 48 01 65 03 02 05 00 04 40|||H。

2. In version 1.5 of this document, T was defined as the BER encoding, rather than the DER encoding, of the DigestInfo value. In particular, it is possible - at least in theory - that the verification operation defined in this document (as well as in version 2.0) rejects a signature that is valid with respect to the specification given in PKCS #1 v1.5. This occurs if other rules than DER are applied to DigestInfo (e.g., an indefinite length encoding of the underlying SEQUENCE type). While this is unlikely to be a concern in practice, a cautious implementer may choose to employ a verification operation based on a BER decoding operation as specified in PKCS #1 v1.5. In this manner, compatibility with any valid implementation based on PKCS #1 v1.5 is obtained. Such a verification operation should indicate whether the underlying BER encoding is a DER encoding and hence whether the signature is valid with respect to the specification given in this document.

2. 在本文档的1.5版中,T被定义为DigestInfo值的BER编码,而不是DER编码。特别是,至少在理论上,本文件(以及2.0版)中定义的验证操作可能会拒绝PKCS#1 v1.5中给出的规范有效的签名。如果对DigestInfo应用除DER以外的其他规则(例如,基础序列类型的不定长编码),则会发生这种情况。虽然这在实践中不太可能是一个问题,但谨慎的实施者可能会选择采用基于PKCS#1 v1.5中规定的BER解码操作的验证操作。通过这种方式,可以获得与基于PKCS#1 v1.5的任何有效实现的兼容性。此类验证操作应表明基础BER编码是否为DER编码,从而表明签名对于本文件中给出的规范是否有效。

Appendix A. ASN.1 syntax
附录A.ASN.1语法
A.1 RSA key representation
A.1 RSA密钥表示

This section defines ASN.1 object identifiers for RSA public and private keys, and defines the types RSAPublicKey and RSAPrivateKey. The intended application of these definitions includes X.509 certificates, PKCS #8 [46], and PKCS #12 [47].

本节定义RSA公钥和私钥的ASN.1对象标识符,并定义RSAPublicKey和RSAPrivateKey的类型。这些定义的预期应用包括X.509证书、PKCS#8[46]和PKCS#12[47]。

The object identifier rsaEncryption identifies RSA public and private keys as defined in Appendices A.1.1 and A.1.2. The parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type NULL.

对象标识符RSA加密识别附录A.1.1和A.1.2中定义的RSA公钥和私钥。AlgorithmIdentifier类型值中与此OID关联的参数字段的值应为NULL类型。

   rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        
   rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        

The definitions in this section have been extended to support multi-prime RSA, but are backward compatible with previous versions.

本节中的定义已扩展为支持多素数RSA,但与以前的版本向后兼容。

A.1.1 RSA public key syntax
A.1.1 RSA公钥语法

An RSA public key should be represented with the ASN.1 type RSAPublicKey:

RSA公钥应使用ASN.1类型的RSAPublicKey表示:

      RSAPublicKey ::= SEQUENCE {
          modulus           INTEGER,  -- n
          publicExponent    INTEGER   -- e
      }
        
      RSAPublicKey ::= SEQUENCE {
          modulus           INTEGER,  -- n
          publicExponent    INTEGER   -- e
      }
        

The fields of type RSAPublicKey have the following meanings:

RSAPublicKey类型的字段具有以下含义:

* modulus is the RSA modulus n.

* 模是RSA模n。

* publicExponent is the RSA public exponent e.

* publicExponent是RSA公共指数e。

A.1.2 RSA private key syntax
A.1.2 RSA私钥语法

An RSA private key should be represented with the ASN.1 type RSAPrivateKey:

RSA私钥应使用ASN.1类型的RSAPrivateKey表示:

      RSAPrivateKey ::= SEQUENCE {
          version           Version,
          modulus           INTEGER,  -- n
          publicExponent    INTEGER,  -- e
          privateExponent   INTEGER,  -- d
          prime1            INTEGER,  -- p
          prime2            INTEGER,  -- q
          exponent1         INTEGER,  -- d mod (p-1)
          exponent2         INTEGER,  -- d mod (q-1)
          coefficient       INTEGER,  -- (inverse of q) mod p
          otherPrimeInfos   OtherPrimeInfos OPTIONAL
      }
        
      RSAPrivateKey ::= SEQUENCE {
          version           Version,
          modulus           INTEGER,  -- n
          publicExponent    INTEGER,  -- e
          privateExponent   INTEGER,  -- d
          prime1            INTEGER,  -- p
          prime2            INTEGER,  -- q
          exponent1         INTEGER,  -- d mod (p-1)
          exponent2         INTEGER,  -- d mod (q-1)
          coefficient       INTEGER,  -- (inverse of q) mod p
          otherPrimeInfos   OtherPrimeInfos OPTIONAL
      }
        

The fields of type RSAPrivateKey have the following meanings:

RSAPrivateKey类型的字段具有以下含义:

* version is the version number, for compatibility with future revisions of this document. It shall be 0 for this version of the document, unless multi-prime is used, in which case it shall be 1.

* 版本是版本号,用于与本文档的未来版本兼容。该版本的文件应为0,除非使用多素数,在这种情况下应为1。

            Version ::= INTEGER { two-prime(0), multi(1) }
               (CONSTRAINED BY
               {-- version must be multi if otherPrimeInfos present --})
        
            Version ::= INTEGER { two-prime(0), multi(1) }
               (CONSTRAINED BY
               {-- version must be multi if otherPrimeInfos present --})
        

* modulus is the RSA modulus n.

* 模是RSA模n。

* publicExponent is the RSA public exponent e.

* publicExponent是RSA公共指数e。

* privateExponent is the RSA private exponent d.

* privateExponent是RSA专用指数d。

* prime1 is the prime factor p of n.

* prime1是n的素因子p。

* prime2 is the prime factor q of n.

* prime2是n的素因子q。

* exponent1 is d mod (p - 1).

* 指数1是d模(p-1)。

* exponent2 is d mod (q - 1).

* 指数2是d模(q-1)。

* coefficient is the CRT coefficient q^(-1) mod p.

* 系数是CRT系数q^(-1)mod p。

* otherPrimeInfos contains the information for the additional primes r_3, ..., r_u, in order. It shall be omitted if version is 0 and shall contain at least one instance of OtherPrimeInfo if version is 1.

* otherPrimeInfos按顺序包含附加primes r_3,…,r_的信息。如果版本为0,则应省略,如果版本为1,则应至少包含一个OtherPrimeInfo实例。

         OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
        
         OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
        
         OtherPrimeInfo ::= SEQUENCE {
             prime             INTEGER,  -- ri
             exponent          INTEGER,  -- di
             coefficient       INTEGER   -- ti
         }
        
         OtherPrimeInfo ::= SEQUENCE {
             prime             INTEGER,  -- ri
             exponent          INTEGER,  -- di
             coefficient       INTEGER   -- ti
         }
        

The fields of type OtherPrimeInfo have the following meanings:

OtherPrimeInfo类型的字段具有以下含义:

* prime is a prime factor r_i of n, where i >= 3.

* 素数是n的素数因子r_i,其中i>=3。

* exponent is d_i = d mod (r_i - 1).

* 指数是d_i=d mod(r_i-1)。

* coefficient is the CRT coefficient t_i = (r_1 * r_2 * ... * r_(i-1))^(-1) mod r_i.

* 系数是CRT系数t_i=(r_1*r_2*…*r_(i-1))^(-1)mod r_i。

Note. It is important to protect the RSA private key against both disclosure and modification. Techniques for such protection are outside the scope of this document. Methods for storing and distributing private keys and other cryptographic data are described in PKCS #12 and #15.

笔记保护RSA私钥不被泄露和修改非常重要。此类保护技术不在本文件范围内。PKCS#12和#15中描述了存储和分发私钥和其他加密数据的方法。

A.2 Scheme identification
A.2方案识别

This section defines object identifiers for the encryption and signature schemes. The schemes compatible with PKCS #1 v1.5 have the same definitions as in PKCS #1 v1.5. The intended application of these definitions includes X.509 certificates and PKCS #7.

本节定义了加密和签名方案的对象标识符。与PKCS#1 v1.5兼容的方案具有与PKCS#1 v1.5相同的定义。这些定义的预期应用包括X.509证书和PKCS#7。

Here are type identifier definitions for the PKCS #1 OIDs:

以下是PKCS#1 OID的类型标识符定义:

      PKCS1Algorithms    ALGORITHM-IDENTIFIER ::= {
          { OID rsaEncryption              PARAMETERS NULL } |
          { OID md2WithRSAEncryption       PARAMETERS NULL } |
          { OID md5WithRSAEncryption       PARAMETERS NULL } |
          { OID sha1WithRSAEncryption      PARAMETERS NULL } |
          { OID sha256WithRSAEncryption    PARAMETERS NULL } |
          { OID sha384WithRSAEncryption    PARAMETERS NULL } |
          { OID sha512WithRSAEncryption    PARAMETERS NULL } |
          { OID id-RSAES-OAEP PARAMETERS RSAES-OAEP-params } |
          PKCS1PSourceAlgorithms                             |
          { OID id-RSASSA-PSS PARAMETERS RSASSA-PSS-params } ,
          ...  -- Allows for future expansion --
      }
        
      PKCS1Algorithms    ALGORITHM-IDENTIFIER ::= {
          { OID rsaEncryption              PARAMETERS NULL } |
          { OID md2WithRSAEncryption       PARAMETERS NULL } |
          { OID md5WithRSAEncryption       PARAMETERS NULL } |
          { OID sha1WithRSAEncryption      PARAMETERS NULL } |
          { OID sha256WithRSAEncryption    PARAMETERS NULL } |
          { OID sha384WithRSAEncryption    PARAMETERS NULL } |
          { OID sha512WithRSAEncryption    PARAMETERS NULL } |
          { OID id-RSAES-OAEP PARAMETERS RSAES-OAEP-params } |
          PKCS1PSourceAlgorithms                             |
          { OID id-RSASSA-PSS PARAMETERS RSASSA-PSS-params } ,
          ...  -- Allows for future expansion --
      }
        
A.2.1 RSAES-OAEP
A.2.1 RSAES-OAEP

The object identifier id-RSAES-OAEP identifies the RSAES-OAEP encryption scheme.

对象标识符id RSAES OAEP标识RSAES-OAEP加密方案。

      id-RSAES-OAEP    OBJECT IDENTIFIER ::= { pkcs-1 7 }
        
      id-RSAES-OAEP    OBJECT IDENTIFIER ::= { pkcs-1 7 }
        

The parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type RSAES-OAEP-params:

AlgorithmIdentifier类型值中与此OID相关的参数字段的值应为RSAES OAEP params类型:

      RSAES-OAEP-params ::= SEQUENCE {
          hashAlgorithm     [0] HashAlgorithm    DEFAULT sha1,
          maskGenAlgorithm  [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
          pSourceAlgorithm  [2] PSourceAlgorithm DEFAULT pSpecifiedEmpty
      }
        
      RSAES-OAEP-params ::= SEQUENCE {
          hashAlgorithm     [0] HashAlgorithm    DEFAULT sha1,
          maskGenAlgorithm  [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
          pSourceAlgorithm  [2] PSourceAlgorithm DEFAULT pSpecifiedEmpty
      }
        

The fields of type RSAES-OAEP-params have the following meanings:

RSAES OAEP params类型的字段具有以下含义:

* hashAlgorithm identifies the hash function. It shall be an algorithm ID with an OID in the set OAEP-PSSDigestAlgorithms. For a discussion of supported hash functions, see Appendix B.1.

* 哈希算法识别哈希函数。它应该是一个算法ID,在集合OAEP算法中有一个OID。有关支持的哈希函数的讨论,请参见附录B.1。

         HashAlgorithm ::= AlgorithmIdentifier {
            {OAEP-PSSDigestAlgorithms}
         }
        
         HashAlgorithm ::= AlgorithmIdentifier {
            {OAEP-PSSDigestAlgorithms}
         }
        
         OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-sha1 PARAMETERS NULL   }|
             { OID id-sha256 PARAMETERS NULL }|
             { OID id-sha384 PARAMETERS NULL }|
             { OID id-sha512 PARAMETERS NULL },
             ...  -- Allows for future expansion --
         }
        
         OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-sha1 PARAMETERS NULL   }|
             { OID id-sha256 PARAMETERS NULL }|
             { OID id-sha384 PARAMETERS NULL }|
             { OID id-sha512 PARAMETERS NULL },
             ...  -- Allows for future expansion --
         }
        

The default hash function is SHA-1:

默认哈希函数为SHA-1:

         sha1    HashAlgorithm ::= {
             algorithm   id-sha1,
             parameters  SHA1Parameters : NULL
         }
        
         sha1    HashAlgorithm ::= {
             algorithm   id-sha1,
             parameters  SHA1Parameters : NULL
         }
        
         SHA1Parameters ::= NULL
        
         SHA1Parameters ::= NULL
        

* maskGenAlgorithm identifies the mask generation function. It shall be an algorithm ID with an OID in the set PKCS1MGFAlgorithms, which for this version shall consist of id-mgf1, identifying the MGF1 mask generation function (see Appendix B.2.1). The parameters field associated with id-mgf1

* 掩码生成算法识别掩码生成函数。它应为PKCS1MGFAlgorithms集合中带有OID的算法ID,该版本应包括ID-mgf1,标识mgf1掩码生成功能(见附录B.2.1)。与id-mgf1关联的参数字段

shall be an algorithm ID with an OID in the set OAEP-PSSDigestAlgorithms, identifying the hash function on which MGF1 is based.

应是一个在集合OAEP算法中具有OID的算法ID,标识MGF1所基于的哈希函数。

         MaskGenAlgorithm ::= AlgorithmIdentifier {
            {PKCS1MGFAlgorithms}
         }
         PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-mgf1 PARAMETERS HashAlgorithm },
             ...  -- Allows for future expansion --
         }
        
         MaskGenAlgorithm ::= AlgorithmIdentifier {
            {PKCS1MGFAlgorithms}
         }
         PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-mgf1 PARAMETERS HashAlgorithm },
             ...  -- Allows for future expansion --
         }
        

The default mask generation function is MGF1 with SHA-1:

默认遮罩生成功能为MGF1,带有SHA-1:

         mgf1SHA1    MaskGenAlgorithm ::= {
             algorithm   id-mgf1,
             parameters  HashAlgorithm : sha1
         }
        
         mgf1SHA1    MaskGenAlgorithm ::= {
             algorithm   id-mgf1,
             parameters  HashAlgorithm : sha1
         }
        

* pSourceAlgorithm identifies the source (and possibly the value) of the label L. It shall be an algorithm ID with an OID in the set PKCS1PSourceAlgorithms, which for this version shall consist of id-pSpecified, indicating that the label is specified explicitly. The parameters field associated with id-pSpecified shall have a value of type OCTET STRING, containing the label. In previous versions of this specification, the term "encoding parameters" was used rather than "label", hence the name of the type below.

* pSourceAlgorithm标识标签L的来源(可能还有值)。它应该是一个算法ID,在PKCS1PSourceAlgorithms集合中有一个OID,对于这个版本,它应该由ID PSSpecified组成,表明标签是明确指定的。与id PSSpecified相关的参数字段应具有八位字符串类型的值,包含标签。在本规范以前的版本中,使用了术语“编码参数”,而不是“标签”,因此下面的类型名称如下。

         PSourceAlgorithm ::= AlgorithmIdentifier {
            {PKCS1PSourceAlgorithms}
         }
        
         PSourceAlgorithm ::= AlgorithmIdentifier {
            {PKCS1PSourceAlgorithms}
         }
        
         PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-pSpecified PARAMETERS EncodingParameters },
             ...  -- Allows for future expansion --
         }
        
         PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
             { OID id-pSpecified PARAMETERS EncodingParameters },
             ...  -- Allows for future expansion --
         }
        
         id-pSpecified    OBJECT IDENTIFIER ::= { pkcs-1 9 }
        
         id-pSpecified    OBJECT IDENTIFIER ::= { pkcs-1 9 }
        
         EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
        
         EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
        

The default label is an empty string (so that lHash will contain the hash of the empty string):

默认标签为空字符串(因此lHash将包含空字符串的哈希):

         pSpecifiedEmpty    PSourceAlgorithm ::= {
             algorithm   id-pSpecified,
             parameters  EncodingParameters : emptyString
         }
        
         pSpecifiedEmpty    PSourceAlgorithm ::= {
             algorithm   id-pSpecified,
             parameters  EncodingParameters : emptyString
         }
        
         emptyString    EncodingParameters ::= ''H
        
         emptyString    EncodingParameters ::= ''H
        

If all of the default values of the fields in RSAES-OAEP-params are used, then the algorithm identifier will have the following value:

如果使用了RSAES OAEP参数中字段的所有默认值,则算法标识符将具有以下值:

         rSAES-OAEP-Default-Identifier  RSAES-AlgorithmIdentifier ::= {
             algorithm   id-RSAES-OAEP,
             parameters  RSAES-OAEP-params : {
                 hashAlgorithm       sha1,
                 maskGenAlgorithm    mgf1SHA1,
                 pSourceAlgorithm    pSpecifiedEmpty
             }
         }
        
         rSAES-OAEP-Default-Identifier  RSAES-AlgorithmIdentifier ::= {
             algorithm   id-RSAES-OAEP,
             parameters  RSAES-OAEP-params : {
                 hashAlgorithm       sha1,
                 maskGenAlgorithm    mgf1SHA1,
                 pSourceAlgorithm    pSpecifiedEmpty
             }
         }
        
         RSAES-AlgorithmIdentifier ::= AlgorithmIdentifier {
            {PKCS1Algorithms}
         }
        
         RSAES-AlgorithmIdentifier ::= AlgorithmIdentifier {
            {PKCS1Algorithms}
         }
        
A.2.2 RSAES-PKCS1-v1_5
A.2.2 RSAES-PKCS1-v1_5

The object identifier rsaEncryption (see Appendix A.1) identifies the RSAES-PKCS1-v1_5 encryption scheme. The parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type NULL. This is the same as in PKCS #1 v1.5.

对象标识符RSAES加密(见附录A.1)标识RSAES-PKCS1-v1_5加密方案。AlgorithmIdentifier类型值中与此OID关联的参数字段的值应为NULL类型。这与PKCS#1 v1.5中的相同。

      rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        
      rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        
A.2.3 RSASSA-PSS
A.2.3 RSASSA-PSS

The object identifier id-RSASSA-PSS identifies the RSASSA-PSS encryption scheme.

对象标识符id RSASSA PSS标识RSASSA-PSS加密方案。

      id-RSASSA-PSS    OBJECT IDENTIFIER ::= { pkcs-1 10 }
        
      id-RSASSA-PSS    OBJECT IDENTIFIER ::= { pkcs-1 10 }
        

The parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type RSASSA-PSS-params:

AlgorithmIdentifier类型值中与此OID相关的参数字段应具有RSASSA PSS params类型值:

      RSASSA-PSS-params ::= SEQUENCE {
          hashAlgorithm      [0] HashAlgorithm    DEFAULT sha1,
          maskGenAlgorithm   [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
          saltLength         [2] INTEGER          DEFAULT 20,
          trailerField       [3] TrailerField     DEFAULT trailerFieldBC
      }
        
      RSASSA-PSS-params ::= SEQUENCE {
          hashAlgorithm      [0] HashAlgorithm    DEFAULT sha1,
          maskGenAlgorithm   [1] MaskGenAlgorithm DEFAULT mgf1SHA1,
          saltLength         [2] INTEGER          DEFAULT 20,
          trailerField       [3] TrailerField     DEFAULT trailerFieldBC
      }
        

The fields of type RSASSA-PSS-params have the following meanings:

RSASSA PSS params类型的字段具有以下含义:

* hashAlgorithm identifies the hash function. It shall be an algorithm ID with an OID in the set OAEP-PSSDigestAlgorithms (see Appendix A.2.1). The default hash function is SHA-1.

* 哈希算法识别哈希函数。它应该是一个算法ID,在集合OAEP算法中有一个OID(见附录A.2.1)。默认的散列函数是SHA-1。

* maskGenAlgorithm identifies the mask generation function. It shall be an algorithm ID with an OID in the set

* 掩码生成算法识别掩码生成函数。它应该是一个在集合中带有OID的算法ID

PKCS1MGFAlgorithms (see Appendix A.2.1). The default mask generation function is MGF1 with SHA-1. For MGF1 (and more generally, for other mask generation functions based on a hash function), it is recommended that the underlying hash function be the same as the one identified by hashAlgorithm; see Note 2 in Section 9.1 for further comments.

PKCS1MGF算法(见附录A.2.1)。默认的遮罩生成功能是MGF1和SHA-1。对于MGF1(更一般地,对于基于哈希函数的其他掩码生成函数),建议底层哈希函数与哈希算法识别的函数相同;更多意见见第9.1节中的注释2。

* saltLength is the octet length of the salt. It shall be an integer. For a given hashAlgorithm, the default value of saltLength is the octet length of the hash value. Unlike the other fields of type RSASSA-PSS-params, saltLength does not need to be fixed for a given RSA key pair.

* saltLength是盐的八位组长度。它应该是一个整数。对于给定的哈希算法,saltLength的默认值是哈希值的八位字节长度。与RSASSA PSS params类型的其他字段不同,对于给定的RSA密钥对,saltLength不需要固定。

* trailerField is the trailer field number, for compatibility with the draft IEEE P1363a [27]. It shall be 1 for this version of the document, which represents the trailer field with hexadecimal value 0xbc. Other trailer fields (including the trailer field HashID || 0xcc in IEEE P1363a) are not supported in this document.

* trailerField是拖车字段编号,用于与IEEE P1363a草案兼容[27]。该版本的文件应为1,代表十六进制值0xbc的拖车字段。本文档不支持其他拖车字段(包括IEEE P1363a中的拖车字段HashID | | 0xcc)。

         TrailerField ::= INTEGER { trailerFieldBC(1) }
        
         TrailerField ::= INTEGER { trailerFieldBC(1) }
        

If the default values of the hashAlgorithm, maskGenAlgorithm, and trailerField fields of RSASSA-PSS-params are used, then the algorithm identifier will have the following value:

如果使用RSASSA PSS参数的hashAlgorithm、MaskgEnableAlgorithm和trailerField字段的默认值,则算法标识符将具有以下值:

         rSASSA-PSS-Default-Identifier  RSASSA-AlgorithmIdentifier ::= {
             algorithm   id-RSASSA-PSS,
             parameters  RSASSA-PSS-params : {
                 hashAlgorithm       sha1,
                 maskGenAlgorithm    mgf1SHA1,
                 saltLength          20,
                 trailerField        trailerFieldBC
             }
         }
        
         rSASSA-PSS-Default-Identifier  RSASSA-AlgorithmIdentifier ::= {
             algorithm   id-RSASSA-PSS,
             parameters  RSASSA-PSS-params : {
                 hashAlgorithm       sha1,
                 maskGenAlgorithm    mgf1SHA1,
                 saltLength          20,
                 trailerField        trailerFieldBC
             }
         }
        
         RSASSA-AlgorithmIdentifier ::=
             AlgorithmIdentifier { {PKCS1Algorithms} }
        
         RSASSA-AlgorithmIdentifier ::=
             AlgorithmIdentifier { {PKCS1Algorithms} }
        

Note. In some applications, the hash function underlying a signature scheme is identified separately from the rest of the operations in the signature scheme. For instance, in PKCS #7 [45], a hash function identifier is placed before the message and a "digest encryption" algorithm identifier (indicating the rest of the operations) is carried with the signature. In order for PKCS #7 to support the RSASSA-PSS signature scheme, an object identifier would need to be defined for the operations in RSASSA-PSS after the hash function (analogous to the RSAEncryption OID for the RSASSA-PKCS1-v1_5 scheme). S/MIME CMS [25] takes a different approach. Although a hash function identifier is placed before the message, an algorithm identifier for the full signature scheme may be carried with a CMS signature (this is done for DSA signatures). Following this convention, the id-RSASSA-PSS OID can be used to identify RSASSA-PSS signatures in CMS. Since CMS is considered the successor to PKCS #7 and new developments such as the addition of support for RSASSA-PSS will be pursued with respect to CMS rather than PKCS #7, an OID for the "rest of" RSASSA-PSS is not defined in this version of PKCS #1.

笔记在某些应用程序中,签名方案下的哈希函数与签名方案中的其余操作分开标识。例如,在PKCS#7[45]中,哈希函数标识符放在消息之前,而“摘要加密”算法标识符(指示其余操作)与签名一起携带。为了使PKCS#7支持RSASSA-PSS签名方案,需要在哈希函数之后为RSASSA-PSS中的操作定义一个对象标识符(类似于RSASSA-PKCS1-v1#5方案的RSASSA加密OID)。S/MIME CMS[25]采用了不同的方法。尽管在消息之前放置了散列函数标识符,但是完整签名方案的算法标识符可以与CMS签名一起携带(这是针对DSA签名完成的)。按照此约定,id RSASSA PSS OID可用于识别CMS中的RSASSA-PSS签名。由于CMS被视为PKCS#7的继承者,并且将针对CMS而非PKCS#7寻求新的发展,如增加对RSASSA-PSS的支持,因此本版本的PKCS#1中未定义“剩余”RSASSA-PSS的OID。

A.2.4 RSASSA-PKCS1-v1_5
A.2.4 RSASSA-PKCS1-v1_5

The object identifier for RSASSA-PKCS1-v1_5 shall be one of the following. The choice of OID depends on the choice of hash algorithm: MD2, MD5, SHA-1, SHA-256, SHA-384, or SHA-512. Note that if either MD2 or MD5 is used, then the OID is just as in PKCS #1 v1.5. For each OID, the parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type NULL. The OID should be chosen in accordance with the following table:

RSASSA-PKCS1-v1_5的对象标识符应为以下之一。OID的选择取决于哈希算法的选择:MD2、MD5、SHA-1、SHA-256、SHA-384或SHA-512。请注意,如果使用MD2或MD5,则OID与PKCS#1 v1.5中的一样。对于每个OID,AlgorithmIdentifier类型值中与此OID关联的参数字段的值应为NULL类型。应根据下表选择OID:

      Hash algorithm   OID
      --------------------------------------------------------
      MD2              md2WithRSAEncryption    ::= {pkcs-1 2}
      MD5              md5WithRSAEncryption    ::= {pkcs-1 4}
      SHA-1            sha1WithRSAEncryption   ::= {pkcs-1 5}
      SHA-256          sha256WithRSAEncryption ::= {pkcs-1 11}
        
      Hash algorithm   OID
      --------------------------------------------------------
      MD2              md2WithRSAEncryption    ::= {pkcs-1 2}
      MD5              md5WithRSAEncryption    ::= {pkcs-1 4}
      SHA-1            sha1WithRSAEncryption   ::= {pkcs-1 5}
      SHA-256          sha256WithRSAEncryption ::= {pkcs-1 11}
        
      SHA-384          sha384WithRSAEncryption ::= {pkcs-1 12}
      SHA-512          sha512WithRSAEncryption ::= {pkcs-1 13}
        
      SHA-384          sha384WithRSAEncryption ::= {pkcs-1 12}
      SHA-512          sha512WithRSAEncryption ::= {pkcs-1 13}
        

The EMSA-PKCS1-v1_5 encoding method includes an ASN.1 value of type DigestInfo, where the type DigestInfo has the syntax

EMSA-PKCS1-v1_5编码方法包括类型为DigestInfo的ASN.1值,其中类型DigestInfo具有以下语法

      DigestInfo ::= SEQUENCE {
          digestAlgorithm DigestAlgorithm,
          digest OCTET STRING
      }
        
      DigestInfo ::= SEQUENCE {
          digestAlgorithm DigestAlgorithm,
          digest OCTET STRING
      }
        

digestAlgorithm identifies the hash function and shall be an algorithm ID with an OID in the set PKCS1-v1-5DigestAlgorithms. For a discussion of supported hash functions, see Appendix B.1.

digestAlgorithm标识散列函数,并应是一个算法ID,在PKCS1-v1-5DigestAlgorithms集合中具有OID。有关支持的哈希函数的讨论,请参见附录B.1。

      DigestAlgorithm ::=
          AlgorithmIdentifier { {PKCS1-v1-5DigestAlgorithms} }
        
      DigestAlgorithm ::=
          AlgorithmIdentifier { {PKCS1-v1-5DigestAlgorithms} }
        
      PKCS1-v1-5DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
          { OID id-md2 PARAMETERS NULL    }|
          { OID id-md5 PARAMETERS NULL    }|
          { OID id-sha1 PARAMETERS NULL   }|
          { OID id-sha256 PARAMETERS NULL }|
          { OID id-sha384 PARAMETERS NULL }|
          { OID id-sha512 PARAMETERS NULL }
      }
        
      PKCS1-v1-5DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
          { OID id-md2 PARAMETERS NULL    }|
          { OID id-md5 PARAMETERS NULL    }|
          { OID id-sha1 PARAMETERS NULL   }|
          { OID id-sha256 PARAMETERS NULL }|
          { OID id-sha384 PARAMETERS NULL }|
          { OID id-sha512 PARAMETERS NULL }
      }
        
Appendix B. Supporting techniques
附录B.支持技术

This section gives several examples of underlying functions supporting the encryption schemes in Section 7 and the encoding methods in Section 9. A range of techniques is given here to allow compatibility with existing applications as well as migration to new techniques. While these supporting techniques are appropriate for applications to implement, none of them is required to be implemented. It is expected that profiles for PKCS #1 v2.1 will be developed that specify particular supporting techniques.

本节给出了支持第7节中的加密方案和第9节中的编码方法的基础函数的几个示例。这里给出了一系列技术,以允许与现有应用程序兼容以及迁移到新技术。虽然这些支持技术适合于应用程序的实现,但它们都不需要实现。预计将为PKCS#1 v2.1开发特定支持技术的概要文件。

This section also gives object identifiers for the supporting techniques.

本节还提供了支持技术的对象标识符。

B.1 Hash functions
B.1散列函数

Hash functions are used in the operations contained in Sections 7 and 9. Hash functions are deterministic, meaning that the output is completely determined by the input. Hash functions take octet strings of variable length, and generate fixed length octet strings.

散列函数用于第7节和第9节中包含的操作。散列函数是确定性的,这意味着输出完全由输入决定。哈希函数获取可变长度的八位字符串,并生成固定长度的八位字符串。

The hash functions used in the operations contained in Sections 7 and 9 should generally be collision-resistant. This means that it is infeasible to find two distinct inputs to the hash function that produce the same output. A collision-resistant hash function also has the desirable property of being one-way; this means that given an output, it is infeasible to find an input whose hash is the specified output. In addition to the requirements, the hash function should yield a mask generation function (Appendix B.2) with pseudorandom output.

第7节和第9节中包含的操作中使用的哈希函数通常应该是抗冲突的。这意味着不可能找到产生相同输出的哈希函数的两个不同输入。抗冲突散列函数还具有单向的理想特性;这意味着给定一个输出,不可能找到散列为指定输出的输入。除要求外,散列函数还应产生具有伪随机输出的掩码生成函数(附录B.2)。

Six hash functions are given as examples for the encoding methods in this document: MD2 [33], MD5 [41], SHA-1 [38], and the proposed algorithms SHA-256, SHA-384, and SHA-512 [39]. For the RSAES-OAEP encryption scheme and EMSA-PSS encoding method, only SHA-1 and SHA-256/384/512 are recommended. For the EMSA-PKCS1-v1_5 encoding method, SHA-1 or SHA-256/384/512 are recommended for new applications. MD2 and MD5 are recommended only for compatibility with existing applications based on PKCS #1 v1.5.

本文中给出了六个哈希函数作为编码方法的示例:MD2[33]、MD5[41]、SHA-1[38]以及建议的算法SHA-256、SHA-384和SHA-512[39]。对于RSAES-OAEP加密方案和EMSA-PSS编码方法,建议仅使用SHA-1和SHA-256/384/512。对于EMSA-PKCS1-v1_5编码方法,建议新应用使用SHA-1或SHA-256/384/512。MD2和MD5仅建议与基于PKCS#1 v1.5的现有应用程序兼容。

The object identifiers id-md2, id-md5, id-sha1, id-sha256, id-sha384, and id-sha512, identify the respective hash functions:

对象标识符id-md2、id-md5、id-sha1、id-sha256、id-sha384和id-sha512标识各自的哈希函数:

      id-md2      OBJECT IDENTIFIER ::= {
          iso(1) member-body(2) us(840) rsadsi(113549)
          digestAlgorithm(2) 2
      }
        
      id-md2      OBJECT IDENTIFIER ::= {
          iso(1) member-body(2) us(840) rsadsi(113549)
          digestAlgorithm(2) 2
      }
        
      id-md5      OBJECT IDENTIFIER ::= {
          iso(1) member-body(2) us(840) rsadsi(113549)
          digestAlgorithm(2) 5
      }
        
      id-md5      OBJECT IDENTIFIER ::= {
          iso(1) member-body(2) us(840) rsadsi(113549)
          digestAlgorithm(2) 5
      }
        
      id-sha1    OBJECT IDENTIFIER ::= {
          iso(1) identified-organization(3) oiw(14) secsig(3)
          algorithms(2) 26
      }
        
      id-sha1    OBJECT IDENTIFIER ::= {
          iso(1) identified-organization(3) oiw(14) secsig(3)
          algorithms(2) 26
      }
        
      id-sha256    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1
      }
        
      id-sha256    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 1
      }
        
      id-sha384    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2
      }
        
      id-sha384    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 2
      }
        
      id-sha512    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3
      }
        
      id-sha512    OBJECT IDENTIFIER ::= {
          joint-iso-itu-t(2) country(16) us(840) organization(1)
          gov(101) csor(3) nistalgorithm(4) hashalgs(2) 3
      }
        

The parameters field associated with id-md2 and id-md5 in a value of type AlgorithmIdentifier shall have a value of type NULL.

AlgorithmIdentifier类型值中与id-md2和id-md5关联的参数字段的值应为NULL类型。

The parameters field associated with id-sha1, id-sha256, id-sha384, and id-sha512 should be omitted, but if present, shall have a value of type NULL.

应省略与id-sha1、id-sha256、id-sha384和id-sha512关联的参数字段,但如果存在,则应具有NULL类型的值。

Note. Version 1.5 of PKCS #1 also allowed for the use of MD4 in signature schemes. The cryptanalysis of MD4 has progressed significantly in the intervening years. For example, Dobbertin [18] demonstrated how to find collisions for MD4 and that the first two rounds of MD4 are not one-way [20]. Because of these results and others (e.g., [8]), MD4 is no longer recommended. There have also been advances in the cryptanalysis of MD2 and MD5, although not enough to warrant removal from existing applications. Rogier and Chauvaud [43] demonstrated how to find collisions in a modified version of MD2. No one has demonstrated how to find collisions for the full MD5 algorithm, although partial results have been found (e.g., [9][19]).

笔记PKCS#1的1.5版还允许在签名方案中使用MD4。在此期间,MD4的密码分析取得了重大进展。例如,Dobbertin[18]演示了如何找到MD4的碰撞,并且MD4的前两轮不是单向的[20]。由于这些结果和其他结果(例如[8]),MD4不再被推荐。MD2和MD5的密码分析也取得了进展,尽管还不足以保证从现有应用程序中删除。Rogier和Chauvaud[43]演示了如何在MD2的修改版本中找到碰撞。虽然已经找到了部分结果(例如[9][19]),但没有人演示如何为完整的MD5算法找到碰撞。

To address these concerns, SHA-1, SHA-256, SHA-384, or SHA-512 are recommended for new applications. As of today, the best (known) collision attacks against these hash functions are generic attacks with complexity 2^(L/2), where L is the bit length of the hash output. For the signature schemes in this document, a collision attack is easily translated into a signature forgery. Therefore, the value L / 2 should be at least equal to the desired security level in bits of the signature scheme (a security level of B bits means that the best attack has complexity 2^B). The same rule of thumb can be applied to RSAES-OAEP; it is recommended that the bit length of the seed (which is equal to the bit length of the hash output) be twice the desired security level in bits.

为了解决这些问题,建议将SHA-1、SHA-256、SHA-384或SHA-512用于新应用。到目前为止,针对这些哈希函数的最(已知)的冲突攻击是复杂度为2^(L/2)的一般攻击,其中L是哈希输出的位长度。对于本文中的签名方案,碰撞攻击很容易转化为签名伪造。因此,值L/2应至少等于签名方案的期望安全级别(B位的安全级别意味着最佳攻击的复杂性为2^B)。同样的经验法则也适用于RSAES-OAEP;建议种子的位长度(等于散列输出的位长度)是所需安全级别(以位为单位)的两倍。

B.2 Mask generation functions
B.2掩模生成功能

A mask generation function takes an octet string of variable length and a desired output length as input, and outputs an octet string of the desired length. There may be restrictions on the length of the input and output octet strings, but such bounds are generally very large. Mask generation functions are deterministic; the octet string output is completely determined by the input octet string. The output of a mask generation function should be pseudorandom: Given one part of the output but not the input, it should be infeasible to

掩码生成函数将可变长度的八位字节字符串和所需的输出长度作为输入,并输出所需长度的八位字节字符串。输入和输出八位字节字符串的长度可能有限制,但这种限制通常非常大。掩模生成函数是确定性的;八位字节字符串输出完全由输入八位字节字符串决定。掩码生成函数的输出应该是伪随机的:给定输出的一部分而不是输入,它应该不可行

predict another part of the output. The provable security of RSAES-OAEP and RSASSA-PSS relies on the random nature of the output of the mask generation function, which in turn relies on the random nature of the underlying hash.

预测输出的另一部分。RSAES-OAEP和RSASSA-PSS的可证明安全性依赖于掩码生成函数输出的随机性,而掩码生成函数的输出又依赖于底层散列的随机性。

One mask generation function is given here: MGF1, which is based on a hash function. MGF1 coincides with the mask generation functions defined in IEEE Std 1363-2000 [26] and the draft ANSI X9.44 [1]. Future versions of this document may define other mask generation functions.

这里给出了一个掩码生成函数:MGF1,它基于哈希函数。MGF1与IEEE标准1363-2000[26]和ANSI X9.44[1]草案中定义的掩码生成函数一致。本文档的未来版本可能会定义其他掩码生成功能。

B.2.1 MGF1
B.2.1 MGF1

MGF1 is a Mask Generation Function based on a hash function.

MGF1是基于哈希函数的掩码生成函数。

MGF1 (mgfSeed, maskLen)

MGF1(mgfSeed,maskLen)

Options: Hash hash function (hLen denotes the length in octets of the hash function output)

选项:哈希函数(hLen表示哈希函数输出的长度(以八位字节为单位)

Input: mgfSeed seed from which mask is generated, an octet string maskLen intended length in octets of the mask, at most 2^32 hLen

输入:生成掩码的mgfSeed种子,掩码的八位字节字符串掩码的预期长度(以掩码的八位字节为单位),最多2^32 hLen

Output: mask mask, an octet string of length maskLen

输出:mask mask,长度为maskLen的八位字节字符串

Error: "mask too long"

错误:“掩码太长”

Steps:

步骤:

1. If maskLen > 2^32 hLen, output "mask too long" and stop.

1. 如果遮罩>2^32 hLen,则输出“遮罩过长”并停止。

2. Let T be the empty octet string.

2. 设T为空的八位字节字符串。

3. For counter from 0 to \ceil (maskLen / hLen) - 1, do the following:

3. 对于从0到\ceil(maskLen/hLen)-1的计数器,请执行以下操作:

a. Convert counter to an octet string C of length 4 octets (see Section 4.1):

a. 将计数器转换为长度为4个八位字节的八位字节字符串C(见第4.1节):

C = I2OSP (counter, 4) .

C=I2OSP(计数器,4)。

b. Concatenate the hash of the seed mgfSeed and C to the octet string T:

b. 将种子mgfSeed和C的哈希连接到八位字节字符串T:

T = T || Hash(mgfSeed || C) .

T=T | | Hash(mgfSeed | | C)。

4. Output the leading maskLen octets of T as the octet string mask.

4. 输出T的前导掩码八位字节作为八位字节字符串掩码。

The object identifier id-mgf1 identifies the MGF1 mask generation function:

对象标识符id-mgf1标识mgf1掩码生成函数:

   id-mgf1    OBJECT IDENTIFIER ::= { pkcs-1 8 }
        
   id-mgf1    OBJECT IDENTIFIER ::= { pkcs-1 8 }
        

The parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value of type hashAlgorithm, identifying the hash function on which MGF1 is based.

值类型AlgorithmIdentifier中与此OID关联的参数字段应具有hashAlgorithm类型的值,用于标识MGF1所基于的哈希函数。

Appendix C. ASN.1 module
附录C.ASN.1模块
PKCS-1 {
    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1)
    modules(0) pkcs-1(1)
}
        
PKCS-1 {
    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-1(1)
    modules(0) pkcs-1(1)
}
        

-- $ Revision: 2.1r1 $

--$Revision:2.1r1$

-- This module has been checked for conformance with the ASN.1
-- standard by the OSS ASN.1 Tools
        
-- This module has been checked for conformance with the ASN.1
-- standard by the OSS ASN.1 Tools
        
DEFINITIONS EXPLICIT TAGS ::=
        
DEFINITIONS EXPLICIT TAGS ::=
        

BEGIN

开始

-- EXPORTS ALL
-- All types and values defined in this module are exported for use
-- in other ASN.1 modules.
        
-- EXPORTS ALL
-- All types and values defined in this module are exported for use
-- in other ASN.1 modules.
        

IMPORTS

进口

id-sha256, id-sha384, id-sha512
    FROM NIST-SHA2 {
        joint-iso-itu-t(2) country(16) us(840) organization(1)
        gov(101) csor(3) nistalgorithm(4) modules(0) sha2(1)
    };
        
id-sha256, id-sha384, id-sha512
    FROM NIST-SHA2 {
        joint-iso-itu-t(2) country(16) us(840) organization(1)
        gov(101) csor(3) nistalgorithm(4) modules(0) sha2(1)
    };
        
-- ============================
--   Basic object identifiers
-- ============================
        
-- ============================
--   Basic object identifiers
-- ============================
        
-- The DER encoding of this in hexadecimal is:
-- (0x)06 08
--        2A 86 48 86 F7 0D 01 01
--
pkcs-1    OBJECT IDENTIFIER ::= {
        
-- The DER encoding of this in hexadecimal is:
-- (0x)06 08
--        2A 86 48 86 F7 0D 01 01
--
pkcs-1    OBJECT IDENTIFIER ::= {
        
    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
}
        
    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1
}
        
--
-- When rsaEncryption is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
--
rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        
--
-- When rsaEncryption is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
--
rsaEncryption    OBJECT IDENTIFIER ::= { pkcs-1 1 }
        
--
-- When id-RSAES-OAEP is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be RSAES-OAEP-params.
--
id-RSAES-OAEP    OBJECT IDENTIFIER ::= { pkcs-1 7 }
        
--
-- When id-RSAES-OAEP is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be RSAES-OAEP-params.
--
id-RSAES-OAEP    OBJECT IDENTIFIER ::= { pkcs-1 7 }
        
--
-- When id-pSpecified is used in an AlgorithmIdentifier the
-- parameters MUST be an OCTET STRING.
--
id-pSpecified    OBJECT IDENTIFIER ::= { pkcs-1 9 }
        
--
-- When id-pSpecified is used in an AlgorithmIdentifier the
-- parameters MUST be an OCTET STRING.
--
id-pSpecified    OBJECT IDENTIFIER ::= { pkcs-1 9 }
        
-- When id-RSASSA-PSS is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be RSASSA-PSS-params.
--
id-RSASSA-PSS    OBJECT IDENTIFIER ::= { pkcs-1 10 }
        
-- When id-RSASSA-PSS is used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be RSASSA-PSS-params.
--
id-RSASSA-PSS    OBJECT IDENTIFIER ::= { pkcs-1 10 }
        
--
-- When the following OIDs are used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
--
md2WithRSAEncryption       OBJECT IDENTIFIER ::= { pkcs-1 2 }
md5WithRSAEncryption       OBJECT IDENTIFIER ::= { pkcs-1 4 }
sha1WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 5 }
sha256WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 11 }
sha384WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 12 }
sha512WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 13 }
        
--
-- When the following OIDs are used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
--
md2WithRSAEncryption       OBJECT IDENTIFIER ::= { pkcs-1 2 }
md5WithRSAEncryption       OBJECT IDENTIFIER ::= { pkcs-1 4 }
sha1WithRSAEncryption      OBJECT IDENTIFIER ::= { pkcs-1 5 }
sha256WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 11 }
sha384WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 12 }
sha512WithRSAEncryption    OBJECT IDENTIFIER ::= { pkcs-1 13 }
        
--
-- This OID really belongs in a module with the secsig OIDs.
--
id-sha1    OBJECT IDENTIFIER ::= {
    iso(1) identified-organization(3) oiw(14) secsig(3)
    algorithms(2) 26
}
        
--
-- This OID really belongs in a module with the secsig OIDs.
--
id-sha1    OBJECT IDENTIFIER ::= {
    iso(1) identified-organization(3) oiw(14) secsig(3)
    algorithms(2) 26
}
        

-- -- OIDs for MD2 and MD5, allowed only in EMSA-PKCS1-v1_5. --

----MD2和MD5的OID,仅在EMSA-PKCS1-v1_5中允许--

id-md2 OBJECT IDENTIFIER ::= {
    iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2
}
        
id-md2 OBJECT IDENTIFIER ::= {
    iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2
}
        
id-md5 OBJECT IDENTIFIER ::= {
    iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5
}
        
id-md5 OBJECT IDENTIFIER ::= {
    iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5
}
        
--
-- When id-mgf1 is used in an AlgorithmIdentifier the parameters MUST
-- be present and MUST be a HashAlgorithm, for example sha1.
--
id-mgf1    OBJECT IDENTIFIER ::= { pkcs-1 8 }
        
--
-- When id-mgf1 is used in an AlgorithmIdentifier the parameters MUST
-- be present and MUST be a HashAlgorithm, for example sha1.
--
id-mgf1    OBJECT IDENTIFIER ::= { pkcs-1 8 }
        
-- ================
--   Useful types
-- ================
        
-- ================
--   Useful types
-- ================
        
ALGORITHM-IDENTIFIER ::= CLASS {
    &id    OBJECT IDENTIFIER  UNIQUE,
    &Type  OPTIONAL
}
    WITH SYNTAX { OID &id [PARAMETERS &Type] }
        
ALGORITHM-IDENTIFIER ::= CLASS {
    &id    OBJECT IDENTIFIER  UNIQUE,
    &Type  OPTIONAL
}
    WITH SYNTAX { OID &id [PARAMETERS &Type] }
        
--
-- Note: the parameter InfoObjectSet in the following definitions
-- allows a distinct information object set to be specified for sets
-- of algorithms such as:
-- DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
--     { OID id-md2  PARAMETERS NULL }|
--     { OID id-md5  PARAMETERS NULL }|
--     { OID id-sha1 PARAMETERS NULL }
-- }
--
        
--
-- Note: the parameter InfoObjectSet in the following definitions
-- allows a distinct information object set to be specified for sets
-- of algorithms such as:
-- DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
--     { OID id-md2  PARAMETERS NULL }|
--     { OID id-md5  PARAMETERS NULL }|
--     { OID id-sha1 PARAMETERS NULL }
-- }
--
        
AlgorithmIdentifier { ALGORITHM-IDENTIFIER:InfoObjectSet } ::=
SEQUENCE {
    algorithm  ALGORITHM-IDENTIFIER.&id({InfoObjectSet}),
    parameters
        ALGORITHM-IDENTIFIER.&Type({InfoObjectSet}{@.algorithm})
            OPTIONAL
}
        
AlgorithmIdentifier { ALGORITHM-IDENTIFIER:InfoObjectSet } ::=
SEQUENCE {
    algorithm  ALGORITHM-IDENTIFIER.&id({InfoObjectSet}),
    parameters
        ALGORITHM-IDENTIFIER.&Type({InfoObjectSet}{@.algorithm})
            OPTIONAL
}
        
-- ==============
--   Algorithms
-- ==============
        
-- ==============
--   Algorithms
-- ==============
        

--

--

-- Allowed EME-OAEP and EMSA-PSS digest algorithms.
--
OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-sha1 PARAMETERS NULL   }|
    { OID id-sha256 PARAMETERS NULL }|
    { OID id-sha384 PARAMETERS NULL }|
    { OID id-sha512 PARAMETERS NULL },
    ...  -- Allows for future expansion --
}
        
-- Allowed EME-OAEP and EMSA-PSS digest algorithms.
--
OAEP-PSSDigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-sha1 PARAMETERS NULL   }|
    { OID id-sha256 PARAMETERS NULL }|
    { OID id-sha384 PARAMETERS NULL }|
    { OID id-sha512 PARAMETERS NULL },
    ...  -- Allows for future expansion --
}
        
--
-- Allowed EMSA-PKCS1-v1_5 digest algorithms.
--
PKCS1-v1-5DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-md2 PARAMETERS NULL    }|
    { OID id-md5 PARAMETERS NULL    }|
    { OID id-sha1 PARAMETERS NULL   }|
    { OID id-sha256 PARAMETERS NULL }|
    { OID id-sha384 PARAMETERS NULL }|
    { OID id-sha512 PARAMETERS NULL }
}
        
--
-- Allowed EMSA-PKCS1-v1_5 digest algorithms.
--
PKCS1-v1-5DigestAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-md2 PARAMETERS NULL    }|
    { OID id-md5 PARAMETERS NULL    }|
    { OID id-sha1 PARAMETERS NULL   }|
    { OID id-sha256 PARAMETERS NULL }|
    { OID id-sha384 PARAMETERS NULL }|
    { OID id-sha512 PARAMETERS NULL }
}
        
-- When id-md2 and id-md5 are used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
        
-- When id-md2 and id-md5 are used in an AlgorithmIdentifier the
-- parameters MUST be present and MUST be NULL.
        
-- When id-sha1, id-sha256, id-sha384 and id-sha512 are used in an
-- AlgorithmIdentifier the parameters (which are optional) SHOULD
-- be omitted. However, an implementation MUST also accept
-- AlgorithmIdentifier values where the parameters are NULL.
        
-- When id-sha1, id-sha256, id-sha384 and id-sha512 are used in an
-- AlgorithmIdentifier the parameters (which are optional) SHOULD
-- be omitted. However, an implementation MUST also accept
-- AlgorithmIdentifier values where the parameters are NULL.
        
sha1    HashAlgorithm ::= {
    algorithm   id-sha1,
    parameters  SHA1Parameters : NULL  -- included for compatibility
                                       -- with existing implementations
}
        
sha1    HashAlgorithm ::= {
    algorithm   id-sha1,
    parameters  SHA1Parameters : NULL  -- included for compatibility
                                       -- with existing implementations
}
        
HashAlgorithm ::= AlgorithmIdentifier { {OAEP-PSSDigestAlgorithms} }
        
HashAlgorithm ::= AlgorithmIdentifier { {OAEP-PSSDigestAlgorithms} }
        
SHA1Parameters ::= NULL
        
SHA1Parameters ::= NULL
        
--
-- Allowed mask generation function algorithms.
-- If the identifier is id-mgf1, the parameters are a HashAlgorithm.
--
PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-mgf1 PARAMETERS HashAlgorithm },
    ...  -- Allows for future expansion --
}
        
--
-- Allowed mask generation function algorithms.
-- If the identifier is id-mgf1, the parameters are a HashAlgorithm.
--
PKCS1MGFAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-mgf1 PARAMETERS HashAlgorithm },
    ...  -- Allows for future expansion --
}
        
--
-- Default AlgorithmIdentifier for id-RSAES-OAEP.maskGenAlgorithm and
-- id-RSASSA-PSS.maskGenAlgorithm.
--
mgf1SHA1    MaskGenAlgorithm ::= {
    algorithm   id-mgf1,
    parameters  HashAlgorithm : sha1
}
        
--
-- Default AlgorithmIdentifier for id-RSAES-OAEP.maskGenAlgorithm and
-- id-RSASSA-PSS.maskGenAlgorithm.
--
mgf1SHA1    MaskGenAlgorithm ::= {
    algorithm   id-mgf1,
    parameters  HashAlgorithm : sha1
}
        
MaskGenAlgorithm ::= AlgorithmIdentifier { {PKCS1MGFAlgorithms} }
        
MaskGenAlgorithm ::= AlgorithmIdentifier { {PKCS1MGFAlgorithms} }
        
--
-- Allowed algorithms for pSourceAlgorithm.
--
PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-pSpecified PARAMETERS EncodingParameters },
    ...  -- Allows for future expansion --
}
        
--
-- Allowed algorithms for pSourceAlgorithm.
--
PKCS1PSourceAlgorithms    ALGORITHM-IDENTIFIER ::= {
    { OID id-pSpecified PARAMETERS EncodingParameters },
    ...  -- Allows for future expansion --
}
        
EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
        
EncodingParameters ::= OCTET STRING(SIZE(0..MAX))
        
--
-- This identifier means that the label L is an empty string, so the
-- digest of the empty string appears in the RSA block before
-- masking.
--
pSpecifiedEmpty    PSourceAlgorithm ::= {
    algorithm   id-pSpecified,
    parameters  EncodingParameters : emptyString
}
        
--
-- This identifier means that the label L is an empty string, so the
-- digest of the empty string appears in the RSA block before
-- masking.
--
pSpecifiedEmpty    PSourceAlgorithm ::= {
    algorithm   id-pSpecified,
    parameters  EncodingParameters : emptyString
}
        
PSourceAlgorithm ::= AlgorithmIdentifier { {PKCS1PSourceAlgorithms} }
        
PSourceAlgorithm ::= AlgorithmIdentifier { {PKCS1PSourceAlgorithms} }
        
emptyString    EncodingParameters ::= ''H
        
emptyString    EncodingParameters ::= ''H
        
--
-- Type identifier definitions for the PKCS #1 OIDs.
--
PKCS1Algorithms    ALGORITHM-IDENTIFIER ::= {
    { OID rsaEncryption              PARAMETERS NULL } |
    { OID md2WithRSAEncryption       PARAMETERS NULL } |
    { OID md5WithRSAEncryption       PARAMETERS NULL } |
    { OID sha1WithRSAEncryption      PARAMETERS NULL } |
    { OID sha256WithRSAEncryption    PARAMETERS NULL } |
    { OID sha384WithRSAEncryption    PARAMETERS NULL } |
    { OID sha512WithRSAEncryption    PARAMETERS NULL } |
    { OID id-RSAES-OAEP PARAMETERS RSAES-OAEP-params } |
    PKCS1PSourceAlgorithms                             |
        
--
-- Type identifier definitions for the PKCS #1 OIDs.
--
PKCS1Algorithms    ALGORITHM-IDENTIFIER ::= {
    { OID rsaEncryption              PARAMETERS NULL } |
    { OID md2WithRSAEncryption       PARAMETERS NULL } |
    { OID md5WithRSAEncryption       PARAMETERS NULL } |
    { OID sha1WithRSAEncryption      PARAMETERS NULL } |
    { OID sha256WithRSAEncryption    PARAMETERS NULL } |
    { OID sha384WithRSAEncryption    PARAMETERS NULL } |
    { OID sha512WithRSAEncryption    PARAMETERS NULL } |
    { OID id-RSAES-OAEP PARAMETERS RSAES-OAEP-params } |
    PKCS1PSourceAlgorithms                             |
        
    { OID id-RSASSA-PSS PARAMETERS RSASSA-PSS-params } ,
    ...  -- Allows for future expansion --
}
        
    { OID id-RSASSA-PSS PARAMETERS RSASSA-PSS-params } ,
    ...  -- Allows for future expansion --
}
        
-- ===================
--   Main structures
-- ===================
        
-- ===================
--   Main structures
-- ===================
        
RSAPublicKey ::= SEQUENCE {
    modulus           INTEGER,  -- n
    publicExponent    INTEGER   -- e
}
        
RSAPublicKey ::= SEQUENCE {
    modulus           INTEGER,  -- n
    publicExponent    INTEGER   -- e
}
        
--
-- Representation of RSA private key with information for the CRT
-- algorithm.
--
RSAPrivateKey ::= SEQUENCE {
    version           Version,
    modulus           INTEGER,  -- n
    publicExponent    INTEGER,  -- e
    privateExponent   INTEGER,  -- d
    prime1            INTEGER,  -- p
    prime2            INTEGER,  -- q
    exponent1         INTEGER,  -- d mod (p-1)
    exponent2         INTEGER,  -- d mod (q-1)
    coefficient       INTEGER,  -- (inverse of q) mod p
    otherPrimeInfos   OtherPrimeInfos OPTIONAL
}
        
--
-- Representation of RSA private key with information for the CRT
-- algorithm.
--
RSAPrivateKey ::= SEQUENCE {
    version           Version,
    modulus           INTEGER,  -- n
    publicExponent    INTEGER,  -- e
    privateExponent   INTEGER,  -- d
    prime1            INTEGER,  -- p
    prime2            INTEGER,  -- q
    exponent1         INTEGER,  -- d mod (p-1)
    exponent2         INTEGER,  -- d mod (q-1)
    coefficient       INTEGER,  -- (inverse of q) mod p
    otherPrimeInfos   OtherPrimeInfos OPTIONAL
}
        
Version ::= INTEGER { two-prime(0), multi(1) }
    (CONSTRAINED BY {
        -- version must be multi if otherPrimeInfos present --
    })
        
Version ::= INTEGER { two-prime(0), multi(1) }
    (CONSTRAINED BY {
        -- version must be multi if otherPrimeInfos present --
    })
        
OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
        
OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo
        
OtherPrimeInfo ::= SEQUENCE {
    prime             INTEGER,  -- ri
    exponent          INTEGER,  -- di
    coefficient       INTEGER   -- ti
}
        
OtherPrimeInfo ::= SEQUENCE {
    prime             INTEGER,  -- ri
    exponent          INTEGER,  -- di
    coefficient       INTEGER   -- ti
}
        
--
-- AlgorithmIdentifier.parameters for id-RSAES-OAEP.
-- Note that the tags in this Sequence are explicit.
--
RSAES-OAEP-params ::= SEQUENCE {
        
--
-- AlgorithmIdentifier.parameters for id-RSAES-OAEP.
-- Note that the tags in this Sequence are explicit.
--
RSAES-OAEP-params ::= SEQUENCE {
        

hashAlgorithm [0] HashAlgorithm DEFAULT sha1, maskGenAlgorithm [1] MaskGenAlgorithm DEFAULT mgf1SHA1, pSourceAlgorithm [2] PSourceAlgorithm DEFAULT pSpecifiedEmpty }

hashAlgorithm[0]hashAlgorithm DEFAULT sha1,maskGenAlgorithm[1]maskGenAlgorithm DEFAULT mgf1SHA1,pSourceAlgorithm[2]pSourceAlgorithm DEFAULT pSpecifiedEmpty}

--
-- Identifier for default RSAES-OAEP algorithm identifier.
-- The DER Encoding of this is in hexadecimal:
-- (0x)30 0D
--        06 09
--           2A 86 48 86 F7 0D 01 01 07
--        30 00
-- Notice that the DER encoding of default values is "empty".
--
        
--
-- Identifier for default RSAES-OAEP algorithm identifier.
-- The DER Encoding of this is in hexadecimal:
-- (0x)30 0D
--        06 09
--           2A 86 48 86 F7 0D 01 01 07
--        30 00
-- Notice that the DER encoding of default values is "empty".
--
        
rSAES-OAEP-Default-Identifier    RSAES-AlgorithmIdentifier ::= {
    algorithm   id-RSAES-OAEP,
    parameters  RSAES-OAEP-params : {
        hashAlgorithm       sha1,
        maskGenAlgorithm    mgf1SHA1,
        pSourceAlgorithm    pSpecifiedEmpty
    }
}
        
rSAES-OAEP-Default-Identifier    RSAES-AlgorithmIdentifier ::= {
    algorithm   id-RSAES-OAEP,
    parameters  RSAES-OAEP-params : {
        hashAlgorithm       sha1,
        maskGenAlgorithm    mgf1SHA1,
        pSourceAlgorithm    pSpecifiedEmpty
    }
}
        
RSAES-AlgorithmIdentifier ::=
    AlgorithmIdentifier { {PKCS1Algorithms} }
        
RSAES-AlgorithmIdentifier ::=
    AlgorithmIdentifier { {PKCS1Algorithms} }
        
--
-- AlgorithmIdentifier.parameters for id-RSASSA-PSS.
-- Note that the tags in this Sequence are explicit.
--
RSASSA-PSS-params ::= SEQUENCE {
    hashAlgorithm      [0] HashAlgorithm      DEFAULT sha1,
    maskGenAlgorithm   [1] MaskGenAlgorithm   DEFAULT mgf1SHA1,
    saltLength         [2] INTEGER            DEFAULT 20,
    trailerField       [3] TrailerField       DEFAULT trailerFieldBC
}
        
--
-- AlgorithmIdentifier.parameters for id-RSASSA-PSS.
-- Note that the tags in this Sequence are explicit.
--
RSASSA-PSS-params ::= SEQUENCE {
    hashAlgorithm      [0] HashAlgorithm      DEFAULT sha1,
    maskGenAlgorithm   [1] MaskGenAlgorithm   DEFAULT mgf1SHA1,
    saltLength         [2] INTEGER            DEFAULT 20,
    trailerField       [3] TrailerField       DEFAULT trailerFieldBC
}
        
TrailerField ::= INTEGER { trailerFieldBC(1) }
        
TrailerField ::= INTEGER { trailerFieldBC(1) }
        
--
-- Identifier for default RSASSA-PSS algorithm identifier
-- The DER Encoding of this is in hexadecimal:
-- (0x)30 0D
--        06 09
--           2A 86 48 86 F7 0D 01 01 0A
--        30 00
-- Notice that the DER encoding of default values is "empty".
        
--
-- Identifier for default RSASSA-PSS algorithm identifier
-- The DER Encoding of this is in hexadecimal:
-- (0x)30 0D
--        06 09
--           2A 86 48 86 F7 0D 01 01 0A
--        30 00
-- Notice that the DER encoding of default values is "empty".
        
--
rSASSA-PSS-Default-Identifier    RSASSA-AlgorithmIdentifier ::= {
    algorithm   id-RSASSA-PSS,
    parameters  RSASSA-PSS-params : {
        hashAlgorithm       sha1,
        maskGenAlgorithm    mgf1SHA1,
        saltLength          20,
        trailerField        trailerFieldBC
    }
}
        
--
rSASSA-PSS-Default-Identifier    RSASSA-AlgorithmIdentifier ::= {
    algorithm   id-RSASSA-PSS,
    parameters  RSASSA-PSS-params : {
        hashAlgorithm       sha1,
        maskGenAlgorithm    mgf1SHA1,
        saltLength          20,
        trailerField        trailerFieldBC
    }
}
        
RSASSA-AlgorithmIdentifier ::=
    AlgorithmIdentifier { {PKCS1Algorithms} }
        
RSASSA-AlgorithmIdentifier ::=
    AlgorithmIdentifier { {PKCS1Algorithms} }
        
--
-- Syntax for the EMSA-PKCS1-v1_5 hash identifier.
--
DigestInfo ::= SEQUENCE {
    digestAlgorithm DigestAlgorithm,
    digest OCTET STRING
}
        
--
-- Syntax for the EMSA-PKCS1-v1_5 hash identifier.
--
DigestInfo ::= SEQUENCE {
    digestAlgorithm DigestAlgorithm,
    digest OCTET STRING
}
        
DigestAlgorithm ::=
    AlgorithmIdentifier { {PKCS1-v1-5DigestAlgorithms} }
        
DigestAlgorithm ::=
    AlgorithmIdentifier { {PKCS1-v1-5DigestAlgorithms} }
        

END -- PKCS1Definitions

结束—PKCS1定义

Appendix D. Intellectual Property Considerations
附录D.知识产权方面的考虑

The RSA public-key cryptosystem is described in U.S. Patent 4,405,829, which expired on September 20, 2000. RSA Security Inc. makes no other patent claims on the constructions described in this document, although specific underlying techniques may be covered.

RSA公钥密码系统在2000年9月20日到期的美国专利4405829中有描述。RSA Security Inc.对本文档中描述的构造不提出任何其他专利要求,尽管可能涉及特定的底层技术。

Multi-prime RSA is described in U.S. Patent 5,848,159.

美国专利5848159中描述了多素数RSA。

The University of California has indicated that it has a patent pending on the PSS signature scheme [5]. It has also provided a letter to the IEEE P1363 working group stating that if the PSS signature scheme is included in an IEEE standard, "the University of California will, when that standard is adopted, FREELY license any conforming implementation of PSS as a technique for achieving a digital signature with appendix" [23]. The PSS signature scheme is specified in the IEEE P1363a draft [27], which was in ballot resolution when this document was published.

加利福尼亚大学已经表明,它在PSS签名方案上有专利申请[5 ]。它还向IEEE P1363工作组提供了一封信,说明如果PSS签名方案包含在IEEE标准中,“加利福尼亚大学将在采用该标准时,自由许可任何符合PSS的实现,作为附录实现数字签名的技术”〔23〕。PSS签名方案在IEEE P1363a草案[27]中有详细说明,该草案在本文件发布时以投票方式进行。

License to copy this document is granted provided that it is identified as "RSA Security Inc. Public-Key Cryptography Standards (PKCS)" in all material mentioning or referencing this document.

如果在提及或引用本文档的所有材料中,本文档被标识为“RSA Security Inc.公钥加密标准(PKCS)”,则授予复制本文档的许可证。

RSA Security Inc. makes no other representations regarding intellectual property claims by other parties. Such determination is the responsibility of the user.

RSA Security Inc.未就其他方的知识产权索赔作出任何其他陈述。此类确定由用户负责。

Appendix E. Revision history
附录E.修订历史

Versions 1.0 - 1.3

版本1.0-1.3

Versions 1.0 - 1.3 were distributed to participants in RSA Data Security, Inc.'s Public-Key Cryptography Standards meetings in February and March 1991.

1991年2月和3月,向RSA Data Security,Inc.公钥加密标准会议的与会者分发了版本1.0-1.3。

Version 1.4

版本1.4

Version 1.4 was part of the June 3, 1991 initial public release of PKCS. Version 1.4 was published as NIST/OSI Implementors' Workshop document SEC-SIG-91-18.

版本1.4是1991年6月3日PKCS首次公开发布的一部分。版本1.4发布为NIST/OSI实施者研讨会文件SEC-SIG-91-18。

Version 1.5

版本1.5

Version 1.5 incorporated several editorial changes, including updates to the references and the addition of a revision history. The following substantive changes were made:

版本1.5包含了一些编辑性修改,包括对参考文件的更新和添加修订历史记录。作出了以下实质性修改:

- Section 10: "MD4 with RSA" signature and verification processes were added. - Section 11: md4WithRSAEncryption object identifier was added.

- 第10节:增加了“带RSA的MD4”签名和验证流程。-第11节:添加了MD4WithRSA加密对象标识符。

Version 1.5 was republished as IETF RFC 2313.

版本1.5作为IETF RFC 2313重新发布。

Version 2.0

版本2.0

Version 2.0 incorporated major editorial changes in terms of the document structure and introduced the RSAES-OAEP encryption scheme. This version continued to support the encryption and signature processes in version 1.5, although the hash algorithm MD4 was no longer allowed due to cryptanalytic advances in the intervening years. Version 2.0 was republished as IETF RFC 2437 [35].

版本2.0包含了文档结构方面的主要编辑更改,并引入了RSAES-OAEP加密方案。该版本继续支持版本1.5中的加密和签名过程,尽管由于其间几年密码分析的进步,哈希算法MD4不再被允许。版本2.0作为IETF RFC 2437[35]重新发布。

Version 2.1

版本2.1

Version 2.1 introduces multi-prime RSA and the RSASSA-PSS signature scheme with appendix along with several editorial improvements. This version continues to support the schemes in version 2.0.

版本2.1引入了多素数RSA和带有附录的RSASSA-PSS签名方案以及一些编辑改进。此版本继续支持版本2.0中的方案。

Appendix F: References

附录F:参考文献

[1] ANSI X9F1 Working Group. ANSI X9.44 Draft D2: Key Establishment Using Integer Factorization Cryptography. Working Draft, March 2002.

[1] ANSI X9F1工作组。ANSI X9.44 D2草案:使用整数因子分解加密技术建立密钥。工作草案,2002年3月。

[2] M. Bellare, A. Desai, D. Pointcheval and P. Rogaway. Relations Among Notions of Security for Public-Key Encryption Schemes. In H. Krawczyk, editor, Advances in Cryptology - Crypto '98, volume 1462 of Lecture Notes in Computer Science, pp. 26 - 45. Springer Verlag, 1998.

[2] 贝拉尔先生、德赛先生、波因切瓦尔先生和罗格威先生。公钥加密方案的安全概念之间的关系。H.Krawczyk主编,《密码学的进展——98年加密》,计算机科学课堂讲稿第1462卷,第26-45页。斯普林格·维拉格,1998年。

[3] M. Bellare and P. Rogaway. Optimal Asymmetric Encryption - How to Encrypt with RSA. In A. De Santis, editor, Advances in Cryptology - Eurocrypt '94, volume 950 of Lecture Notes in Computer Science, pp. 92 - 111. Springer Verlag, 1995.

[3] 贝拉尔先生和罗格威先生。最佳非对称加密-如何使用RSA加密。在A.De Santis主编的《密码学的进展——欧洲密码’94》,计算机科学课堂讲稿第950卷,第92-111页。斯普林格·维拉格,1995年。

[4] M. Bellare and P. Rogaway. The Exact Security of Digital Signatures - How to Sign with RSA and Rabin. In U. Maurer, editor, Advances in Cryptology - Eurocrypt '96, volume 1070 of Lecture Notes in Computer Science, pp. 399 - 416. Springer Verlag, 1996.

[4] 贝拉尔先生和罗格威先生。数字签名的精确安全性-如何使用RSA和Rabin签名。在U.Maurer,编辑,《密码学的进展——1996年欧洲密码》,计算机科学课堂讲稿第1070卷,第399-416页。斯普林格·维拉格,1996年。

[5] M. Bellare and P. Rogaway. PSS: Provably Secure Encoding Method for Digital Signatures. Submission to IEEE P1363 working group, August 1998. Available from http://grouper.ieee.org/groups/1363/.

[5] 贝拉尔先生和罗格威先生。PSS:可证明安全的数字签名编码方法。提交给IEEE P1363工作组,1998年8月。可从http://grouper.ieee.org/groups/1363/.

[6] D. Bleichenbacher. Chosen Ciphertext Attacks Against Protocols Based on the RSA Encryption Standard PKCS #1. In H. Krawczyk, editor, Advances in Cryptology - Crypto '98, volume 1462 of Lecture Notes in Computer Science, pp. 1 - 12. Springer Verlag, 1998.

[6] D.布莱肯巴赫。针对基于RSA加密标准PKCS#1的协议的选择性密文攻击。在H.Krawczyk主编的《密码学的进展——98年密码学》,计算机科学课堂讲稿第1462卷,第1-12页。斯普林格·维拉格,1998年。

[7] D. Bleichenbacher, B. Kaliski and J. Staddon. Recent Results on PKCS #1: RSA Encryption Standard. RSA Laboratories' Bulletin No. 7, June 1998.

[7] B.卡利斯基和J.斯塔顿。PKCS#1:RSA加密标准的最新结果。RSA实验室第7号公告,1998年6月。

[8] B. den Boer and A. Bosselaers. An Attack on the Last Two Rounds of MD4. In J. Feigenbaum, editor, Advances in Cryptology - Crypto '91, volume 576 of Lecture Notes in Computer Science, pp. 194 - 203. Springer Verlag, 1992.

[8] B.登布尔和A.博塞莱尔。对MD4最后两轮的攻击。作者J.Feigenbaum,《密码学的进展——加密91》,计算机科学课堂讲稿第576卷,第194-203页。斯普林格·维拉格,1992年。

[9] B. den Boer and A. Bosselaers. Collisions for the Compression Function of MD5. In T. Helleseth, editor, Advances in Cryptology - Eurocrypt '93, volume 765 of Lecture Notes in Computer Science, pp. 293 - 304. Springer Verlag, 1994.

[9] B.登布尔和A.博塞莱尔。MD5压缩功能的冲突。在T.Helleseth,编辑,《密码学的进展-欧洲密码'93》,计算机科学课堂讲稿第765卷,第293-304页。斯普林格·维拉格,1994年。

[10] D. Coppersmith, M. Franklin, J. Patarin and M. Reiter. Low-Exponent RSA with Related Messages. In U. Maurer, editor, Advances in Cryptology - Eurocrypt '96, volume 1070 of Lecture Notes in Computer Science, pp. 1 - 9. Springer Verlag, 1996.

[10] D.铜匠、M.富兰克林、J.帕塔林和M.雷特。具有相关消息的低指数RSA。在U.Maurer,编辑,《密码学的进展——1996年欧洲密码》,计算机科学课堂讲稿第1070卷,第1-9页。斯普林格·维拉格,1996年。

[11] D. Coppersmith, S. Halevi and C. Jutla. ISO 9796-1 and the New Forgery Strategy. Presented at the rump session of Crypto '99, August 1999.

[11] D.铜匠、S.Halevi和C.Jutla。ISO 9796-1和新的伪造策略。1999年8月在Crypto'99的尾部会议上提出。

[12] J.-S. Coron. On the Exact Security of Full Domain Hashing. In M. Bellare, editor, Advances in Cryptology - Crypto 2000, volume 1880 of Lecture Notes in Computer Science, pp. 229 - 235. Springer Verlag, 2000.

[12] J-S.科隆。关于全域哈希的精确安全性。编者M.Bellare,《密码学的进展——密码学2000》,计算机科学讲稿1880卷,229-235页。斯普林格·维拉格,2000年。

[13] J.-S. Coron. Optimal Security Proofs for PSS and Other Signature Schemes. In L. Knudsen, editor, Advances in Cryptology - Eurocrypt 2002, volume 2332 of Lecture Notes in Computer Science, pp. 272 - 287. Springer Verlag, 2002.

[13] J-S.科隆。PSS和其他签名方案的最优安全性证明。L.Knudsen主编,《密码学进展——欧洲密码2002》,计算机科学课堂讲稿第2332卷,272-287页。斯普林格·维拉格,2002年。

[14] J.-S. Coron, M. Joye, D. Naccache and P. Paillier. New Attacks on PKCS #1 v1.5 Encryption. In B. Preneel, editor, Advances in Cryptology - Eurocrypt 2000, volume 1807 of Lecture Notes in Computer Science, pp. 369 - 379. Springer Verlag, 2000.

[14] J-S.Coron、M.Joye、D.Naccache和P.Paillier。针对PKCS#1 v1.5加密的新攻击。B.Preneel主编,《密码学进展——欧洲密码2000》,计算机科学课堂讲稿第1807卷,第369-379页。斯普林格·维拉格,2000年。

[15] J.-S. Coron, D. Naccache and J. P. Stern. On the Security of RSA Padding. In M. Wiener, editor, Advances in Cryptology - Crypto '99, volume 1666 of Lecture Notes in Computer Science, pp. 1 - 18. Springer Verlag, 1999.

[15] J-S.Coron、D.Naccache和J.P.Stern。RSA填充的安全性。《密码学的进展——99年密码学》,计算机科学课堂讲稿1666卷,第1-18页,编辑M.维纳。斯普林格·维拉格,1999年。

[16] Y. Desmedt and A.M. Odlyzko. A Chosen Text Attack on the RSA Cryptosystem and Some Discrete Logarithm Schemes. In H.C. Williams, editor, Advances in Cryptology - Crypto '85, volume 218 of Lecture Notes in Computer Science, pp. 516 - 522. Springer Verlag, 1986.

[16] Y.Desmedt和A.M.Odlyzko。对RSA密码体制和一些离散对数方案的选择文本攻击。编者H.C.Williams,《密码学的进展——85年加密》,第218卷《计算机科学课堂讲稿》,第516-522页。斯普林格·维拉格,1986年。

[17] Dierks, T. and C. Allen, "The TLS Protocol, Version 1.0", RFC 2246, January 1999.

[17] Dierks,T.和C.Allen,“TLS协议,版本1.0”,RFC 2246,1999年1月。

[18] H. Dobbertin. Cryptanalysis of MD4. In D. Gollmann, editor, Fast Software Encryption '96, volume 1039 of Lecture Notes in Computer Science, pp. 55 - 72. Springer Verlag, 1996.

[18] 多伯丁。MD4的密码分析。《1996年快速软件加密》编辑D.Gollmann著,《计算机科学课堂讲稿》第1039卷,第55-72页。斯普林格·维拉格,1996年。

[19] H. Dobbertin. Cryptanalysis of MD5 Compress. Presented at the rump session of Eurocrypt '96, May 1996.

[19] 多伯丁。MD5压缩的密码分析。1996年5月,在1996年Eurocrypt的尾部会议上提出。

[20] H. Dobbertin. The First Two Rounds of MD4 are Not One-Way. In S. Vaudenay, editor, Fast Software Encryption '98, volume 1372 in Lecture Notes in Computer Science, pp. 284 - 292. Springer Verlag, 1998.

[20] 多伯丁。MD4的前两轮不是单向的。在S.Vaudenay中,编辑,《98年快速软件加密》,第1372卷《计算机科学课堂讲稿》,第284-292页。斯普林格·维拉格,1998年。

[21] E. Fujisaki, T. Okamoto, D. Pointcheval and J. Stern. RSA-OAEP is Secure under the RSA Assumption. In J. Kilian, editor, Advances in Cryptology - Crypto 2001, volume 2139 of Lecture Notes in Computer Science, pp. 260 - 274. Springer Verlag, 2001.

[21] 藤崎吾、冈本、波因切瓦尔和斯特恩。RSA-OAEP在RSA假设下是安全的。J.Kilian主编,《密码学进展——密码学2001》,计算机科学课堂讲稿第2139卷,第260-274页。斯普林格·维拉格,2001年。

[22] H. Garner. The Residue Number System. IRE Transactions on Electronic Computers, EC-8 (6), pp. 140 - 147, June 1959.

[22] 加纳。剩余数系统。《电子计算机上的IRE交易》,EC-8(6),第140-147页,1959年6月。

[23] M.L. Grell. Re: Encoding Methods PSS/PSS-R. Letter to IEEE P1363 working group, University of California, June 15, 1999. Available from http://grouper.ieee.org/groups/1363/P1363/patents.html.

[23] 格雷尔先生。RE:编码方法PSS/PSS R信到IEEE P1363工作组,加利福尼亚大学,1999年6月15日。可从http://grouper.ieee.org/groups/1363/P1363/patents.html.

[24] J. Haastad. Solving Simultaneous Modular Equations of Low Degree. SIAM Journal of Computing, volume 17, pp. 336 - 341, 1988.

[24] 哈斯塔德。求解低阶联立模方程组。暹罗计算杂志,第17卷,336-3411988页。

[25] Housley, R., "Cryptographic Message Syntax (CMS)", RFC 3369, August 2002. Housley, R., "Cryptographic Message Syntax (CMS) Algorithms", RFC 3370, August 2002.

[25] Housley,R.,“加密消息语法(CMS)”,RFC3369,2002年8月。Housley,R.,“加密消息语法(CMS)算法”,RFC3370,2002年8月。

[26] IEEE Std 1363-2000: Standard Specifications for Public Key Cryptography. IEEE, August 2000.

[26] IEEE标准1363-2000:公开密钥加密的标准规范。IEEE,2000年8月。

[27] IEEE P1363 working group. IEEE P1363a D11: Draft Standard Specifications for Public Key Cryptography -- Amendment 1: Additional Techniques. December 16, 2002. Available from http://grouper.ieee.org/groups/1363/.

[27] IEEE P1363工作组。IEEE P1363a D11:公开密钥加密的标准规范草案——修改件1:附加技术。2002年12月16日。可从http://grouper.ieee.org/groups/1363/.

[28] ISO/IEC 9594-8:1997: Information technology - Open Systems Interconnection - The Directory: Authentication Framework. 1997.

[28] ISO/IEC 9594-8:1997:信息技术-开放系统互连-目录:认证框架。1997

[29] ISO/IEC FDIS 9796-2: Information Technology - Security Techniques - Digital Signature Schemes Giving Message Recovery - Part 2: Integer Factorization Based Mechanisms. Final Draft International Standard, December 2001.

[29] ISO/IEC FDIS 9796-2:信息技术-安全技术-提供消息恢复的数字签名方案-第2部分:基于整数分解的机制。国际标准最终草案,2001年12月。

[30] ISO/IEC 18033-2: Information Technology - Security Techniques - Encryption Algorithms - Part 2: Asymmetric Ciphers. V. Shoup, editor, Text for 2nd Working Draft, January 2002.

[30] ISO/IEC 18033-2:信息技术-安全技术-加密算法-第2部分:非对称密码。V.Shoup,编辑,第二份工作草案文本,2002年1月。

[31] J. Jonsson. Security Proof for the RSA-PSS Signature Scheme (extended abstract). Second Open NESSIE Workshop. September 2001. Full version available from http://eprint.iacr.org/2001/053/.

[31] J.琼森。RSA-PSS签名方案的安全性证明(扩展摘要)。第二次尼西公开研讨会。2001年9月。完整版本可从http://eprint.iacr.org/2001/053/.

[32] J. Jonsson and B. Kaliski. On the Security of RSA Encryption in TLS. In M. Yung, editor, Advances in Cryptology - CRYPTO 2002, vol. 2442 of Lecture Notes in Computer Science, pp. 127 - 142. Springer Verlag, 2002.

[32] J.琼森和B.卡利斯基。TLS中RSA加密的安全性。《密码学的进展——2002年密码学》,计算机科学课堂讲稿第2442卷,127-142页,编辑M.Yung。斯普林格·维拉格,2002年。

[33] Kaliski, B., "The MD2 Message-Digest Algorithm", RFC 1319, April 1992.

[33] Kaliski,B.,“MD2消息摘要算法”,RFC 1319,1992年4月。

[34] B. Kaliski. On Hash Function Identification in Signature Schemes. In B. Preneel, editor, RSA Conference 2002, Cryptographers' Track, volume 2271 of Lecture Notes in Computer Science, pp. 1 - 16. Springer Verlag, 2002.

[34] 卡利斯基。签名方案中的哈希函数识别。2002年RSA大会编辑B.Preneel,《密码学家轨迹》,计算机科学课堂讲稿第2271卷,第1-16页。斯普林格·维拉格,2002年。

[35] Kaliski, B. and J. Staddon, "PKCS #1: RSA Cryptography Specifications Version 2.0", RFC 2437, October 1998.

[35] Kaliski,B.和J.Staddon,“PKCS#1:RSA加密规范2.0版”,RFC 2437,1998年10月。

[36] J. Manger. A Chosen Ciphertext Attack on RSA Optimal Asymmetric Encryption Padding (OAEP) as Standardized in PKCS #1 v2.0. In J. Kilian, editor, Advances in Cryptology - Crypto 2001, volume 2139 of Lecture Notes in Computer Science, pp. 260 - 274. Springer Verlag, 2001.

[36] 马槽。PKCS#1 v2.0中标准化的对RSA最优非对称加密填充(OAEP)的选择密文攻击。J.Kilian主编,《密码学进展——密码学2001》,计算机科学课堂讲稿第2139卷,第260-274页。斯普林格·维拉格,2001年。

[37] A. Menezes, P. van Oorschot and S. Vanstone. Handbook of Applied Cryptography. CRC Press, 1996.

[37] A.梅内塞斯、P.范·奥尔肖特和S.范·斯通。应用密码学手册。华润出版社,1996年。

[38] National Institute of Standards and Technology (NIST). FIPS Publication 180-1: Secure Hash Standard. April 1994.

[38] 国家标准与技术研究所(NIST)。FIPS出版物180-1:安全哈希标准。1994年4月。

[39] National Institute of Standards and Technology (NIST). Draft FIPS 180-2: Secure Hash Standard. Draft, May 2001. Available from http://www.nist.gov/sha/.

[39] 国家标准与技术研究所(NIST)。FIPS 180-2草案:安全哈希标准。草案,2001年5月。可从http://www.nist.gov/sha/.

[40] J.-J. Quisquater and C. Couvreur. Fast Decipherment Algorithm for RSA Public-Key Cryptosystem. Electronics Letters, 18 (21), pp. 905 - 907, October 1982.

[40] 基斯夸特和库夫勒。RSA公钥密码体制的快速解密算法。《电子通讯》,第18(21)页,第905-907页,1982年10月。

[41] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.

[41] Rivest,R.,“MD5消息摘要算法”,RFC1321,1992年4月。

[42] R. Rivest, A. Shamir and L. Adleman. A Method for Obtaining Digital Signatures and Public-Key Cryptosystems. Communications of the ACM, 21 (2), pp. 120-126, February 1978.

[42] R.Rivest、A.Shamir和L.Adleman。一种获取数字签名和公钥密码系统的方法。ACM的来文,21(2),第120-126页,1978年2月。

[43] N. Rogier and P. Chauvaud. The Compression Function of MD2 is not Collision Free. Presented at Selected Areas of Cryptography '95. Carleton University, Ottawa, Canada. May 1995.

[43] 罗吉尔和乔沃。MD2的压缩功能不是无冲突的。在95年选定的密码学领域发表。加拿大渥太华卡尔顿大学。1995年5月。

[44] RSA Laboratories. PKCS #1 v2.0: RSA Encryption Standard. October 1998.

[44] RSA实验室。PKCS#1 v2.0:RSA加密标准。1998年10月。

[45] RSA Laboratories. PKCS #7 v1.5: Cryptographic Message Syntax Standard. November 1993. (Republished as IETF RFC 2315.)

[45] RSA实验室。PKCS#7 v1.5:加密消息语法标准。1993年11月。(作为IETF RFC 2315重新发布。)

[46] RSA Laboratories. PKCS #8 v1.2: Private-Key Information Syntax Standard. November 1993.

[46] RSA实验室。PKCS#8 v1.2:私钥信息语法标准。1993年11月。

[47] RSA Laboratories. PKCS #12 v1.0: Personal Information Exchange Syntax Standard. June 1999.

[47] RSA实验室。PKCS#12 v1.0:个人信息交换语法标准。1999年6月。

[48] V. Shoup. OAEP Reconsidered. In J. Kilian, editor, Advances in Cryptology - Crypto 2001, volume 2139 of Lecture Notes in Computer Science, pp. 239 - 259. Springer Verlag, 2001.

[48] 休普。OAEP重新考虑。J.Kilian主编,《密码学进展——密码学2001》,计算机科学课堂讲稿第2139卷,第239-259页。斯普林格·维拉格,2001年。

[49] R. D. Silverman. A Cost-Based Security Analysis of Symmetric and Asymmetric Key Lengths. RSA Laboratories Bulletin No. 13, April 2000. Available from http://www.rsasecurity.com.rsalabs/bulletins/.

[49] R.D.西尔弗曼。对称和非对称密钥长度的基于成本的安全性分析。RSA实验室公告第13号,2000年4月。可从http://www.rsasecurity.com.rsalabs/bulletins/.

[50] G. J. Simmons. Subliminal communication is easy using the DSA. In T. Helleseth, editor, Advances in Cryptology - Eurocrypt '93, volume 765 of Lecture Notes in Computer Science, pp. 218- 232. Springer-Verlag, 1993.

[50] G.J.西蒙斯。使用DSA进行潜意识沟通很容易。在T.Helleseth主编的《密码学的进展——1993年欧洲密码》,计算机科学课堂讲稿第765卷,第218-232页。斯普林格·维拉格,1993年。

Appendix G: About PKCS

附录G:关于PKCS

The Public-Key Cryptography Standards are specifications produced by RSA Laboratories in cooperation with secure systems developers worldwide for the purpose of accelerating the deployment of public-key cryptography. First published in 1991 as a result of meetings with a small group of early adopters of public-key technology, the PKCS documents have become widely referenced and implemented. Contributions from the PKCS series have become part of many formal and de facto standards, including ANSI X9 and IEEE P1363 documents, PKIX, SET, S/MIME, SSL/TLS, and WAP/WTLS.

公钥加密标准是RSA实验室与全球安全系统开发人员合作制定的规范,旨在加速公钥加密的部署。PKCS文件于1991年首次出版,是与一小群早期采用公钥技术的人举行会议的结果。PKCS文件已被广泛引用和实施。PKCS系列的贡献已成为许多正式和事实标准的一部分,包括ANSI X9和IEEE P1363文档、PKIX、SET、S/MIME、SSL/TLS和WAP/WTLS。

Further development of PKCS occurs through mailing list discussions and occasional workshops, and suggestions for improvement are welcome. For more information, contact:

通过邮件列表讨论和偶尔的研讨会进一步开发PKCS,欢迎提出改进建议。有关详细信息,请联系:

PKCS Editor RSA Laboratories 174 Middlesex Turnpike Bedford, MA 01730 USA pkcs-editor@rsasecurity.com http://www.rsasecurity.com/rsalabs/pkcs

PKCS编辑RSA实验室174美国马萨诸塞州米德尔塞克斯收费公路贝德福德01730 PKCS-editor@rsasecurity.com http://www.rsasecurity.com/rsalabs/pkcs

Appendix H: Corrections Made During RFC Publication Process

附录H:RFC发布过程中的更正

The following corrections were made in converting the PKCS #1 v2.1 document to this RFC:

在将PKCS#1 v2.1文件转换为本RFC时进行了以下更正:

* The requirement that the parameters in an AlgorithmIdentifier value for id-sha1, id-sha256, id-sha384, and id-sha512 be NULL was changed to a recommendation that the parameters be omitted (while still allowing the parameters to be NULL). This is to align with the definitions originally promulgated by NIST. Implementations MUST accept AlgorithmIdentifier values both without parameters and with NULL parameters.

* 将id-sha1、id-sha256、id-sha384和id-sha512的算法标识符值中的参数为空的要求更改为建议省略参数(同时仍允许参数为空)。这与NIST最初发布的定义一致。实现必须接受无参数和空参数的算法标识符值。

* The notes after RSADP and RSASP1 (Secs. 5.1.2 and 5.2.1) were corrected to refer to step 2.b rather than 2.a.

* RSADP和RSASP1(第5.1.2和5.2.1节)之后的注释已更正,以参考步骤2.b,而不是步骤2.a。

* References [25], [27] and [32] were updated to reflect new publication data.

* 参考文献[25]、[27]和[32]已更新,以反映新的出版数据。

These corrections will be reflected in future editions of PKCS #1 v2.1.

这些更正将反映在PKCS#1 v2.1的未来版本中。

Security Considerations

安全考虑

Security issues are discussed throughout this memo.

本备忘录中讨论了安全问题。

Acknowledgements

致谢

This document is based on a contribution of RSA Laboratories, the research center of RSA Security Inc. Any substantial use of the text from this document must acknowledge RSA Security Inc. RSA Security Inc. requests that all material mentioning or referencing this document identify this as "RSA Security Inc. PKCS #1 v2.1".

本文档基于RSA Security Inc.研究中心RSA Laboratories的贡献。对本文档中文本的任何实质性使用都必须感谢RSA Security Inc.RSA Security Inc.要求提及或引用本文档的所有材料将其标识为“RSA Security Inc.PKCS#1 v2.1”。

Authors' Addresses

作者地址

Jakob Jonsson Philipps-Universitaet Marburg Fachbereich Mathematik und Informatik Hans Meerwein Strasse, Lahnberge DE-35032 Marburg Germany

雅各布·琼森·菲利普斯大学马尔堡数学与信息学院汉斯·米尔文大街,德国马尔堡35032

   Phone: +49 6421 28 25672
   EMail: jonsson@mathematik.uni-marburg.de
        
   Phone: +49 6421 28 25672
   EMail: jonsson@mathematik.uni-marburg.de
        

Burt Kaliski RSA Laboratories 174 Middlesex Turnpike Bedford, MA 01730 USA

Burt Kaliski RSA Laboratories 174美国马萨诸塞州米德尔塞克斯收费公路贝德福德01730号

   Phone: +1 781 515 7073
   EMail: bkaliski@rsasecurity.com
        
   Phone: +1 781 515 7073
   EMail: bkaliski@rsasecurity.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society 2003. All Rights Reserved.

版权所有(C)互联网协会2003。版权所有。

This document and translations of it may be copied and furnished to others provided that the above copyright notice and this paragraph are included on all such copies. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as required to translate it into languages other than English.

只要上述版权声明和本段包含在所有此类副本中,本文件及其译本可复制并提供给其他人。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非需要将其翻译成英语以外的语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。