Menu

Change security algorithm of TPM

Virender
2022-06-20
2022-07-25
  • Virender

    Virender - 2022-06-20

    Hi, I am new to this. Want to work on improving security in TPM for IoT (for educational purpose). it will be a great help if i could get sequence of steps to install SW TPM2.0 for Windows 10 or Ubuntu. I am getting huge dependencies and then some fatal error in Ubuntu.

     
    • Ken Goldman

      Ken Goldman - 2022-06-20

      It would help if you posted the steps that lead to the failure. The error message would also be useful.

       
  • Virender

    Virender - 2022-06-21

    Thank you for the prompt response.
    While installing in Ubuntu, i am getting the error "ibmtss1.6.0/utils/cryptoutils.c:93: multiple definition of `tssUtilsVerbose';" (please see the screenshot attached).

     
    • Ken Goldman

      Ken Goldman - 2022-06-21

      I see. This is the TSS (the host side middleware) not the TPM. A few things to try: * Make sure you have the latest code. * Try makefiletpm20 if you don't need TPM 1.2 * Older Ubuntu used a different linker. Try uncommenting the makefile line here:

      This seems to be required on some Ubuntu distros due to an issue with the gold linker
      -fuse-ld=bfd

       
      • Ken Goldman

        Ken Goldman - 2022-06-21

        Right, you're on the TSS page. If you're new, install the TSS and the TPM, and experiment with the TSS command line utilities. The regtest directory has sample scripts for common use cases.

        I just tried the TSS 1.6.0 with Ubuntu 22.04 Jammy. For older Ubuntu, you may need the linker fix in the makefile.

         
  • Virender

    Virender - 2022-06-22

    Sure will try this and let you know. You are a great help.

     
  • Virender

    Virender - 2022-07-22

    Hi Ken Goldman,
    I am still getting the same error in TSS1.6.0 with Ubuntu 22.04.
    There is some issue with the external variable "tssUtilsVerbose" in the following files:
    ../utils/cryptoutils.c (line 93)
    ../utils12/nvreadvalueauth.c (line 56-57)

    Regtest scripts also not running (I think, due to above error). please check the attached screenshot.

     
  • Ken Goldman

    Ken Goldman - 2022-07-22

    Lets go back about 2 steps. You're in the TPM 2.0 (not TSS) project, trying to compile a TPM 1.2 TSS and running at TSS 2.0 regression test.

    What are you actually trying to do?

    Regarding the screen shot - yes, if the compile fails, the executables are not there, so the regression test fails.

     
  • Virender

    Virender - 2022-07-25

    Dear Ken,
    Research is when nobody (including the self) has any idea about what is being done (pun intended).
    Now seriously, I really appreciate and feel grateful to your prompt and clear reply.
    Though, I am provided with a well documented package yet I don't know where I am doing wrong. So let me tell you all the steps clearly:

    ibmtss1.6.0 :
    cd utils
    make -f makefiletpmc Executes successfully

    cd utils12
    make -f makefiletpmc Conflict in "tssUtilsVerbose" as discussed above. Since, i want tpm 2.0, so I think utils12 will not be required. So, I proceed with remaining commands.

    Example 1:
    autoreconf -i gives warning as shown in attached file

    ./configure --prefix=${HOME}/local --disable-hwtpm
    make clean
    make
    make install Executes successfully

    Example 2: Skipped I think, it's about hardware TPM.
    Example 3: Executes successfully with warning for autoreconf -i just as in Example 1.

    ibmtpm1682:
    cd .../ibmtpm1682/src
    make Executes successfully

    Now while trying to run the regtest scripts, getting the same results. Please check the attached file.

    Dear Ken Goldman, I want to replace symmetric key encryption (AES) with my algorithm and see if I can improve its performance with limited IoT computing resources. It will be really helpful if you can suggest me which part/document of the TPM2.0 should I go for and what should I avoid.

     
    • Ken Goldman

      Ken Goldman - 2022-07-25

      The autoreconf warning is evidently Ubuntu flagging an obsolete check. Ignore it.

      The regression test is 'reg.sh' It looks like you tried to run one of the subroutines directly. Run from reg.sh. See doc section 7.3.

      The regression test defaults to using the commands in /utils. Is e.g., the 'powerup' command there? It may be that utils is not in your path.

      Alternatively, you can run from the installed commands (prefixed by tss), but you have to edit reg.sh. See the comments in the file and section 8.4.

       
  • Ken Goldman

    Ken Goldman - 2022-07-25

    For the application question.

    1. You should be aware that the HW TPM will not do general purpose AES crypto. This is due to export controls.
    2. The SW TPM command is TPM2_EncryptDecrypt2. It uses the algorithm of the loaded keyHandle. If you create that key, it will do AES. See the testaes.sh script for examples.
      It will not work on a commercial HW TPM.
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.