DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] How to increase key size of existing volume
Date: Tue, 11 Dec 2012 17:34:07 +0100	[thread overview]
Message-ID: <20121211163407.GA2889@tansi.org> (raw)
In-Reply-To: <50C75290.1060003@logtenberg.eu>

On Tue, Dec 11, 2012 at 04:34:40PM +0100, Erik Logtenberg wrote:
> Hi Arno,
> 
> Thanks for your explanation. 

You are welcome.

> It is good to know that the 128 bit
> symmetric encryption key is still considered okay to some extent.

Until AES gets (real-world) broken, it will be secure. So not
only "to some extent" ;-)
 
> I did try the keylength site, and if I want my volume to be secure until
> roughly a decade after my projected demise, say 2100, then the adviced
> symmetric key size is already 135, 147 or 256 depending on the used
> method. So it'd still be somewhat better to increase the current 128 a bit.

There are no reliable forecasts for 2100. Even 30 years is highly
speculative. Brute-forcing 128 bits may not be possible even
in 2100, but AES may get broken. And, as I said, your passphrase
needs to be 128 bit as well (well, accounting for iteration, only
something like 110 bit, but that is still 22 random characters and 
letters). 
 
> > (you do have backup, right?).
> 
> Actually I am talking about my backup volume. And as such, it is quite a
> bit of data, that I don't have a (second) backup of. Neither do I have
> enough storage available to make an additional backup, nor the required
> amount of time, since a full copy/restore of such a volume would take weeks.

I see. My advice would be to get that second backup and just 
copy the primary backup over to it. 
 
> In fact, there seems to be a second use case for re-encrypting an
> existing volume. I read some articles explaining the possibility to use
> the luksDump command in conjunction with the --dump-master-key option on
> a mounted luks volume, to reset the password even if the current
> password is no longer known.
> Additionally, also the luksHeaderBackup command is available to extract
> the master key.

That does not help you to change the master key, and that is what 
you need to do if you want a longer one. A better passphrase 
can just be added (luksAddKey) and then the old one removed
(luksRemoveKey). But with this the master key and disk
encryption cipher stay the same.
 
> So there are at least two methods of extracting a master key. Now if I
> would suspect that a machine, that has a luks volume mounted, was
> compromised to the extent that someone had temporaryly gained root
> access, I would not only have to reset (all) passwords after fixing the
> security hole, but also I would have to create a new master key to be sure.

Yes. And new data, as the attacker had access to all of it.
Of course, that is usually not possible... 

> Is the cryptsetup-reencrypt tool also meant for that purpose?

In fact that would be its primary use. And the case does arise. 
Milan is a very careful developer/maintainer and would not have 
created a potentially unsafe tool like this otherwise.

Arno
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell

      parent reply	other threads:[~2012-12-11 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 14:46 [dm-crypt] How to increase key size of existing volume Erik Logtenberg
2012-12-11 15:09 ` Arno Wagner
2012-12-11 15:34   ` Erik Logtenberg
2012-12-11 15:48     ` Milan Broz
2012-12-11 16:34     ` Arno Wagner [this message]

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=20121211163407.GA2889@tansi.org \
    --to=arno@wagner.name \
    --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