Šifrovanie pevného disku¶
Compatible Nitrokeys |
|||||||
|---|---|---|---|---|---|---|---|
✓ active |
⨯ inactive |
✓ active |
✓ active |
⨯ inactive |
✓ active |
✓ active |
⨯ inactive |
VeraCrypt (predtým TrueCrypt)¶
VeraCrypt je bezplatný softvér s otvoreným zdrojovým kódom na šifrovanie diskov pre systémy Windows, macOS a GNU+Linux. Je nástupcom TrueCryptu, a preto sa odporúča, hoci nasledujúce pokyny by mali platiť aj pre TrueCrypt.
Follow these steps to use the program with Nitrokey Storage 2 or Nitrokey Pro 2:
Nainštalujte najnovšiu verziu OpenSC alebo si stiahnite Knižnicu PKCS#11.
Choose the library in VeraCrypt under Settings>Preferences>Security Token (location depends on system, e.g.
/usr/lib/opensc).Vygenerujte 64-bajtový súbor s kľúčom pomocou nástroja Tools>Keyfile Generator.
Now you should be able to import the generated key file via Tools>Manage Security Token Keyfiles. You should choose the first Slot (
[0] User PIN). The keyfile is then stored on the Nitrokey as Private Data Object 1 (PrivDO1).Potom by ste mali bezpečne vymazať pôvodný súbor s kľúčom v počítači!
Teraz môžete používať VeraCrypt s Nitrokey: Vytvorte kontajner, vyberte súbor s kľúčom v zariadení ako alternatívu k heslu.
Varovanie
Bezpečnostné hľadisko
Please note that VeraCrypt doesn’t make use of the full security which Nitrokey (and smart cards in general) offer. Instead it stores a keyfile on the Nitrokey which theoretically could be stolen by a compromised host, since the Private Data Object 1 is not protected by the Nitrokey’s PIN.
Šifrovanie pevného disku v systéme GNU+Linux pomocou LUKS/dm-crypt¶
Pri nastavovaní šifrovania disku LUKS postupujte podľa nášho sprievodcu:
Purism has created a simple script to add the Nitrokey/LibremKey as a way to unlock LUKS partitions (not tested by Nitrokey yet).
Tento projekt má za cieľ uľahčiť používanie LUKS s Nitrokey Pro alebo úložiskom založeným na Password Safe (zatiaľ netestované Nitrokey). Popis používania v systéme Gentoo nájdete tu.
Pre Arch Linux pozri initramfs-scencrypt.
Šifrovanie úložiska v systéme GNU+Linux pomocou systému EncFS¶
Tip
Predpoklad
Uistite sa, že ste nainštalovali ovládač zariadenia, zmenili predvolené kódy PIN a vygenerovali alebo importovali kľúče pomocou GnuPG.
EncFS is an easy to utlity for encrypted file systems and it is based on FUSE. You may follow these steps to use it with very long passwords and Nitrokey Pro 2.
Inicializácia¶
Vytvorenie súboru s kľúčom s náhodnými údajmi:
$ dd bs=64 count=1 if=/dev/urandom of=keyfile
Zašifrujte súbor s kľúčom a použite identifikátor používateľa vášho kľúča Nitrokey
$ gpg --encrypt keyfile
Odstráňte súbor s kľúčom v čistom texte:
$ rm keyfile # you may want to use 'wipe' or 'shred' to securely delete the keyfile
Vytvorenie prípojného bodu:
$ mkdir ~/.cryptdir ~/cryptdir
Vytvorenie skutočného priečinka na šifrovanie
$ gpg -d keyfile.gpg | encfs -S ~/.cryptdir ~/cryptdir # There may appears an error message about missing permission of fusermount # This message can be ignored
Odpojte nový systém súborov:
$ fusermount -u ~/cryptdir
Používanie¶
Pripojte zašifrovaný súborový systém a zadajte PIN kód Nitrokey:
$ gpg -d keyfile.gpg | encfs -S ~/.cryptdir ~/cryptdir
Po použití odpojte systém súborov:
$ fusermount -u ~/cryptdir
Šifrovanie úložiska v systéme GNU+Linux pomocou systému ECryptFS¶
eCryptfs je súborový transparentný šifrovací systém pre GNU+Linux, ktorý možno používať s Nitrokey prostredníctvom ovládača PKCS#11.
Pozrite si tieto pokyny:
Import certifikátu a kľúča do aplikácie Nitrokey
# Warning: This will delete existing keys on your Nitrokey! $ pkcs15-init --delete-objects privkey,pubkey --id 3 --store-private-key user@example.com.p12 --format pkcs12 --auth-id 3 --verify-pin
Vytvorte súbor ~/.ecryptfsrc.pkcs11:
$ editor ~/.ecryptfsrc.pkcs11
Zadajte tento obsah:
$ pkcs11-log-level=5 pkcs11-provider1,name=name,library=/usr/lib/opensc-pkcs11.so,cert-private=true $ openvpn --show-pkcs11-ids path to opensc-pkcs11 module Certificate DN: /description=Iv4IQpLO02Mnix9i/CN=user@example.com/emailAddress=user@example.com Serial: 066E04 Serialized id: ZeitControl/PKCS\x2315\x20emulated/000500000c7f/OpenPGP\x20card\x20\x28User\x20PIN\x29/03
Skopírujte serializované id na neskoršie použitie:
$ ecryptfs-manager # This will show list option. Choose option "Add public key to keyring" # Choose pkcs11-helper # Enter the serialized ID of step 3 to PKCS#11 ID.
Prípadne skúste ESOSI alebo postupujte podľa týchto krokov pomocou OpenSC a OpenVPN.
Zdroj príručky: https://www.nitrokey.com/documentation/applications#a:hard-disk-encryption