S/MIME:
Basic principle and function of S/MIME encryption
S/MIME ("Secure Multipurpose Internet Mail Extension") was developed in 1995 and defined in 1999. With this procedure, messages can be encrypted and signed so that their content cannot be read by unauthorized third parties, and the recipient knows that the specified sender is, in fact, the one who sent the message. It can be individually determined whether a message is to be encrypted and/or signed. Nowadays, S/MIME is supported by most email clients and does not require any additional software installation for private use. To use email encryption with S/MIME, two things are required:
The X.509 certificate must be obtained for the user in question.
This certificate must then be integrated into the respective email client of the user.
In the actual implementation, however, there are still a few intermediate steps for both of these points, which must be successfully completed by the respective user.
Nowadays, the use of S/MIME in enterprises is mostly done via special business solutions from third-party providers. The concrete implementation of such solutions for email encryption, which function on the basis of S/MIME, depends on the given circumstances and is carried out by the IT experts, usually the respective admin.
Email encryption with S/MIME – a hybrid encryption method
Encryption with S/MIME works with key pairs. Each communication partner has a public and a private key, which makes this an asymmetric encryption method as both parties use different keys. The encryption is carried out by the sender, who encodes the message utilizing a session key; this takes place within the framework of a symmetrical encryption. The session key is then encrypted asymmetrically with the recipient's public key. Since both symmetric encryption (with the session key) and asymmetric encryption (with the public key) are used in this procedure, S/MIME is referred to as hybrid encryption.
During decryption, the recipient decodes the encrypted message with their private key. To ensure that no one else can do this, it is therefore important to store the private key carefully and ensure that no one has access to it.
Signing messages with S/MIME
Signing emails serves to authenticate the identity of the sender and simultaneously transmits the sender's public key to the recipient. This enables the recipient to verify beyond doubt whether the email really comes from the specified sender. In the corporate environment, this is, therefore, particularly interesting for the defense against phishing attacks. With S/MIME, a unique signature is added to an email to be sent using the sender's private key. On the recipient's side, the signature is then checked using the sender's public key. If something is wrong, the recipient is notified and must assume that the message has been tampered with.
Key exchange between communication partners as a basic requirement for encrypted email communication
For encrypted email communication with S/MIME, the desired email communication partners must know the public key. This works on the one hand, as already mentioned, via the signature: with this, the public key of the sender is transmitted to the recipient at the same time. In addition to the possibility of transmitting the public key directly to the relevant contacts, it can also be uploaded to an external key server. Other methods include publishing the key on a website or transmitting it in physical form, for example, on a USB stick. In practice, however, the latter is unusual and rather inconvenient. The public key is then used to encrypt all emails to the key holder. S/MIME does not work without the exchange of public keys.
Decryption of messages with S/MIME
Emails encrypted with S/MIME are then decrypted with the private key of the recipient. This decrypts the session key, which can then be used to decrypt the encrypted message.
The private key must, therefore, only be known to its owner and must also be protected by a password. If the private key should fall into the hands of a third party, the entire communication for which this key was used is affected. This means not just an email or correspondence with one contact partner but everything.
S/MIME certificates for key generation
For the use of S/MIME for email encryption, an X.509 certificate is required. Private users can obtain this from various providers or generate one themselves. The latter option is free of charge but quite time-consuming, as you have to ensure that your certificate is accepted. It is then necessary to first create a so-called root certificate, which all contact partners must import for the email exchange before the public keys are finally exchanged. Typically, recognized certification authorities are therefore used to obtain certificates.
Certification authorities and certificate classes
Certification authorities offer the advantage of ensuring that public keys and their owners really belong together, meaning that the key belongs to the intended recipient and that an email actually originates from the specified sender. This is an advantage over PGP, where this certainty does not exist in this form.
There are different classes for certificates; the class to which a certificate belongs depends on how the person who wants to obtain the certificate is checked:
Class 1: the existence of a specified email address is verified.
Class 2: in addition to the email address, the name and, if applicable, the company is confirmed in writing.
Class 3: the certificate holder must authenticate their identity, e.g. with the help of an identity card.
Class 4: the certificate holder proves their identity by appearing in person at the respective certification authority. This would be the most secure way to authenticate identity, but it is impractical and expensive and, therefore, not an option that is actually used in practice.
These classes have no effect on the security of email encryption with S/MIME certificates; they only say something about whether/how the applicant for the certificate has confirmed their identity. The certificates are of limited validity, which is usually one year (but some are valid for longer). To be able to use S/MIME permanently and reliably, it is, therefore, absolutely necessary to ensure that you always have a currently valid certificate.
For the successful issue of a certificate, several provider-specific steps must be completed. After the certificate has been successfully issued, it can usually be downloaded, or the private user receives an email that contains the corresponding URL where it can be retrieved.
Setting up S/MIME manually
Overall, setting up S/MIME is easier to implement than PGP. In recent years, technical requirements have been created to support S/MIME in various configurations.
S/MIME in an email client
After the S/MIME certificate has been obtained, a personal certificate must be generated and then installed. Next, the necessary settings must be made in the email client so that it uses S/MIME with the help of the corresponding certificate. Usually, the email client is restarted after the configuration is complete.