Šifrovanie e-mailov S/MIME

Compatible Nitrokeys

3A/C/Mini

Passkey

HSM 2

Pro 2

FIDO2

Storage 2

Start

U2F

active

inactive

inactive

active

inactive

active

active

inactive

Predpoklady

Existujú dva široko používané štandardy na šifrovanie e-mailov.

  • OpenPGP/GnuPG je obľúbený medzi jednotlivcami,

  • S/MIME/X.509 používajú najmä podniky.

If you are in doubt which one to choose, you should use OpenPGP, see here (not applicable for the Nitrokey HSM 2, the Nitrokey HSM 2 currently supports the S/MIME/X.509 standard though, therefore the rest of the guide is applicable for the HSM 2 and other Nitrokeys). This page describes the usage of S/MIME email encryption.

You need to purchase a S/MIME certificate (e.g. at CERTUM) or may already got one by your company. Furthermore, you need to install OpenSC on your System. While GNU/Linux users usually can install OpenSC over the package manager (e.g. sudo apt install opensc on Ubuntu), macOS and Windows users can download the installation files from the OpenSC page.

Poznámka

Používatelia systému Windows so 64-bitovým systémom (štandard) si musia nainštalovať 32-bitovú aj 64-bitovú verziu OpenSC!

Import existujúceho kľúča a certifikátu

Nasledujúce pokyny sú založené na wiki OpenSC. Budeme predpokladať, že ste už získali pár kľúč-certifikát vo forme súboru .p12. Ak ste dostali samostatný súbor s kľúčom a certifikátom, pozrite sa na stránku wiki.

To open the Windows command line please push the Windows-key and R-key. Now type ‘cmd.exe’ in the text field and hit enter. To open a Terminal on macOS or GNU/Linux please use the application search (e.g. spotlight on macOS).

To make these commands as simple as possible, the .p12 file needs to be in your home folder. On Windows this is usually C:\Users\yourusername and on macOS and GNU/Linux system it will be /home/yourusername. If you do not store the .p12 file there, you have to adapt the path in the commands below. Please plug in the Nitrokey before submitting the commands.

Za predpokladu, že váš súbor s certifikátom kľúča znie ‚myprivate.p12‘, príkazy pre systém Windows vyzerajú takto:

"C:\Program Files\OpenSC Project\OpenSC\tools\pkcs15-init" --delete-objects privkey,pubkey --id 3 --store-private-key myprivate.p12 --format pkcs12 --auth-id 3 --verify-pin
"C:\Program Files\OpenSC Project\OpenSC\tools\pkcs15-init" --delete-objects privkey,pubkey --id 2 --store-private-key myprivate.p12 --format pkcs12 --auth-id 3 --verify-pin

a v systémoch macOS a GNU/Linux to bude

$ pkcs15-init --delete-objects privkey,pubkey --id 3 --store-private-key myprivate.p12 --format pkcs12 --auth-id 3 --verify-pin
$ pkcs15-init --delete-objects privkey,pubkey --id 2 --store-private-key myprivate.p12 --format pkcs12 --auth-id 3 --verify-pin

Tieto dva príkazy skopírujú dvojicu kľúč-certifikát do slotu 2 (potrebného na dešifrovanie e-mailov) a slotu 3 (potrebného na podpisovanie). Výstup vyzerá v oboch systémoch približne takto:

img1

Upozorňujeme, že sa vyskytnú chybové hlásenia, ktoré možno bezpečne ignorovať (pozri príklad výstupu vyššie). Teraz máte pár kľúč-certifikát nahraný na Nitrokey.

Používanie

Ďalšie informácie o používaní nájdete na týchto stránkach: