Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Full Disk Encryption (LAPTOP users only)

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
83 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next

Do you use full disk encryption on your laptop/portable?

Poll ended at Sat Oct 22, 2022 8:01 pm

Yes, and it has AES-NI extensions, encryption accelerator, or the like.
9
47%
Yes, and it does not have special instructions for encryption.
3
16%
No, it's too much overhead
4
21%
No, too much work to set up
2
11%
No, I don't have a portable machine to get stolen.
1
5%
 
Total votes: 19
Your vote has been cast.

Author
Message
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Aug 27, 2022 3:02 pm

If you do not have a backup mechanism for opening the drive, yes. I was looking only at the perspective of enabling unattended boot. For recovery in the event of a drive failure, you would also want to have a separate copy of the key file (preferably stored off site), or have the drive also accept a password you memorize.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Aug 29, 2022 3:48 am

Anyone actually do this? :D

What do people do for servers in this case, assuming the main reason for encryption is for ensuring used drives do not contain recoverable data? Or do they just bite the bullet and password or keep a USB key with the encryption key on it (and eat the USB key if it fails... which isn't too bad as a 8MB USB key will be plenty big)?

I figure that for the server theft paranoia case, 2FA is needed (password protection with key on another drive) or perhaps password is sufficient, just that automated boot won't be possible.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
steve_v
Guru
Guru
Posts: 445
Joined: Sun Jun 20, 2004 7:39 am
Location: New Zealand

  • Quote

Post by steve_v » Mon Aug 29, 2022 4:28 am

eccerr0r wrote:eat the USB key
For the record, micro-SD cards (in a USB-key reader perhaps) are much easier to chew. They also taste like chicken.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Top
pa4wdh
Veteran
Veteran
Posts: 1015
Joined: Fri Dec 16, 2005 6:55 pm

  • Quote

Post by pa4wdh » Mon Aug 29, 2022 6:16 am

eccerr0r wrote: What do people do for servers in this case, assuming the main reason for encryption is for ensuring used drives do not contain recoverable data? Or do they just bite the bullet and password or keep a USB key with the encryption key on it (and eat the USB key if it fails... which isn't too bad as a 8MB USB key will be plenty big)?
My server is partially encrypted. The regular root is unencrypted so it can boot unattended. Nothing useful runs there, other stuff runs in containers which use encrypted lv's for storage.

For the encryption i use LUKS and a keyfile. The keyfile is password protected and stored on a Corsair PadLock2 USB stick with a 9-digit PIN. The stick is actually 8GB but i use just a few KB.
As an emergency backup i also have the keyfile printed in base64 format including a hash for the full file and for every line (and a small script to generate them) so it easier to spot/correct errors (which will be there when you manually type base64 :) ). This backup is in my car, so not physically close to the server. And yes, i did try the emergency procedure :)
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

My shared code repository: https://code.pa4wdh.nl.eu.org
Music, Free as in Freedom: https://www.jamendo.com
Top
Leonardo.b
Guru
Guru
Posts: 314
Joined: Sat Oct 10, 2020 9:24 pm

  • Quote

Post by Leonardo.b » Mon Aug 29, 2022 10:02 am

On my laptop I have an encrypted partition for my personal files. I might do full disk encryption out of simplicity, but I never bothered to change.

I think USB pendrive have some magnetic component inside.
If you eat magnets, they may stick together inside your body, stuck somewhere, and kill you.
I don't raccomand this.
To eat an SD card should be much safer, IMHO.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Mon Aug 29, 2022 3:44 pm

Hu wrote:One compromise approach for servers would be that the server has Full Disk Encryption for all the regular Linux data filesystems, and each drive has one unencrypted partition containing the keys for drives other than itself. Then any one drive in isolation cannot be used to recover data, but given an encrypted drive and its key-holding partner, the encrypted drive can be unlocked unattended. This guards against the warranty replacement / failed drive scenario decently well, assuming you only ever have one drive fail at a time. It provides no protection if the server is stolen in full.
One more security based argument in favor of separate file systems. I find it sad that decision makers have used the original need of disk space to side-step the security advantage of separate file systems.

