#cryptsetup

Khurram Wadee ✅mkwadee@mastodon.org.uk
2025-04-07

My experience with #FlashDrives recently has been mixed. I have no problem in encrypting them with #LUKS, using #cryptsetup or with formatting a partition with #Btrfs, for instance, using #gparted and doing other tinkering with #Gnome #disks. But the problem has been with the actual drives themselves. The cheaper ones seem to have quite a few bad sectors, etc. and so they’re not really reliable for medium term storage.

1/2

#Hardware #StorageDevices #Unix #GNU #Linux #Fedora

2025-03-24

In case someone else is wondering why linux luks hard disk encryption is usually within a lvm container: that way you only need one password to unlock multiple partitions.

(found out the hard way)

#linux #cryptsetup #harddisk #encryption

Khurram Wadee ✅mkwadee@mastodon.org.uk
2025-03-05

So today I tired #mkfs.btrfs and this works. I was using #gparted, which can’t create #encrypted file systems and so I created a blank (cleared) one, used #cryptsetup to create the #encryption on the device, and then created the brtrfs file system.

#GNU #FreeSoftware

🚀 Несерьёзный Выдумщик 👨‍🔬 :bunhop:grumb@shitpost.poridge.club
2025-01-05

Зашифрованные флешки и переносные hdd, поддерживаются почти всеми линуксами «из коробки».

Если на windows’ах для работы с флешкой использовалось
#VeraCrypt или даже #TrueCrypt, то на linux-системах с этой же флешкой можно и через #cryptsetup работать. Без надобности устанавливать дополнительные приложения, сродни того же VeraCrypt.

Подключить целиком зашифрованную флешку:

sudo cryptsetup open --type tcrypt /dev/sdXY myconfidential


Будет запрос пароля для sudo и потом пароль для доступа к зашифрованному разделу. Содержимое доступно после монтирования:
sudo mkdir /mnt/secureflash
sudo mount /dev/mapper/myconfidential /mnt/secureflash


Несколько лет назад
#VeraCrypt пришло на замену #TrueCrypt, но поддержка старых контейнеров TrueCrypt’а имеется ещё везде.

Можно поставить удобства ради и VeraCrypt, кросс-платформенное, но если не установлено на машине с линуксом, то это и не проблема.

Прекращение работы с зашифрованным носителем данных:
размонтировать из файловой системы (записать все закешированное),
закрыть сам по себе крипто-контейнер.

Выполняется в две команды:
sudo umount /mnt/secureflash 
sudo cryptsetup close myconfidential 


Точнее в три команды, если удалять ставшим не нужным
/mnt/secureflash.

Когда непонятно под каким
/dev/sdXY числится флешка, то поможет: lsblk -f или что-то схожее, на вкус и цвет более подходящее.

#криптография #инфобез #infosec #linux #opensource

musicmatze :rust: :nixos:musicmatze@social.linux.pizza
2024-11-16

Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

That's what I am building for my new working machine.

Also WakeOnLan (via local network though).

:boost_ok: #followerpower

musicmatze :rust: :nixos:musicmatze@social.linux.pizza
2024-11-16

Does someone have a working #nixos setup where they decrypt their drive via #cryptsetup that they access remotely via #tailscale?

That's what I am building for my new working machine.

Also WakeOnLan (via local network though).

:boost_ok: #followerpower

2024-11-11

USBのケースに2.5インチHDDを?

?れて初期化しました.

LUKSで暗号化のためにCryptsetupを,透過圧縮,重複排除も使いたいということでBtrFSを利用しました.

[…]

https://matoken.org/blog/2024/11/12/initialize-usb-hdd-with-luks-btrfs/

2024-11-02

Восстановление данных с зашифрованного Linux тома с помощью cryptsetup

