DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Logtenberg <erik@logtenberg.eu>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] How to increase key size of existing volume
Date: Tue, 11 Dec 2012 16:34:40 +0100	[thread overview]
Message-ID: <50C75290.1060003@logtenberg.eu> (raw)
In-Reply-To: <20121211150918.GB2194@tansi.org>

Hi Arno,

Thanks for your explanation. It is good to know that the 128 bit
symmetric encryption key is still considered okay 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.

> (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.

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.

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.

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

Thanks,

Erik.


On 12/11/2012 04:09 PM, Arno Wagner wrote:
> On Tue, Dec 11, 2012 at 03:46:19PM +0100, Erik Logtenberg wrote:
>> Dear list,
>>
>> I have been using luks for quite some time, and as a result I have
>> several luks volumes in use that are still based on 128 bits key sizes.
>> Current default in Fedora is already upped to 256 bits and RSA even
>> advices key sizes of 1024 or even 2048 for highly secure stuff.
> 
> You are confusing symmetric and assymetric keys here. 2048 bit
> asymmetric is (very roughly) equivalent to 128 bit symmetric.
> 
> Have a look here for currently recomended key sizes:
> 
>   http://www.keylength.com/
> 
> There is no idication that anybody can break 128 but AES
> at this time or in the next few decades. Your passphrase
> has likely a lot less entropy anyways and is the better
> target. 
>  
>> So, how do I increase the key size? In man cryptsetup I see that the
>> --key-size option only applies to the create, luksFormat and loopaesOpen
>> commands. Is there any way I can make this happen?
> 
> It is unnecessary. If you really want to, use your normal
> backup procedure, recreate a new LUKS volume and restore
> (you do have backup, right?). 
> 
> There is also a re-encryption in place tool by Milan, but that is 
> experimental and definitely requires a current backup.
> It is called "cryptsetup-reencrypt" and part of the source package
> as of version 1.5.0 (current version is 1.5.1).
> 
> Arno
> 

  reply	other threads:[~2012-12-11 15:34 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 [this message]
2012-12-11 15:48     ` Milan Broz
2012-12-11 16:34     ` Arno Wagner

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=50C75290.1060003@logtenberg.eu \
    --to=erik@logtenberg.eu \
    --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