Open Bug 2038226 Opened 5 months ago Updated 4 months ago

Thunderbird: Add encryption support for S/MIME authEnveloped-data PKCS7 Cryptographic Layer and aes-GCM content-encryption algorithm

Categories

(MailNews Core :: Security: S/MIME, enhancement)

Thunderbird 102
enhancement

Tracking

(Not tracked)

People

(Reporter: taavi.eomae+bugzilla, Unassigned)

References

Details

Steps to reproduce:

  1. make a self-signed cert (root+user bug#1523130#c8), import .p12 file
    1a. "Manage S/MIME Certificates" → "Your Certificates" tab → "Import..."
    1b. "Authorities" tab → "Edit Trust..."
  2. create simple e-mail messages (headers, etc. low level stuff), see: bug#1011625#c20
    2a. create a "palette" of algorithms AEAD (3 available in Openssl v3) that we will test: aes-256-gcm, aes-192-gcm and aes-128-gcm
    2b. glue parts from openssl .p7m with email headers to .eml files
  3. create folder "tests" in "Local Folders", see: bug#1806122, bug#1688163
  4. open envelopedData/RSA_aes256_CBC.eml
    4a. "Copy To" → "Local Folders" → "tests"
  5. open authEnvelopedData/RSA_aes256_GCM.eml
    5a. "Copy To" → "Local Folders" → "tests"
  6. open first email (from "Local Folders") RSA_aes256_CBC.eml → [decryption OK]
  7. open second email RSA_aes256_GCM.eml → [decryption failed, not OK]
    7a. "Message Cannot Be Decrypted"... "There are unknown problems..."
  8. carefully modify base64 code of the file envelopedData/RSA_aes256_CBC.eml and import it to local folder, Th.:
    8a. decrypts ciphertext, broken with random characters; displays green padlock "Message Is Encrypted" → [OK, proper behavior]

Actual results:

Th. can't decipher AES-GCM emails encoded in authEnveloped-data

Expected results:

Th. can decrypt and encrypt AES-GCM emails encoded in authEnveloped-data.

  1. carefully modify base64 code of the file authEnvelopedData/RSA_aes256_GCM.eml and import it to local folder, Th.:
    1a. tries to decrypt ciphertext, doesn't show the message (discards email); displays an error like "integrity check problem", "the requested encryption operation could not be performed" etc.
    Two possibilities (for encrypt):
  2. Th. recognizes "sMIMECapabilities" extension and the AES-GCM fields contained therein and can encrypt emails using "AES-GCM" to a recipient sending such an extension with signed SMIME message.
    1a. Th. sends an "sMIMECapabilities" extension containing "AES-GCM" fields with each signed SMIME message.
  3. Th. defaults the content-encryption to AES-GCM. The default setting can be changed in the "Config Editor". [rfc8551#section-2.7.1.2 compliant solution.]
    2a. Th. sends an "sMIMECapabilities" extension containing "AES-GCM" fields with each signed SMIME message. It does so because perhaps some programs support this extension or will in the near future.

"sMIMECapabilities" would look, more or less, like this:

SEQUENCE {
  OBJECT IDENTIFIER sMIMECapabilities (1 2 840 113549 1 9 15)
  SET {
    SEQUENCE {
      SEQUENCE {
        OBJECT IDENTIFIER aes256-GCM (2 16 840 1 101 3 4 1 46)
        }
      SEQUENCE {
        OBJECT IDENTIFIER aes192-GCM (2 16 840 1 101 3 4 1 26)
        }
      SEQUENCE {
        OBJECT IDENTIFIER aes128-GCM (2 16 840 1 101 3 4 1 6)
        }
      SEQUENCE {
        OBJECT IDENTIFIER aes256-CBC (2 16 840 1 101 3 4 1 42)
        }
      SEQUENCE {
        OBJECT IDENTIFIER aes192-CBC (2 16 840 1 101 3 4 1 22)
        }
      SEQUENCE {
        OBJECT IDENTIFIER aes128-CBC (2 16 840 1 101 3 4 1 2)
        }
      SEQUENCE {
        OBJECT IDENTIFIER sha-512 (2 16 840 1 101 3 4 2 3)
        }
      SEQUENCE {
        OBJECT IDENTIFIER sha-384 (2 16 840 1 101 3 4 2 2)
        }
      SEQUENCE {
        OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)
        }
      }
    }
  }
Depends on: 1835697
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.