From: Kevin Wolf <kwolf@redhat.com>
To: Maxim Levitsky <mlevitsk@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
qemu-block@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"John Snow" <jsnow@redhat.com>
Subject: Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management
Date: Tue, 10 Mar 2020 12:59:26 +0100 [thread overview]
Message-ID: <20200310115926.GC6926@linux.fritz.box> (raw)
In-Reply-To: <5f1390648d98ac52928985185522cb58f1bc7253.camel@redhat.com>
Am 10.03.2020 um 12:05 hat Maxim Levitsky geschrieben:
> On Tue, 2020-03-10 at 11:58 +0100, Max Reitz wrote:
> > On 08.03.20 16:18, Maxim Levitsky wrote:
> > > Next few patches will expose that functionality
> > > to the user.
> > >
> > > Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
> > > ---
> > > crypto/block-luks.c | 398 +++++++++++++++++++++++++++++++++++++++++++-
> > > qapi/crypto.json | 61 ++++++-
> > > 2 files changed, 455 insertions(+), 4 deletions(-)
> >
> > [...]
> >
> > > +##
> > > +# @QCryptoBlockAmendOptionsLUKS:
> > > +#
> > > +# This struct defines the update parameters that activate/de-activate set
> > > +# of keyslots
> > > +#
> > > +# @state: the desired state of the keyslots
> > > +#
> > > +# @new-secret: The ID of a QCryptoSecret object providing the password to be
> > > +# written into added active keyslots
> > > +#
> > > +# @old-secret: Optional (for deactivation only)
> > > +# If given will deactive all keyslots that
> > > +# match password located in QCryptoSecret with this ID
> > > +#
> > > +# @iter-time: Optional (for activation only)
> > > +# Number of milliseconds to spend in
> > > +# PBKDF passphrase processing for the newly activated keyslot.
> > > +# Currently defaults to 2000.
> > > +#
> > > +# @keyslot: Optional. ID of the keyslot to activate/deactivate.
> > > +# For keyslot activation, keyslot should not be active already
> > > +# (this is unsafe to update an active keyslot),
> > > +# but possible if 'force' parameter is given.
> > > +# If keyslot is not given, first free keyslot will be written.
> > > +#
> > > +# For keyslot deactivation, this parameter specifies the exact
> > > +# keyslot to deactivate
> > > +#
> > > +# @unlock-secret: Optional. The ID of a QCryptoSecret object providing the
> > > +# password to use to retrive current master key.
> > > +# Defaults to the same secret that was used to open the image
> >
> > So this matches Markus’ proposal except everything is flattened (because
> > we don’t support nested unions, AFAIU). Sounds OK to me. The only
> > difference is @unlock-secret, which did not appear in his proposal. Why
> > do we need it again?
>
> That a little undocumented hack that will disappear one day.
It is very much documented (just a few lines above this one), and even
if it weren't documented, that wouldn't make it an unstable ABI.
If you don't want to make it to become stable ABI, you either need to
drop it or it needs an x- prefix, and its documentation should specify
what prevents it from being a stable ABI.
> Its because the driver currently doesn't keep a copy of the master key,
> and instead only keeps ciper objects, often from outside libraries,
> and in theory these objects might even be implemented in hardware so that
> master key might be not in memory at all, so I kind of don't want yet
> to keep it in memory.
> Thus when doing the key management, I need to retrieve the master key again,
> similar to how it is done on image opening. I use the same secret as was used for opening,
> but in case the keys were changed already, that secret might not work anymore.
> Thus I added this parameter to specify basically the old password, which is reasonable
> when updating passwords.
> I usually omit this hack in the discussions as it is orthogonal to the rest of the API.
How will this requirement disappear one day?
Kevin
next prev parent reply other threads:[~2020-03-10 12:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-08 15:18 [PATCH v2 00/14] LUKS: encryption slot management using amend interface Maxim Levitsky
2020-03-08 15:18 ` [PATCH v2 01/14] qcrypto/core: add generic infrastructure for crypto options amendment Maxim Levitsky
2020-03-08 15:18 ` [PATCH v2 02/14] qcrypto/luks: implement encryption key management Maxim Levitsky
2020-03-10 10:58 ` Max Reitz
2020-03-10 11:05 ` Maxim Levitsky
2020-03-10 11:59 ` Kevin Wolf [this message]
2020-03-10 12:02 ` Maxim Levitsky
2020-03-11 12:55 ` Maxim Levitsky
2020-04-28 13:16 ` Daniel P. Berrangé
2020-05-03 8:55 ` Maxim Levitsky
2020-05-04 9:18 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 03/14] block/amend: add 'force' option Maxim Levitsky
2020-03-08 15:18 ` [PATCH v2 04/14] block/amend: separate amend and create options for qemu-img Maxim Levitsky
2020-04-28 15:03 ` Daniel P. Berrangé
2020-04-28 15:49 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 05/14] block/amend: refactor qcow2 amend options Maxim Levitsky
2020-04-28 15:51 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 06/14] block/crypto: rename two functions Maxim Levitsky
2020-03-08 15:18 ` [PATCH v2 07/14] block/crypto: implement the encryption key management Maxim Levitsky
2020-04-28 16:15 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 08/14] block/qcow2: extend qemu-img amend interface with crypto options Maxim Levitsky
2020-04-28 16:17 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 09/14] iotests: filter few more luks specific create options Maxim Levitsky
2020-04-28 16:19 ` Daniel P. Berrangé
2020-03-08 15:18 ` [PATCH v2 10/14] iotests: qemu-img tests for luks key management Maxim Levitsky
2020-04-28 16:21 ` Daniel P. Berrangé
2020-03-08 15:19 ` [PATCH v2 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command Maxim Levitsky
2020-04-28 16:25 ` Daniel P. Berrangé
2020-03-08 15:19 ` [PATCH v2 12/14] block/crypto: implement blockdev-amend Maxim Levitsky
2020-03-08 15:19 ` [PATCH v2 13/14] block/qcow2: " Maxim Levitsky
2020-03-08 15:19 ` [PATCH v2 14/14] iotests: add tests for blockdev-amend Maxim Levitsky
2020-04-28 16:23 ` Daniel P. Berrangé
2020-03-12 11:56 ` [PATCH v2 00/14] LUKS: encryption slot management using amend interface Eric Blake
2020-03-12 14:33 ` Maxim Levitsky
-- strict thread matches above, loose matches on Subject: below --
2020-01-30 17:29 Maxim Levitsky
2020-01-30 17:29 ` [PATCH v2 02/14] qcrypto/luks: implement encryption key management Maxim Levitsky
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=20200310115926.GC6926@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.