DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Some questions about cryptsetup 1.6.x
Date: Wed, 12 Feb 2014 16:04:08 +0100	[thread overview]
Message-ID: <20140212150408.GA30523@citd.de> (raw)
In-Reply-To: <20140212141908.GA9017@tansi.org>

On 12.02.2014 15:19, Arno Wagner wrote:
> Hi,
> 
> > Next I'd like to ask about the memory management of the master key.
> > Suppose I mounted a volume using luksOpen (or --type luks open). What
> > happens when I invoke luksClose (close) on that container? Does the
> > master key get securely erased from memory (several overwrites with
> > random data) or is it simply blanked out (single overwrite with
> > zeros)?
> 
> That makes no difference for memory. For DRAM, it is refreshed to
> its actual setting periodically anyways, something like 10x...100x per
> second. For SRAM (caches, maybe small embedded use), overwriting with
> the same value has no effect.
> 
> You are confusing this with techniques to delete magnetic storage.

No.

The reports where that remanence (i'm using the term for magnetic 
storage. Don't know/remember if there is/was a specific term for DRAM) 
in DRAM is longer, the longer a specific value was in a specific cell.

That is for the attack:
- Switch of computer
- Rip out RAM (optionally cool them to extend the time further)
- Plug them into a device that dumps current memory contents

AFAIR the articles, the time varies between (milli-)seconds to minutes 
for cooled/non-cooled memory and also for "long term" vs. "short term" 
memory-contents. (So best-case is likely cooled & long term)


For e.g. loop-AES contains a mitigation for that. If you activate the 
option it holds 2 sets of keys in RAM. One is the "actual" key, the 
other one is (AFAIR) with it's bit inverted and then it bit-invertes and 
switches the sets in regular intervals. So that none of the 2 locations 
actually falls into the "long term" category. In the hope that when you 
switch of power (to memory) the keys fade fast enough to not be 
recoverable (or at least with sufficient severe loss of bits).


Cold-Boot is a slight variation of this, where you try to use the actual 
computer itself for the dump. You can (try to) mitigate using the 
computer for dumping the memory, so an attacker has to revert to "rip 
out". But if unsucessful the memory can be dumped with only a neglient 
amount of bit-loss. (You have to store & execute a programm in some way. 
So you have to overwrite at least a little bit of memory)

IIRC there was a description of a mitigation technique that "pin"s the 
key in L1 (and/or L2) cache without it being stored in RAM.
And an interesting question is, if AES-NI could be used as another 
mitigation technique.




-- 

Matthias

  parent reply	other threads:[~2014-02-12 15:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  9:49 [dm-crypt] Some questions about cryptsetup 1.6.x Cpp
2014-02-12 14:19 ` Arno Wagner
2014-02-12 14:30   ` Thomas Bächler
2014-02-12 15:59     ` Arno Wagner
2014-02-12 16:10     ` Milan Broz
2014-02-13  5:57       ` Arno Wagner
2014-02-12 15:04   ` Matthias Schniedermeyer [this message]
2014-02-12 15:57     ` Arno Wagner
2014-02-12 16:29       ` Matthias Schniedermeyer
2014-02-12 17:25         ` Arno Wagner
2014-02-12 16:20 ` Milan Broz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140212150408.GA30523@citd.de \
    --to=ms@citd.de \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox