Cifrado de discos duros¶
Compatible Nitrokeys |
|||||||
|---|---|---|---|---|---|---|---|
✓ active |
⨯ inactive |
✓ active |
✓ active |
⨯ inactive |
✓ active |
✓ active |
⨯ inactive |
VeraCrypt (antes TrueCrypt)¶
VeraCrypt es un software de cifrado de disco gratuito y de código abierto para Windows, macOS y GNU/Linux. Es el sucesor de TrueCrypt y, por tanto, se recomienda, aunque las siguientes instrucciones deberían aplicarse también a TrueCrypt.
Follow these steps to use the program with Nitrokey Storage 2 or Nitrokey Pro 2:
Instale la última versión de OpenSC, o descargue la biblioteca PKCS#11.
Choose the library in VeraCrypt under Settings>Preferences>Security Token (location depends on system, e.g.
/usr/lib/opensc).Generar un archivo de claves de 64 bytes a través de Herramientas>Generador de archivos de claves.
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).Después de esto, deberá borrar el archivo de claves original en su ordenador de forma segura.
Ahora puedes usar VeraCrypt con la Nitrokey: Crea un contenedor, elige el archivo de claves en el dispositivo como alternativa a una contraseña.
Advertencia
Consideraciones sobre la seguridad
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.
Cifrado de disco duro en Linux con LUKS/dm-crypt¶
Para configurar LUKS Disk Encryption siga nuestra guía:
Purism has created a simple script to add the Nitrokey/LibremKey as a way to unlock LUKS partitions (not tested by Nitrokey yet).
Este proyecto pretende facilitar el uso de LUKS con el Nitrokey Pro o el Storage basado en el Password Safe (no probado por Nitrokey todavía). Una descripción de cómo usarlo en Gentoo se puede encontrar aquí.
Para Arch Linux, véase initramfs-scencrypt.
Cifrado de almacenamiento en GNU+Linux con EncFS¶
Truco
Requisitos previos
Asegúrese de que ha instalado el controlador del dispositivo, ha cambiado los PINs por defecto y ha generado o importado claves con 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.
Inicialización¶
Crear un archivo de claves con datos aleatorios:
$ dd bs=64 count=1 if=/dev/urandom of=keyfile
Encripta el archivo de claves y utiliza el User-ID de tu Nitrokey
$ gpg --encrypt keyfile
Eliminar el archivo de claves en texto claro:
$ rm keyfile # you may want to use 'wipe' or 'shred' to securely delete the keyfile
Crear punto de montaje:
$ mkdir ~/.cryptdir ~/cryptdir
Crear la carpeta de encriptación real
$ gpg -d keyfile.gpg | encfs -S ~/.cryptdir ~/cryptdir # There may appears an error message about missing permission of fusermount # This message can be ignored
Desmonta el nuevo sistema de archivos:
$ fusermount -u ~/cryptdir
Uso¶
Monte el sistema de archivos encriptados e introduzca el PIN de Nitrokey:
$ gpg -d keyfile.gpg | encfs -S ~/.cryptdir ~/cryptdir
Después de su uso, desmonte el sistema de archivos:
$ fusermount -u ~/cryptdir
Cifrado de almacenamiento en Linux con ECryptFS¶
eCryptfs es un sistema de archivos de encriptación transparente basado en archivos para Linux que puede utilizarse con Nitrokey a través de un controlador PKCS#11.
Consulte estas instrucciones:
Importar el certificado y la clave a 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
Crea el archivo ~/.ecryptfsrc.pkcs11:
$ editor ~/.ecryptfsrc.pkcs11
Introduzca este contenido:
$ 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
Copiar el id serializado para su uso posterior:
$ 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.
Como alternativa, prueba ESOSI o sigue estos pasos usando OpenSC y OpenVPN.
Fuente de la guía: https://www.nitrokey.com/documentation/applications#a:hard-disk-encryption