eccerr0r wrote:What do people do for servers in this case, assuming the main reason for encryption is for ensuring used drives do not contain recoverable data?
Unrelated to disk security, I have seen web servers that required a password / passphrase to continue booting.
Quis separabit? Quo animo?
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Fri Sep 02, 2022 2:50 am

pjp wrote:Unrelated to disk security, I have seen web servers that required a password / passphrase to continue booting.
I do recall this issue when I first tried setting up an SSL server. I recall SSL keys should be password protected...hence leading to require a password to start webservers. Of course subsequently this really isn't always necessary, but then FDE might be helpful...

... which then leads me to wonder, yes I really should encrypt all my disks regardless of portability, not for physical theft but rather for what happens to the disk when I dispose of them due to their demise... Alas this will require me to upgrade my computing infrastructure first to AES capable machines, so I don't see this happening anytime soon. There will be a few machines that will have it that I don't need its compute bandwidth.

What would be nice if there was a low cost block cipher that still could provide some challenge to a passerby but does not need to be "military grade"...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Fri Sep 02, 2022 10:51 am

a low cost block cipher that still could provide some challenge to a passerby but does not need to be "military grade"
Somehow this brought XXTEA, Rumba and Salsa to my mind. Maybe chacha...

Those use xor and rotations, which are 1-step operations in any cpu. AFAIR aes uses s-boxes too, which are very fast in hardware, but slow down software implementations.
Some of those are implemented in linux kernel too.
I haven't tried them, but could do the trick.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Fri Sep 02, 2022 11:22 am

was looking at some cryptsetup benchmark results and they are all very similar, except if you have AES-NI instructions then AES is much faster... Would be nice if there was one that was significantly faster, but I suppose the algorithms presented are all "military grade" (thought some were candidates for AES?) so that doesn't help much.

BTW when saying 1-step, it's one step per byte (unless when possibly using sse/mmx and of course aes-ni instructions) so it's still multiplied out by the number of bytes being worked with, and the cache misses caused by the extra code and the key that the cipher needs to constantly check...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Sep 02, 2022 1:49 pm

eccerr0r wrote:... which then leads me to wonder, yes I really should encrypt all my disks regardless of portability, not for physical theft but rather for what happens to the disk when I dispose of them due to their demise... Alas this will require me to upgrade my computing infrastructure first to AES capable machines, so I don't see this happening anytime soon.
You might be better off planning to not use encryption, but to physically destroy the drive when you are ready to dispose of it. If it leaves your house in small enough pieces, it's unlikely anyone will salvage even unencrypted data from it. This obviously voids any hope at a warranty return, but if you are keeping hardware long enough that you still have AES-free machines, you are probably beyond the warranty period anyway.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Fri Sep 02, 2022 2:00 pm

Alas I view objects as want not - waste not. I know there are people out there that enjoy destroying things to little pieces, including using these things as target practice, etc. While some of these devices do get so old that their value is near zero, it's not exactly zero - even with the device nonfunctional. I'd be happy to give people drive heads or spindle motor or circuit board they could use to salvage another drive - as long as they don't try to recover my data on the disk.

There's still a nice chunk of high grade aluminum (the chassis -- how many beer cans could you make with a 3.5" disk chassis?) and neodymium "rare earth metals" in the drive, which are still valuable as long as it's not contaminated by mixing with other stuff like the steel cover. People can have the drive for recycling, as long as the data on the drive cannot be recovered.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Sep 02, 2022 3:28 pm

In that case, you would need to disassemble the drive yourself and hand out the non-data portions to deserving recipients, but retain the platters for destruction - or just retain them until they become so old that any data on them is no longer relevant to anyone.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Sat Sep 03, 2022 12:25 am

Maybe the first time I see any indication of the drive will fail soon...encrypt it.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
skiwarz
Apprentice
Apprentice
Posts: 297
Joined: Sun Feb 23, 2014 7:56 am

  • Quote

Post by skiwarz » Sat Sep 03, 2022 3:34 am

eccerr0r wrote:Maybe the first time I see any indication of the drive will fail soon...encrypt it.
That works for spinning disks, but what about SSDs?
Top
dbtx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Jan 20, 2020 5:31 am
Contact:
Contact dbtx
Website

  • Quote

Post by dbtx » Sat Sep 03, 2022 7:25 am

