Menu

IBM's Software TPM 2.0 and TSS

Aym
2018-06-05
2018-06-07
  • Aym

    Aym - 2018-06-05

    m totally new to this,for education purposes i want to discover and undertand more about the TPM by interacting with it ( i dont have the hardware) so i want a software like , i found these two source codes by ibm which i don't know how to install or build on windows i'll be glad if you may help me on how to do that.

     
    • Ken Goldman

      Ken Goldman - 2018-06-05

      The TPM comes with ibmtpm. doc, which explains building on Windows using either Visual Studio or mingw. Try it and let me know if something is not clear.

      For exucation, I recommend the corresponding TSS at https://sourceforge.net/projects/ibmtpm20tss/. It has a full set of command line utilities, one per TPM command, so you can experiment without writing code.

      The TSS regression test script uses the comand line utilities, and it implements many typical use cases. So you can also learn about the TPM by reading the scripts and trying them. I teach courses that way.

      The TSS also comes with a Linux based browser GUI, so you can try a few basic tasks from a browser.

      Finally, if you want to write applications, the utilities provide sample code. Typically, I develop an application by first scripting with the utilities and then cut and paste from the utilities to form my application.

       
      • Aym

        Aym - 2018-06-05

        Does it work with bitlocker?

         

        Last edit: Aym 2018-06-05
  • Aym

    Aym - 2018-06-05

    Here is what i did :

    1- i untarred the file in B:\tpm using cygwin
    2-i installed openssl on C:\OpenSSL-Win32: (cp
    .../openssl/source/openssl-1.n.n/crypto/ec/ec_lcl.h c:/Program
    Files/OpenSSL/include/openssl
    ) i dont understand this from the doc
    3-I installed mingw with all packages C:\MinGW
    4- here i meet issues to build as i never worked with mingw:
    - from doc (> cd …tpm2\src > make -f makefile.mak) : cant find tpm2 file
    when i untarred the previous file.
    - mingw32-make.exe in bin directory :yes

    thanks for help

     

    Last edit: Aym 2018-06-05
    • Ken Goldman

      Ken Goldman - 2018-06-05

      1 - I don't use cygwin. I assume its tar works, but I use the gnu tools.
      2 - Please copy or move openssl to c:\program files\ That's the default for some installs, but shining light changed the default recently.
      The ec_ldl move was for a very old version of the TPM. I recommend using the newest version.
      4 - I think some old documentation assumed that the source went into a tpm2 top level directory. Just cd into whereever you untarred the source.

      But I do recommend getting the latest. Each new release tracks updates to the TPM specification.

       
  • Aym

    Aym - 2018-06-05

    Hi
    i got the newest version, and followed the same steps. this new version recommends to build (windows tbsi) which i dont know what it is.

    and this is what i get to build with windows gcc
    ` /cygdrive/b/tpm/utils
    $ make -f makefile.mak
    "c:/program files/mingw/bin/gcc.exe" -DTPM_WINDOWS -I. -I"c:/program files/MinGW/include" -I"c:/program files/openssl/include" -Wall -W -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wformat=2 -Wold-style-definition -Wno-self-assign -ggdb -O0 -c -DTPM_TPM20 tssfile.c
    make: *** [makefile.mak:141: tssfile.o] Error 1

    Doc instructions : https://www.dropbox.com/s/mixwsc472rct7ga/ibmtss.doc?dl=0
    `

     

    Last edit: Aym 2018-06-05
    • Ken Goldman

      Ken Goldman - 2018-06-05
      1. You're in a discussion group for the TPM 2.0, but I think you're building the TSS. But the previous note mentions the src directory, which is for the TPM. Let's first decide which code you're building, and then perhaps take the discussion to the TSS group if you're building the TSS.

      2. You didn't post the actual error. However, tssfile.o compiles for me with the same command line. Could cygwin be causing a problem? Could you try from a standard Windows shell and see if it works?

       
  • Aym

    Aym - 2018-06-05
    1. yes , sorry i copied the wrong erroro even though its the same with tpm2.0
      ` /cygdrive/b/tpm/src
      $ make -f makefile.mak
      "c:/program files/mingw/bin/gcc.exe" -Wall -Wnested-externs -ggdb -O0 -c -DTPM_WINDOWS -I"c:/program files/MinGW/include" -I"c:/program files/openssl/include" -I../utils -I. -DNO_BIT_FIELD_STRUCTURES AlgorithmCap.c -o AlgorithmCap.o
      make: *** [makefile.mak:85: AlgorithmCap.o] Error 1

    `
    2.i dont really know if its cygwin , i tried in cmd "make command isnt recognized even though make file do exist in src + the PATH points to C:\Program Files\MinGW\bin. but cmd compiles with gcc ang g++ which is strange
    cordially

     

    Last edit: Aym 2018-06-05
    • Ken Goldman

      Ken Goldman - 2018-06-06

      I think you should first get a build environment working. Try a simple hello world program and a simple makefile. Then come back to the TPM.

      If you want to use cygwin (which I don't recommend if you're just starting), is there a cygwin expert in your office.? If you want to use mingw and make, is there someone who can help you install them. It sounds like you don't even have make installed.

       
  • Aym

    Aym - 2018-06-06

    Hi
    i tried a simple program it compiles very well using gcc and g++ but make command doesnt work.
    im a student so ya im a newbie and there is no one to help though .
    make package are installed :)

     
    • Ken Goldman

      Ken Goldman - 2018-06-06

      As I suspected, the issue is with your install, independent of the TPM or TSS.

      1. What does "doesn't work" mean.
      2. If you insist on using cygwin, you need to find an expert to help you. I recommend not using cygwin. You may even have to uninstall it to get it out of the way.
      3. Where did you get make? Is it from cygwin? Try here: http://gnuwin32.sourceforge.net/
       
  • Aym

    Aym - 2018-06-06
    1. means that it doesnt compile when executed
    2. i uninstalled it
      3.yes i got make from cygwin
    3. i downloaded gnuwin32 , installed it, and fixed the path : same problem "make isnt recognized"
     
    • Ken Goldman

      Ken Goldman - 2018-06-07

      You should find some local support. This is a TPM list, and installing a C language build tool set is out of scope.
      1. Doesn't compile is not an error message.
      3. For a beginner, cygwin is not a good choice.
      4. Read up on search "PATH". and put the make executable in the path.

       
  • Aym

    Aym - 2018-06-07

    Hi. gimme an email i will send you screenshots
    cordially.

     
    • Ken Goldman

      Ken Goldman - 2018-06-07

      When you get to the TPM or TSS, I'm happy to support it. Installing a C language build tool set is out of scope for this discussion list.

       
  • Aym

    Aym - 2018-06-07

    Hi. Alright thanks for your help :)

     

Log in to post a comment.