All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rahul Hardikar <rahulhardikar at gmail.com>
To: tpm2@lists.01.org
Subject: [tpm2] Re: ESys_ActivateCredential
Date: Mon, 16 Mar 2020 15:42:41 -0700	[thread overview]
Message-ID: <CAP3jAwTDkp+V7yLYipszy562ETNsnvTfXsDw35Lvi2C-9xeuSA@mail.gmail.com> (raw)
In-Reply-To: CAP3jAwSmMS_kGF_K2EgCxHxAG7XSR+Otj+0H+_eCcTkXR7pANw@mail.gmail.com

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

One last attempt...wondering if AK needs to be loaded in this case
Thread 1 in client .. creates EK and AK and sends to server
Server creates credential externally sends secret and credential blob
Thread 2 in client - Calls ActivateCredential (it has access to the global
ESYS_CONTEXT structures, ak_handles and ek_handles that thread 1 created)

Question: Are AK keys still present in the TPM? Will the ESAPI structures
still work even after few seconds or are they flushed?
I'm trying to understand why if I run all these methods in a single thread,
it works!

Thanks
Rahul

On Fri, Mar 13, 2020 at 10:22 AM Rahul Hardikar <rahulhardikar(a)gmail.com>
wrote:

> Any idea folks?
>
> On Thu, Mar 12, 2020 at 5:52 PM Rahul Hardikar <rahulhardikar(a)gmail.com>
> wrote:
>
>> I noticed the same changes when its run as a single process, the remote
>> attestation method works, the moment i move the make external credential
>> part to the server I hit this issue.
>> Wondering what could go wrong? Do the AK keys get flushed out?
>> On the client side, I have the EKCERT and EK and AK keys loaded in the
>> tpm2, I save the handle of EK and AK for future use when I receive the
>> credential blob and secret, so basically i fork out a thread to send the
>> data (and create EK/AK) and then fork another thread to handle the
>> receive part, but EK/AK handles are global and saved and no other process
>> touches the TPM!
>>
>> Why would I get 0x2c4 in Esys_ActivateCredential ()  but works perfectly
>> fine when everything is run as one thread?
>>
>> Thanks,
>> Rahul
>>
>> On Tue, Mar 10, 2020 at 4:22 PM Rahul Hardikar <rahulhardikar(a)gmail.com>
>> wrote:
>>
>>> Thanks Bill.
>>> Wondering why this would fail. The external make credential API,  I have
>>> taken from tss2 GitHub only why would secret fail? When I ran all of this
>>> locally it worked, the moment I moved the make external credential to the
>>> server Im hitting this?
>>> Can it be because of OpenSSL 1.1.0 required in tss2 and 1.0.2 version
>>> running on my server?
>>> Thanks
>>> Rahul
>>>
>>> On Tue, Mar 10, 2020 at 3:36 PM Roberts, William C <
>>> william.c.roberts(a)intel.com> wrote:
>>>
>>>> The error codes encode a bunch of values, so you won't see that value
>>>> via a straight grep.
>>>>
>>>> But you can use tpm2_rc_decode from the tpm2-tools project, like so:
>>>> $ tpm2_rc_decode 0x2c4
>>>> tpm:parameter(2):value is out of range or is not correct for the contex
>>>>
>>>> See the tools project:
>>>> https://github.com/tpm2-software/tpm2-tools
>>>>
>>>> Note that the commands specification will show you what parameter 2 is:
>>>>
>>>> https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-3-Commands-01.38.pdf
>>>>
>>>> Everything after the triple line starts the parameters starting at
>>>> index 1.
>>>> So in this case the secret parameter is wrong.
>>>>
>>>> Note that since TSS version 2.3.0 a software library was also added
>>>> for converting these return codes to more human understandable strings,
>>>> The header file is here:
>>>>
>>>> https://github.com/tpm2-software/tpm2-tss/blob/master/include/tss2/tss2_rc.h
>>>>
>>>> and then you just link against lib tss2-rc, just in case you needed
>>>> this built into
>>>> your program.
>>>>
>>>> Bill
>>>>
>>>> > -----Original Message-----
>>>> > From: Rahul Hardikar [mailto:rahulhardikar(a)gmail.com]
>>>> > Sent: Tuesday, March 10, 2020 5:02 PM
>>>> > To: tpm2(a)lists.01.org
>>>> > Subject: [tpm2] ESys_ActivateCredential
>>>> >
>>>> >
>>>> > Hi All,
>>>> > What does it mean when Esys_ActivateCredential returns 0x2c4? I don't
>>>> see this
>>>> > error defined anywhere.
>>>> >
>>>> > Thanks,
>>>> > Rahul
>>>>
>>>

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

             reply	other threads:[~2020-03-16 22:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 22:42 Rahul Hardikar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-04-16 21:37 [tpm2] Re: ESys_ActivateCredential Roberts, William C
2020-04-16 19:08 Rahul Hardikar
2020-04-16 17:34 Roberts, William C
2020-04-15 18:05 Rahul Hardikar
2020-04-15 15:25 Roberts, William C
2020-04-15 15:23 Roberts, William C
2020-04-13 23:54 Rahul Hardikar
2020-04-13 23:38 Rahul Hardikar
2020-04-13 19:31 Rahul Hardikar
2020-04-13 14:20 Roberts, William C
2020-04-10 21:15 Rahul Hardikar
2020-04-10 18:33 Roberts, William C
2020-04-10 18:07 Rahul Hardikar
2020-04-10 15:16 Roberts, William C
2020-04-09 19:50 Rahul Hardikar
2020-04-09 17:23 Roberts, William C
2020-04-09 16:17 Rahul Hardikar
2020-04-09  2:02 Rahul Hardikar
2020-03-17 13:20 Imran Desai
2020-03-17 13:06 Roberts, William C
2020-03-13 17:22 Rahul Hardikar
2020-03-13  0:52 Rahul Hardikar
2020-03-10 23:22 Rahul Hardikar
2020-03-10 22:36 Roberts, William C

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=CAP3jAwTDkp+V7yLYipszy562ETNsnvTfXsDw35Lvi2C-9xeuSA@mail.gmail.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.