TPM2 (Trusted Platform Module) userspace development
 help / color / mirror / Atom feed
From: Joshua Lock <joshua.g.lock at linux.intel.com>
To: tpm2@lists.01.org
Subject: Re: [tpm2] tpm2-tools AK authorization question
Date: Thu, 07 Feb 2019 14:52:45 +0000	[thread overview]
Message-ID: <58e84c50-8cd1-6756-02ae-a19d2cd7875b@linux.intel.com> (raw)
In-Reply-To: 3c447329edc3414092b36c75f12c1c36@ll.mit.edu

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

Hi Charlie,

On 05/02/2019 23:35, Munson, Charles - 0553 - MITLL wrote:
> Hello,
> 
> I’m not sure if this is user error or an issue with one of the tools.   
> I am trying to do a createek -> createak -> makecredential -> 
> activatecredential workflow with the new ESAPI tools in master 
> (following the advice when used with a resource manager here: 
> https://github.com/tpm2-software/tpm2-tools/blob/master/man/tpm2_createak.1.md).  
> This seems to work well when there is no AK authorization set (when 
> performing createak), though fails with an “authorization HMAC check 
> failed“ error when setting an AK_AUTH.
> 
> So for instance (following the documentation):
> 
> tpm2_createek -c 0x81010001 -G rsa -p ek.pub
> 
> tpm2_createak -C 0x81010001 -k 0x81010002 -p ak.pub -n ak.name*-P "akpw"*
> 
> tpm2_makecredential -e ek.pub -s file_input_data.txt -n <ak.name here> 
> -o outcred.out
> 
> tpm2_activatecredential -c 0x81010002 -C 0x81010001 -f outcred.out -o 
> verify.out*-P "akpw"*
> 
> WARNING:esys:src/tss2-esys/api/Esys_ActivateCredential.c:342:Esys_ActivateCredential_Finish() 
> Received TPM Error
> 
> ERROR:esys:src/tss2-esys/api/Esys_ActivateCredential.c:127:Esys_ActivateCredential() 
> Esys Finish ErrorCode (0x0000098e)
> 
> ERROR: Esys_ActivateCredential(0x98E) - tpm:session(1):the authorization 
> HMAC check failed and DA counter incremented
> 
> ERROR: Unable to run tpm2_activatecredential
> 
> Note that by not using an AK_AUTH (removing all of the  -P "akpw" code) 
> that this works, and this example used to work pre-ESAPI.  Is this no 
> longer supported?  Everything seems to work fine still with tpm2_quote.

This is a bug introduced when I ported tpm2_activatecredential to use 
the ESAPI. I took a look and can't immediately see what the fix is, but 
I'm still trying to wrap my head around TPM sessions. I am working on a 
fix for this in tandem with some other session related changes in the tools.

Thanks,
Joshua

             reply	other threads:[~2019-02-07 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 14:52 Joshua Lock [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-02-05 23:35 [tpm2] tpm2-tools AK authorization question Munson, Charles - 0553 - MITLL

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=58e84c50-8cd1-6756-02ae-a19d2cd7875b@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox