Cifrado de discos duros

Compatible Nitrokeys

3A/C/Mini

Passkey

HSM 2

Pro 2

FIDO2

Storage 2

Start

U2F

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:

  1. Instale la última versión de OpenSC, o descargue la biblioteca PKCS#11.

  2. Choose the library in VeraCrypt under Settings>Preferences>Security Token (location depends on system, e.g. /usr/lib/opensc).

  3. Generar un archivo de claves de 64 bytes a través de Herramientas>Generador de archivos de claves.

  4. 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).

  5. Después de esto, deberá borrar el archivo de claves original en su ordenador de forma segura.

  6. 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

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

  1. Crear un archivo de claves con datos aleatorios:

    $ dd bs=64 count=1 if=/dev/urandom of=keyfile
    
  2. Encripta el archivo de claves y utiliza el User-ID de tu Nitrokey

    $ gpg --encrypt keyfile
    
  3. Eliminar el archivo de claves en texto claro:

    $ rm keyfile # you may want to use 'wipe' or 'shred' to securely delete the keyfile
    
  4. Crear punto de montaje:

    $ mkdir ~/.cryptdir ~/cryptdir
    
  5. 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
    
  6. Desmonta el nuevo sistema de archivos:

    $ fusermount -u ~/cryptdir
    

Uso

  1. Monte el sistema de archivos encriptados e introduzca el PIN de Nitrokey:

    $ gpg -d keyfile.gpg | encfs -S ~/.cryptdir ~/cryptdir
    
  2. 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:

  1. 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
    
  2. Crea el archivo ~/.ecryptfsrc.pkcs11:

    $ editor ~/.ecryptfsrc.pkcs11
    
  3. 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
    
  4. 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