В этой статье мы разберем восстановление данных с зашифрованного с помощью LUKS тома NAS. Внимание : в самом худшем случае для восстановления данных этим способом потребуется свободное место равное двум объемам зашифрованного раздела. Например, если у вас есть зашифрованный раздел на 1 ТБ, то необходимо иметь 2 ТБ свободного места. В лучшем случае (незначительные повреждения) понадобится один объем свободного дискового пространства. Также обращаем внимание, что вам НУЖНО ЗНАТЬ пароль, который использовался для шифрования тома Для примера мы будем использовать диск от QNAP с зашифрованном разделом. 1. Подключаем диск от QNAP к компьютеру с помощью USB или SATA. После чего нужно любым доступным способом создать образ зашифрованного раздела. Для примера мы будем использовать программу Vолга. Выбираем раздел QNAP и начинаем создание образа. Мы советуем сохранить образ в формате .img (посекторный RAW образ) на любой внешний диск.

habr.com/ru/articles/855290/

#Шифрование #luks #cryptsetup #зашифрованный_раздел #восстановление_данных #расшифровка_данных

2024-10-07

#Fedora #Kinoite #Anaconda still has the same bug as half a year ago...

bugzilla.redhat.com/show_bug.c

Doing my "zygote" trick again, small install of Kinoite on a secondary SSD, cloning with #clonezilla, #btrfs resizing and balance, done.

Luckily I dont use that install much, and #cryptsetup allows to change the password.

#Linux just always finds a way!

2024-09-25

TIL: If you want to `cryptsetup open` a BitLocker encrypted drive using the recovery key (8 blocks of 6 digits each), make sure to enter it _with_ the dashes between each block of digits, else it won't be recognized.

#Linux #Windows #BitLocker #cryptsetup

Kagami is they/them 🏳️‍⚧️krosylight@fosstodon.org
2024-09-22

Dear fellow #linux #cryptsetup users, I need your assistance while I'm trying to encrypt my root partition:

The Arch Linux wiki (wiki.archlinux.org/title/Dm-cr) has some guide to first unmount and then shrink the partition before reencryption, but then it has a header saying "cryptsetup 2.2 using LUKS2 supports online encryption/decryption/reencryption". Does that mean I can skip the unmount and resize, and just run the reencrypt command when the OS is still running on that partition?

2024-09-03
Cryptsetup 2.7.5 stable version released
https://gitlab.com/cryptsetup/cryptsetup#download
It contains fixes for online reencryption (fix possible data corruption).

Release notes https://kernel.org/pub/linux/utils/cryptsetup/v2.7/v2.7.5-ReleaseNotes

#cryptsetup
Stuart Longland (VK4MSL)stuartl@longlandclan.id.au
2024-08-10

Had fun and games trying to unmount my work volume (a LUKS loopback device) today… `cryptsetup` telling me the device was in-use. (But it wasn't!)

As it happens, kernel namespaces can make things appear to be "in use" when they are not, and Gentoo's Portage uses namespaces to isolate the build process from the host system. Kill the build, and you'll be able to unmount and de-activate the encrypted volume.

forums.gentoo.org/viewtopic-p-

#Gentoo #LUKS #cryptsetup #namespaces

2024-07-30
Cryptsetup 2.7.4 stable version released
https://gitlab.com/cryptsetup/cryptsetup#download
It contains fixes for concurrent activation of devices and several fixes for issues detected by static analysis.

Release notes https://kernel.org/pub/linux/utils/cryptsetup/v2.7/v2.7.4-ReleaseNotes

#cryptsetup
2024-07-26

hey neat, Linux 6.10 improved disk encryption performance on my system by ~42% gist.github.com/lucaswerkmeist

#Linux #cryptsetup

2024-07-15

Quick guide on encrypting an external drive. Assuming the drive is at /dev/sda with a /dev/sda1 partition

Set up encrypted volume (-y for verifying the password)
# cryptsetup luksFormat -y -v /dev/sda1

Unlock the encrypted volume and create a mapping to /dev/mapper/DUDE
# cryptsetup luksOpen /dev/sda1 DUDE

Create a file system
# mkfs.ext4 /dev/mapper/DUDE

Mount the partition
# mkdir /mnt/DUDE
# mount /dev/mapper/DUDE /mnt/DUDE

#cryptsetup #FDE

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst