2.7. 替换 Section 5.2.2 - Encrypted Values
2.7. 替换 Section 5.2.2 - Encrypted Values
[RFC4210] Section 5.2.2 描述使用 EncryptedValue 传输 encrypted data. 本文档扩展 data encryption, 使其优先使用 EnvelopedData.
将该节文本替换为以下文本:
5.2.2. Encrypted Values
当 encrypted data (在本规范中指 private key, certificate 或 revocation passphrase) 在 PKI message 中发送时, 使用 EncryptedKey data structure.
EncryptedKey ::= CHOICE {
encryptedValue EncryptedValue, -- deprecated
envelopedData [0] EnvelopedData }
EncryptedKey 和 EncryptedValue 语法见 Certificate Request Message Format (CRMF) [RFC4211], EnvelopedData 语法见 Cryptographic Message Syntax (CMS) [RFC5652]. 使用 EncryptedKey data structure 提供了使用 EncryptedValue (仅用于 backward compatibility) 或 EnvelopedData 的选择. EncryptedValue 结构的使用已经被弃用, 转而使用 EnvelopedData 结构. 因此, RECOMMENDED 使用 EnvelopedData.
Note: 此处复用 CRMF [RFC4211] 中定义的 EncryptedKey 结构, 这使本次更新保持 backward compatible. 使用带 untagged default choice EncryptedValue 的新语法, 在 bits-on-the-wire 层面与旧语法兼容.
为表示支持 EnvelopedData, 引入了 pvno cmp2021. protocol version number (pvno) 的用法细节见 Section 7.
在 CMP 中, EncryptedKey data structure 用于以 encrypted form 传输 private key, certificate 或 revocation passphrase.
EnvelopedData 的用法如下:
-
它只包含一个 RecipientInfo 结构, 因为 content 只针对一个 recipient 加密.
-
它可以包含位于 AsymmetricKeyPackage 结构中的 private key, 该结构按
[RFC5958]定义, 被包装在 SignedData 结构中, 如 CMS[RFC5652]Section 5 和[RFC8933]所规定, 并由 Key Generation Authority 签名. -
它可以在 encryptedContent 字段中直接包含 certificate 或 revocation passphrase.
EnvelopedData 结构的 content, 如 CMS [RFC5652] Section 6 所规定, MUST 使用新生成的 symmetric content-encryption key 加密. 该 content-encryption key MUST 使用三种 key management technique 之一安全地提供给 recipient.
sender 选择使用哪种 key management technique, 取决于 recipient 可用的 credential:
-
recipient 的 certificate, 其中带有 algorithm identifier 和支持 key transport 的 public key, 且任何给定 key usage extension 都允许 keyEncipherment: content-encryption key 将使用 key transport key management technique 进行保护, 如 CMS
[RFC5652]Section 6.2.1 所规定. -
recipient 的 certificate, 其中带有 algorithm identifier 和支持 key agreement 的 public key, 且任何给定 key usage extension 都允许 keyAgreement: content-encryption key 将使用 key agreement key management technique 进行保护, 如 CMS
[RFC5652]Section 6.2.2 所规定. -
password 或 shared secret: content-encryption key 将使用 password-based key management technique 进行保护, 如 CMS
[RFC5652]Section 6.2.4 所规定.