pa4wdh wrote:For those that do any kind of ecncryption: Be aware that sleep functions of laptops make it useless. The encryption keys are in memory and are either kept there or are even written to disk in case of suspend-to-disk. Both of them defeat the purpose of FDE.
The fork at https://github.com/Heavenser/bliss-initramfs fixed the original's inability to resume from hibernation onto encrypted swap. It apparently wasn't even a major undertaking; it only needed to not be overlooked.

For a long time I used it in a banged-up Toshiba Satellite from 2009 with only 2 core 2GHz Athlon II M300, 4GB DDR2, and spinny rust. The en/decryption overhead didn't seem to make everything noticeably worse; bloat, especially modern WWW bloat, did that.
quasi-religious systemic wrongism pessimizes indiscriminately
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Sat Sep 03, 2022 6:38 pm

SSDs I'm not sure about what to do. Luckily most of the SSDs I have already expired their warranties so I have to eat them when they die.

Also, fortunately, SSDs have zero valuable components when they die, unlike hard drives...

---

As for an Athlon II x2, funny, I also set up a box specifically with a cryptoroot over RAID. Yes I feel a bit of sluggishness when I use it, but it's not nearly as bad as the Celeron 1200. The Athlon II is a significantly faster machine, however; though probably my expectations from the Athlon cryptoroot is just to exceed that of the Celeron 1200, which is not very hard to do...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
sublogic
Guru
Guru
User avatar
Posts: 390
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

  • Quote

Post by sublogic » Sun Sep 04, 2022 12:47 am

dbtx wrote:
pa4wdh wrote:For those that do any kind of ecncryption: Be aware that sleep functions of laptops make it useless. The encryption keys are in memory and are either kept there or are even written to disk in case of suspend-to-disk. Both of them defeat the purpose of FDE.
The fork at https://github.com/Heavenser/bliss-initramfs fixed the original's inability to resume from hibernation onto encrypted swap. It apparently wasn't even a major undertaking; it only needed to not be overlooked.
Thanks for the pointer. bliss-initramfs looks lighter than genkernel.

(For the record, genkernel handles resuming from encrypted swap as well. It scans logical volumes, opens the crypt_root, and scans LVs again. If you gave a "resume=" option pointing to a swap on an encrypted LV it just works.)
Top
dbtx
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 122
Joined: Mon Jan 20, 2020 5:31 am
Contact:
Contact dbtx
Website

  • Quote

Post by dbtx » Sun Sep 04, 2022 8:31 am

sublogic wrote:(For the record, genkernel handles resuming from encrypted swap as well. It scans logical volumes, opens the crypt_root, and scans LVs again. If you gave a "resume=" option pointing to a swap on an encrypted LV it just works.)
I think that was why I was looking at genkernel some years ago, but I found that fork and was able to keep using bliss. IIRC the dealbreaker was that genkernel apparently didn't and doesn't support using a detached LUKS header embedded in the initrd. Now that I think of it again, it probably wouldn't be insanely difficult to add.
quasi-religious systemic wrongism pessimizes indiscriminately
Top
sublogic
Guru
Guru
User avatar
Posts: 390
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

  • Quote

Post by sublogic » Sun Sep 04, 2022 11:29 pm

dbtx wrote:[ ... ] IIRC the dealbreaker was that genkernel apparently didn't and doesn't support using a detached LUKS header embedded in the initrd. Now that I think of it again, it probably wouldn't be insanely difficult to add.
That's correct. I don't see any support for detached headers.

The genkernel /init is a little . . . convoluted, for my use case. But It does what I need.
Top
forrestfunk81
Guru
Guru
User avatar
Posts: 567
Joined: Tue Feb 07, 2006 12:33 pm
Location: münchen.de

  • Quote

Post by forrestfunk81 » Wed Oct 12, 2022 11:56 am

Using encrypted disks on my machines since almost 15 years now. And I never had significant performance issues.

Some years ago I started moving my EFI partition with kernels and initramfs to USB. That adds a second factor to the authentication (besides the encryption password).

My only machine without full disk encryption is a virtual server. I thought about setting up an initramfs with basic network support and sshd to decrypt the disk. I will probably do it next time when switching to a bigger storage.
# cd /pub/
# more beer
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Wed Oct 12, 2022 2:13 pm

