[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-img create encryption

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] qemu-img create encryption
Date: Thu, 27 Jun 2013 10:36:16 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 26, 2013 at 02:52:51PM -0400, Hamilton, Peter A. wrote:
> I've been doing some work with qemu-img and encrypted qcow2 images and have
> noticed that "qemu-img create" does not prompt for a password to encrypt new
> images, defaulting (from the documentation I've read) to the empty string as
> a password. Why does "qemu-img create" work this way?
> I haven't been able to find any good, authoritative sources on this topic,
> so if anyone knows of good documentation or rationale, please let me know.

The qcow2 encryption format is very simple. The password you provide is
directly used to encrypt the data blocks. There is level on indirection
as you have with, say LUKS, whereby the user password is used to encrypt
a separate key in the file header. As such there is no need for the qcow2
encryption key to be known when creating a file, only when reading/writing
data blocks.

Using the password directly as the encryption key makes the qcow2 data
encryption very vulnerable to weak passwords. It also means you can't
change the password of an existing image - you have to create a new image
with a new password & re-encrypt the data. LUKS is a much stronger crypto
design that qcow2's built-in encryption. I'd like to see qemu gain a block
driver that could natively support the LUKS data format as a strong replacement
for qcow2's encryption approach, but there's no work in this area.

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]