TPM2 (Trusted Platform Module) userspace development
 help / color / mirror / Atom feed
From: Munson, Charles - 0553 - MITLL <Charles.Munson at ll.mit.edu>
To: tpm2@lists.01.org
Subject: [tpm2] tpm2-tools AK authorization question
Date: Tue, 05 Feb 2019 23:35:43 +0000	[thread overview]
Message-ID: <3c447329edc3414092b36c75f12c1c36@ll.mit.edu> (raw)

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

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_ActivateCr
edential_Finish() Received TPM Error 

ERROR:esys:src/tss2-esys/api/Esys_ActivateCredential.c:127:Esys_ActivateCred
ential() 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. 

 

Best,

Charlie 

 


[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3952 bytes --]

[-- Attachment #3: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5491 bytes --]

             reply	other threads:[~2019-02-05 23:35 UTC|newest]

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

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=3c447329edc3414092b36c75f12c1c36@ll.mit.edu \
    --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