2. Terminology (术语)
JWS 中定义的 "JSON Web Signature (JWS)", "Base64url Encoding", "Collision-Resistant Name", "Header Parameter", "JOSE Header" 和 "StringOrURI" 也适用于本规范. RFC 4949 中定义的 Ciphertext, Digital Signature, Initialization Vector (IV), Message Authentication Code (MAC) 和 Plaintext 也在此使用.
JSON Web Encryption (JWE) : 表示已加密且受完整性保护消息的数据结构.
Authenticated Encryption with Associated Data (AEAD) : 同时加密 plaintext, 接受 Additional Authenticated Data, 并对 ciphertext 和 AAD 提供完整性检查的算法. AES Galois/Counter Mode (GCM) 是 AEAD 算法之一.
Additional Authenticated Data (AAD) : AEAD operation 的输入, 受完整性保护但不被加密.
Authentication Tag : AEAD operation 的输出, 用于验证 ciphertext 和 AAD 的完整性. 某些算法不使用 tag, 此时该值为空 octet sequence.
Content Encryption Key (CEK) : AEAD algorithm 用来加密 plaintext 并生成 ciphertext/tag 的 symmetric key.
JWE Encrypted Key : 已加密的 CEK. 对某些算法, 该值为空 octet sequence.
JWE Initialization Vector : 加密 plaintext 时使用的 IV. 对某些算法, 该值为空 octet sequence.
JWE AAD : JWE JSON Serialization 中可出现的额外 AAD 值.
JWE Ciphertext : 使用 CEK 和 AAD 对 plaintext 做 authenticated encryption 后产生的 ciphertext.
JWE Authentication Tag : authenticated encryption 产生的 Authentication Tag.
JWE Protected Header : JSON object, 包含受 authenticated encryption 完整性保护的 Header Parameter. Compact Serialization 中它就是整个 JOSE Header.
JWE Shared Unprotected Header : JSON object, 包含适用于所有 recipient 但不受完整性保护的 Header Parameter. 只在 JWE JSON Serialization 中出现.
JWE Per-Recipient Unprotected Header : JSON object, 包含仅适用于单个 recipient 且不受完整性保护的 Header Parameter. 只在 JWE JSON Serialization 中出现.
JWE Compact Serialization : JWE 的紧凑 URL-safe 字符串表示.
JWE JSON Serialization : JWE 的 JSON object 表示, 支持将同一内容加密给多个 recipient, 但不以紧凑性或 URL safety 为目标.
Key Management Mode : 确定 CEK 的方式. 本规范使用 Key Encryption, Key Wrapping, Direct Key Agreement, Key Agreement with Key Wrapping 和 Direct Encryption.
Direct Encryption : 直接把通信双方共享的 symmetric key 作为 CEK 的 key management mode.