Speichermedien Verschlüsseln mit LUKS Containern / Storage media encryption with LUKS containers (DE / EN)

in #deutsch3 years ago

(English Below / Englisch unten)

Speichermedien Verschlüsseln mit LUKS Containern

Wenn man auf einem Linux System verschlüsselte Dateisysteme Anlegen will ist das LUKS Format die erste Wahl. Da die grundlegenden Funktionen bereits im Linux Kernel enthalten sind zählt es heute zu den Standartverfahren für Datenverschlüsselung auf Linux Systemen. Für die Durchführung der Authentifizierung köennen Passwörter oder Key Files verwendet werden. Auf einem Debian System muss folgendes Packet Installiert werden um LUKS verwenden zu können:

apt-get install cryptsetup

Mit:

cryptsetup -s 512 luksFormat --type luks2 /dev/sdc1

wird das Device /dev/sdc1 als luksContainer eingerichtet.
ACHTUNG: Dabei werden alle vorher vorhandenen Daten Gelöscht.
Im Laufe der Einrichtung wird das Password bzw das KeyFile Abgefragt.

Der nun erstellte Luks Container kann nun mittels:

cryptsetup open /dev/sdc1 cryptroot

göffnet werden. Um darauf aber Daten speichern zu können muss erst ein Dateisystem erstellt werden. Daher geht es mit:

mkfs -t ext4 /dev/mapper/cryptroot

weiter. Jetzt kann dieses Dateisystem gemounted werden:

mount /dev/mapper/cryptroot

Danach ist der Zugriff wie auf jedes andere Medium auch möglich.
mittels:

umount /dev/mapper/cryptroot

kann das Dateisystem wieder ausgehängt werden.
Zu diesem Zeitpunkt sind die Zugangsdaten für den Zugriff auf diesen Stick noch auf dem System vorhanden. Um sicher zu sein das kein anderer Zugriff auf den Stick bekommt muss der Rechner ausgeschaltet oder:

cryptsetup close cryptroot

ausgeführt werden.


English Version

Storage media encryption with LUKS containers

If you want to create encrypted file systems on a Linux system, the LUKS format is the first choice. Since the basic functions are already included in the Linux kernel, it is one of the standard methods for data encryption on Linux systems today. For the authentication passwords or key files can be used. On a Debian system the following package must be installed to use LUKS:

apt-get install cryptsetup

Start with:

cryptsetup -s 512 luksFormat --type luks2 /dev/sdc1

the device /dev/sdc1 would be set up as luksContainer.
ATTENTION: All previously existing data will be deleted.
Further in the the setup the password or the KeyFile is requested.

The created luks container can now be used with:

cryptsetup open /dev/sdc1 cryptroot

can be opened. However, to be able to store data on it, a file system must be created. Therefore it goes on with:

mkfs -t ext4 /dev/mapper/cryptroot

now you can mount the File System.

mount /dev/mapper/cryptroot

After that, access is possible as to any other medium.
by means of:

umount /dev/mapper/cryptroot

the file system can be unmounted again.
At this time the access data for the access to this stick isstill available on the system. To be sure that no one else gets access to the stick, the computer must be switched off or you must execute:

cryptsetup close cryptroot

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 66149.24
ETH 3015.59
USDT 1.00
SBD 3.73