PGP deprecated

Using PGP with OX Guard

Overview

This article describes the support of PGP in OX Guard. OX Guard encrypts and signs mails with PGP and encrypts Drive files with PGP. OX Guard implements the standard OpenPGP and is compatible with other OpenPGP clients.

For a mail between two OX App Suite users of the deployment, OX Guard creates the key pair of the recipient if the recipient has no key pair yet. For an external recipient, OX Guard searches the public key in several sources. If no source provides a key, OX Guard creates a guest account for the external recipient.

The article S/MIME describes the second encryption method of OX Guard.

Capabilities

The capabilities guard, guard-mail and guard-drive enable the functions of PGP for a user. The section Capabilities of the article Setup and Configuration describes the capabilities and how they are set.

Keys of users

Every user with PGP has their own PGP key pair, which OX Guard stores in the database. A user can have several key pairs. OX Guard uses the key pair that is marked as current for new mails and files.

Key creation

OX Guard creates the key pair of a user in one of two ways:

  • The user creates the key pair in the settings of OX Guard and chooses the password for the key pair.
  • Another user encrypts a mail or shares an encrypted file with the user, and the user has no key pair yet. OX Guard then creates the key pair with a random password and creates recovery data for the key pair. At the first use, OX Guard asks the user for a new password.

A key pair consists of an RSA master key for signatures and an RSA subkey for encryption. The following properties control the creation of key pairs:

Password

The password of the user protects the private keys in the database. OX Guard requires the password for every decryption and every signature. The property com.openexchange.guard.minPasswordLength (default 6) specifies the minimum length of the password. If the user forgets the password, the password recovery resets the password. The section Password recovery of the article Setup and Configuration describes the password recovery.

Own keys

A user can upload their own PGP key pair in the settings of OX Guard, for example a key pair from another OpenPGP client. A user ID of the uploaded key pair has to contain the mail address of the user. OX Guard protects the private key with a new password of the user and marks the uploaded key pair as current.

A user can revoke and delete their key pairs in the settings of OX Guard. A revoked key pair remains stored, a deleted key pair does not. If the property com.openexchange.guard.noDeletePrivate (default false) is true or the user has the capability com.openexchange.capability.guard-nodeleteprivate, OX Guard rejects the deletion of key pairs. The revocation remains possible.

Expiration

OX Guard warns a user before the current key pair expires and after the current key pair has expired. The property com.openexchange.guard.expiringCertificateWarningDays (default 60) specifies the number of days before the expiration from which OX Guard warns the user. The value 0 disables the warning.

Mails

Mail formats

OX Guard supports two formats for PGP mails:

  • PGP/MIME encrypts the whole mail including the attachments as one part. PGP/MIME is the default format.
  • PGP Inline encrypts every part of the mail separately. Attachments receive the extension .pgp. PGP Inline supports only plain text reliably.

OX Guard uses PGP Inline if the user chooses PGP Inline in the advanced compose options or in the settings of OX Guard, or if the user has marked the uploaded public key of a recipient for PGP Inline. OX Guard decrypts mails in both formats.

Drafts and replies

A user decides in the settings of OX Guard whether OX Guard encrypts the drafts of encrypted mails. If the property com.openexchange.guard.forceEncryptDrafts (default false) is true, OX Guard always encrypts the drafts of encrypted mails, and the option is not available to the user.

If the property com.openexchange.guard.secureReply (default true) is true, the client encrypts every reply to an encrypted mail.

Integrity check

OX Guard checks the integrity of a decrypted mail with the Modification Detection Code (MDC) of OpenPGP. The property com.openexchange.guard.failForMissingMDC specifies how OX Guard handles a mail without MDC:

  • With the value false (default), OX Guard decrypts the mail without HTML formatting, and the client shows a warning.
  • With the value true, OX Guard rejects the decryption of the mail.

Files

A user with the capability guard-drive encrypts Drive files with PGP. OX Guard appends the extension .pgp to the name of an encrypted file and decrypts the file for the download after the user has entered the password.

An encrypted file can be shared with other users. OX Guard encrypts the file for the keys of all users with whom the file is shared. If a user has no key pair yet, OX Guard creates the key pair as described in the section Key creation. OX Guard does not support the sharing of encrypted files with groups.

Deleted keys

If the OX App Suite Middleware deletes a user or a context, OX Guard keeps a backup of the private keys of the deleted users. An administrator can make the backup available to the former user with the action expose_key of the Support API. The Support API returns a URL, from which the former user downloads the private keys with the mail address and the previous password.

The property com.openexchange.guard.exposedKeyDurationInHours (default 168) specifies the number of hours for which the URL remains valid. The value 0 keeps the URL valid without time limit.

Keys of recipients

To encrypt a mail with PGP, OX Guard requires the public key of every recipient. The section PGP keys of the article Key and Certificate Discovery describes the sources from which OX Guard obtains the public keys of recipients and how OX Guard publishes the public keys of the users.