All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roberts, William C <william.c.roberts at intel.com>
To: tpm2@lists.01.org
Subject: Re: [tpm2] Conflicting TPM2 engines and storage formats
Date: Thu, 04 Oct 2018 10:58:17 +0000	[thread overview]
Message-ID: <476DC76E7D1DF2438D32BFADF679FC5649C4A673@ORSMSX106.amr.corp.intel.com> (raw)
In-Reply-To: 3bf2ba5655ca867b333e4da210c588be98691c7f.camel@infradead.org

[-- Attachment #1: Type: text/plain, Size: 3383 bytes --]



> -----Original Message-----
> From: tpm2 [mailto:tpm2-bounces(a)lists.01.org] On Behalf Of David Woodhouse
> Sent: Wednesday, October 3, 2018 7:06 AM
> To: James Bottomley <James.Bottomley(a)Hansenpartnership.com>; Fuchs,
> Andreas <andreas.fuchs(a)sit.fraunhofer.de>; tpm2(a)lists.01.org; Nikos
> Mavrogiannopoulos <n.mavrogiannopoulos(a)gmail.com>
> Subject: Re: [tpm2] Conflicting TPM2 engines and storage formats
> 
> On Wed, 2018-10-03 at 13:00 +0200, James Bottomley wrote:
> > On October 3, 2018 12:47:15 PM CEST, David Woodhouse
> <dwmw2(a)infradead.org> wrote:
> > > On Wed, 2018-10-03 at 12:40 +0200, James Bottomley wrote:
> > > > > --- a/src/tpm2-tss-engine-common.h
> > > > > +++ b/src/tpm2-tss-engine-common.h
> > > > > @@ -55,8 +55,7 @@ TSS2_RC init_tpm_key(ESYS_CONTEXT **ctx,
> > > > > ESYS_TR *keyHandle,
> > > > >          .objectAttributes = (TPMA_OBJECT_USERWITHAUTH | \
> > > > >                               TPMA_OBJECT_RESTRICTED | \
> > > > >                               TPMA_OBJECT_DECRYPT | \
> > > > > -                             TPMA_OBJECT_FIXEDTPM | \
> > > > > -                             TPMA_OBJECT_FIXEDPARENT | \
> > > > > +                             TPMA_OBJECT_NODA | \
> > > >
> > > > This is the only troubling change, the rest looks fine to me.  The
> > > > template for a TPM created key *must* contain those two flags.
> > > > NODA
> > >
> > > is
> > > > one of those things which should be specified on the command line
> > > > rather than hard coded as well.  So to be exact, you need an extra
> > > > command line flag for whether or not you want TPMA_OBJECT_NODA
> > > > (some keys would like DA protection, especially private VPN ones,
> > > > but the creator of the key should ultimately decide) and if you
> > > > have a TPM create key you need TPMA_OBJECT_FIXEDTPM and
> > > > TPMA_OBJECT_FIXEDPARENT but if you're wrapping an existing key they
> have to be clear.

You could rip off the attribute parsing code from tpm2-tools if you wanted, lets you do things like:
--<option-name> 'restricted|decrypt|ficedtpm|noda'

Granted, it's not the most user-friendly if all you care about is toggling noda, but it is
flexible.

> > >
> > > This is for generating the primary key. It looks like your code
> > > always sets NODA, but *not* FIXEDTPM and FIXEDPARENT.
> > >
> > > The tpm2-tss engine does set FIXEDTPM and FIXEDPARENT, but not NODA.
> > >
> > > As noted, the above patch comes from blindly making tpm2-tss-engine
> > > look like your code, without even looking at what the flags mean :)
> > >
> > > I don't see why you set NODA on the primary key which has no auth
> > > anyway, and you seem to be saying that the lack of FIXED{TPM,PARENT}
> > > on your side is also problematic?
> >
> > For createprimary, noda is correct because it has no password.  Let me
> > check the fixeds. The primary should have them.  I'm boarding in Paris
> > at the moment but will check in-flight.
> >
> > > Does that mean we should be changing your code to match what's in
> > > tpm2-tss-engine?
> >
> > I think for the fixeds yes but likely it doesn't matter for the
> > primary because it will be assumed.
> 
> Whether it's assumed or not, changing it does appear to change the resulting
> primary so that it can no longer unwrap the previously- wrapped keys.


             reply	other threads:[~2018-10-04 10:58 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 10:58 Roberts, William C [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-12 15:54 [tpm2] Conflicting TPM2 engines and storage formats Fuchs, Andreas
2018-10-12 15:19 David Woodhouse
2018-10-12  9:16 Fuchs, Andreas
2018-10-12  6:08 David Woodhouse
2018-10-12  5:55 David Woodhouse
2018-10-11 22:25 David Woodhouse
2018-10-11 20:15 David Woodhouse
2018-10-11 18:48 David Woodhouse
2018-10-11 18:40 David Woodhouse
2018-10-11 18:31 David Woodhouse
2018-10-11 18:07 David Woodhouse
2018-10-11 17:34 David Woodhouse
2018-10-11 15:41 Fuchs, Andreas
2018-10-08 10:15 David Woodhouse
2018-10-05 15:46 David Woodhouse
2018-10-05 15:34 Fuchs, Andreas
2018-10-05 15:31 David Woodhouse
2018-10-05 15:24 Fuchs, Andreas
2018-10-05 15:22 Fuchs, Andreas
2018-10-05 14:59 David Woodhouse
2018-10-05 14:36 Fuchs, Andreas
2018-10-05 11:59 David Woodhouse
2018-10-05 10:27 David Woodhouse
2018-10-05 10:19 Fuchs, Andreas
2018-10-05  9:44 Fuchs, Andreas
2018-10-04 16:17 David Woodhouse
2018-10-04 16:04 Fuchs, Andreas
2018-10-03 20:47 David Woodhouse
2018-10-03 11:06 David Woodhouse
2018-10-03 10:47 David Woodhouse
2018-10-03 10:35 David Woodhouse
2018-10-02 18:58 David Woodhouse
2018-10-02 17:21 Fuchs, Andreas
2018-10-02 17:18 Fuchs, Andreas
2018-10-02 16:38 David Woodhouse
2018-10-02 16:20 Fuchs, Andreas
2018-10-01 20:10 David Woodhouse

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=476DC76E7D1DF2438D32BFADF679FC5649C4A673@ORSMSX106.amr.corp.intel.com \
    --to=tpm2@lists.01.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.