Skip to main content

4. Processing of Messages

4.1 Message Processing Overview​

This subsection provides a high-level overview of the components and processing steps involved in electronic mail privacy enhancement processing. Subsequent subsections will define the procedures in more detail.

A two-level keying hierarchy is used to support privacy-enhanced message transmission:

  1. Data Encrypting Keys (DEKs) are used for encryption of message text and for computation of message authentication codes (MACs). DEKs are generated individually for each transmitted message; no predistribution of DEKs is needed to support privacy-enhanced message transmission.
  2. Interchange Keys (IKs) are used to encrypt DEKs for transmission. An IK may either be a single symmetric cryptographic key or, where asymmetric (public-key) cryptography is used for DEK encryption, the composition of a public component used by an originator and a secret component used by a recipient. Ordinarily, the same IK will be used for all messages sent between a given originator-recipient pair over a period of time. Each transmitted message includes a representation of the DEK(s) used for message encryption and/or authentication, encrypted under an individual IK per named recipient. This representation is accompanied by an identifier (IK ID) to enable the recipient to determine which IK was used, and so to decrypt the representation yielding the DEK required for message text decryption and/or MAC verification.

An encoding procedure is employed in order to represent encrypted message text in a universally transmissible form and to enable messages encrypted on one type of system to be decrypted on a different type. Four phases are involved in this process. A plaintext message is accepted in local form, using the host's native character set and line representation. The local form is converted to a canonical message text representation, defined as equivalent to the inter-SMTP representation of message text. The canonical representation is padded to an integral multiple of eight octets, as required by the encryption algorithm. MAC computation is performed, and (if disclosure protection is required), the padded canonical representation is encrypted. The output of this step is encoded into a printable form. The printable form is composed of a restricted character set which is chosen to be universally representable across sites, and which will not be disrupted by processing within and between MTS entities.

The output of the encoding procedure is combined with a set of header fields (to be defined in Section 4.8) carrying cryptographic control information. The result is passed to the electronic mail system to be encapsulated as the text portion of a transmitted message.

When a privacy-enhanced message is received, the cryptographic control fields within its text portion provide the information required for the authorized recipient to perform MAC verification and decryption on the received message text. First, the printable encoding is converted to a bitstring. If the transmitted message was encrypted, it is decrypted into the canonical representation. If the message was not encrypted, decoding from the printable form produces the canonical representation directly. The MAC is verified, and the canonical representation is converted to the recipient's local form, which need not be the same as the sender's local form.

4.2 Encryption Algorithms and Modes​

For purposes of this RFC, the Block Cipher Algorithm DEA-1, defined in ISO draft international standard DIS 8227 [1] shall be used for encryption of message text and for computation of authentication codes on messages. The DEA-1 is equivalent to the Data Encryption Standard (DES), as defined in FIPS PUB 46 [2]. When used for these purposes, the DEA-1 shall be used in the Cipher Block Chaining (CBC) mode, as defined in ISO DIS 8372 [3]. The CBC mode definition in DIS 8372 is equivalent to that provided in FIPS PUB 81 [4]. A unique initializing vector (IV) will be generated for and transmitted with each encrypted electronic mail message.

An algorithm other than DEA-1 may be employed, provided that it satisfies the following requirements:

  1. it must be a 64-bit block cipher, enciphering and deciphering in 8 octet blocks
  2. it is usable in the ECB and CBC modes defined in DIS8372
  3. it is able to be keyed using the procedures and parameters defined in this RFC
  4. it is appropriate for MAC computation
  5. cryptographic key field lengths are limited to 16 octets in length

Certain operations require that one key be encrypted under another key (interchange key) for purposes of transmission. For purposes of this RFC, such encryption will be performed using DEA-1 in Electronic Codebook (ECB) mode. An optional facility is available to an interchange key provider to indicate that an associated key is to be used for encryption in another mode (e.g., the Encrypt-Decrypt-Encrypt (EDE) mode used for key encryption and decryption with pairs of 64-bit keys, as described [5] by ASC X3T1).

Future support of public key algorithms for key encryption is under consideration, and it is intended that the procedures defined in this RFC be appropriate to allow such usage. Support of key encryption modes other than ECB is optional for implementations, however. Therefore, in support of universal interoperability, interchange key providers should not specify other modes in the absence of a priori information indicating that recipients are equipped to perform key encryption in other modes.