[dm-crypt] Prepare SSD for encrypted linux install

Arno Wagner arno at wagner.name
Thu Nov 9 11:55:26 CET 2017

On Thu, Nov 09, 2017 at 01:34:38 CET, Robert Nichols wrote:
> On 11/08/2017 11:36 AM, Merlin Büge wrote:
> >Hello all,
> >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 ...
> No, they won't.  They will all be cleared.  The whole point of TRIM or
> blkdiscard is to allow the controller to clear the blocks of flash cells
> so that they will be immediately available for writing when needed. 
> Writing random data to the flash cells and then immediately clearing them
> is fairly pointless.  All it does is mask any residue a cleared cell might
> have of the last data it contained.  People who need that level of
> security don't ask about it here.

And that is just it: To get any security benefit, the random
data must be still there on a read-back. 

Hence the procedure is exactly the same as for a HDD:
Write random data to disk and leave it there, no "secure" erase,
no TRIM.


Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier

More information about the dm-crypt mailing list