I haven't tried FDE with my AES-NI capable machines but my core2 machines do hide the additional CPU consumption a bit, but indeed I can feel the slowdown if I'm streaming bytes to/from the disk. All earlier machines it's a huge performance hit (my 1.2GHz P3 (Celeron) is significantly impeded by the encryption).

One of my laptops does support AES-NI and is a candidate for FDE though Win7 would not be very compatible with cryptsetup... however my SSD would not like it as it depends on compression for speed and reducing blocks written.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
SiberianSniper
Guru
Guru
User avatar
Posts: 384
Joined: Thu Apr 06, 2006 3:00 am
Location: Dayton, OH, USA

  • Quote

Post by SiberianSniper » Thu Oct 13, 2022 4:40 pm

My laptop has AES-NI and the encryption layer overhead hasn't been noticeable to me. Sure, it's a "portable workstation", but I'm not running anything too crazy on in.

The setup I use is *almost* FDE. The /boot partition is unencrypted, and I have a custom ramdisk to show a motd, set the keyboard rate (it sometimes registers key presses double if I don't), ask for the decryption passphrase, and run nyancat if it's entered incorrectly three times. The remainder of the drive is all one / partition on luks. I have a second drive for more user data, and it has two luks passphrases, one being a random-data file stored in /root so it can be mounted automatically, the other being one I know in case the first drive fails. This might not be the perfect setup, but it was pretty straightforward to build and has been more than adequate for me for the last few years.
Top
xgivolari
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Mon Jul 26, 2021 6:55 pm

  • Quote

Post by xgivolari » Thu Oct 13, 2022 11:44 pm

Secure Boot + Unified Kernel / Initramfs image measured into the TPM + LUKS FDE with AES-NI + kernel lockdown because why not :D Although at the moment, the TPM decrypts my disk automatically at boot if the value of PCR 0 + 7 matches because I'm too lazy to enter two passwords :mrgreen: I only use password-based decryption when I'm traveling or similar.
Top
duxsco
n00b
n00b
Posts: 45
Joined: Sat Jun 05, 2010 6:48 am

  • Quote

Post by duxsco » Sun Oct 23, 2022 9:32 pm

On my laptop, I use unified kernel images, secure boot, measured boot (systemd-cryptenroll with TPM 2.0 pin), FDE and btrfs/mdadm RAID.

My disk layout looks basically like:

Code: Select all

PC∕Laptop──────────────────────────┐
└── ∕dev∕sda                       └── ∕dev∕sdb
    ├── 1. EFI System Partition        ├── 1. EFI System Partition
    ├── 2. MDADM RAID 1                ├── 2. MDADM RAID 1
    │   └── LUKS                       │   └── LUKS
    │       └── Btrfs                  │       └── Btrfs
    │           └── rescue             │           └── rescue
    ├── 3. LUKS                        ├── 3. LUKS
    │   └── MDADM RAID 1               │   └── MDADM RAID 1
    │       └── SWAP                   │       └── SWAP
    └── 4. LUKS ("system" partition)   └── 4. LUKS ("system" partition)
        └── Btrfs raid1                    └── Btrfs raid1
            └── subvolume                      └── subvolume
                ├── @binpkgs                       ├── @binpkgs
                ├── @distfiles                     ├── @distfiles
                ├── @home                          ├── @home
                ├── @ebuilds                       ├── @ebuilds
                ├── @root                          ├── @root
                └── @var_tmp                       └── @var_tmp
Top
oxensepp
n00b
n00b
Posts: 52
Joined: Fri May 01, 2020 9:53 pm

  • Quote

Post by oxensepp » Tue Nov 15, 2022 12:23 am

For me, a unencrypted system is out of question.
Still using Sakaki's encryption setup on laptop and desktop.
I like the fact of needing the USB key AND a passphrase to decrypt the system. (have two USB keys so I can eat one and still boot the machine...)

Of course I noticed that the sakaki tools are long outdated. I am searching an alternative. Is there really nothing similar?
The gentoo handbook does not cover encryption at all, does it?
Top
Post Reply
  • Print view

83 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic