All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Prepare SSD for encrypted linux install
@ 2017-11-08 17:36 Merlin Büge
  2017-11-08 18:45 ` Heinz Diehl
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Merlin Büge @ 2017-11-08 17:36 UTC (permalink / raw)
  To: dm-crypt

Hello all,


I want to use an SSD (Samsung 850 PRO 512GB) for a fully encrypted Linux
system. I've read the cryptsetup FAQ and various posts in the
internet and I'm familiar with the common problems/pitfalls regarding
dm-crypt on SSDs.

To avoid information leakage about the storage device's usage patterns,
it is generally recommended to fill the entire device with random data
before setting up encryption. It is also recommended to issue an 'ATA
secure erase' to SSDs before using it to avoid performance issues.

But doing these two things, either my (1) random data gets 'deleted' via
the (2) 'ATA secure erase' (the SSD will report all zeros), or I end up
with degraded performance when (1) issuing 'ATA secure erase' before
(2) putting random data on it.

I thought of TRIMing the SSD via 'blkdiscard' instead of using
'ATA secure erase' after putting random data on it (twice, see [0]),
but that should make no difference, since the SSD will most probably
report all zeros for TRIMed sectors. Either way, the flash chips will
contain all random data (making it impossible to distinguish encrypted
data from free space) but the drive controller will still report all
zeros for the entire SSD (making it possible to distinguish encrypted
data from free space).

(Note: I'm assuming that an 'ATA secure erase' does not actually empty
the flash cells, but merely changes the internal encryption key. I'm not
sure on this, but it doesn't really matter.)

Any solution/thoughts on this?


Regards,

Merlin



[0]
"Second, overwriting the entire visible address space of an SSD twice
is usually, but not always, sufficient to sanitize the drive."
https://www.usenix.org/legacy/events/fast11/tech/full_papers/Wei.pdf


-- 
Merlin Büge <toni@bluenox07.de>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-09 12:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 17:36 [dm-crypt] Prepare SSD for encrypted linux install Merlin Büge
2017-11-08 18:45 ` Heinz Diehl
2017-11-08 21:45 ` David Christensen
2017-11-09  0:34 ` Robert Nichols
2017-11-09 10:55   ` Arno Wagner
2017-11-09 11:05   ` Merlin Büge
2017-11-09 12:20     ` Arno Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.