This tutorial is pretty much just a placeholder to show how future tutorials can be created here inside jekyll.

Stay put for future updates.

git clone
cd tpm2-tss
./configure --enable-integration
make -j$(nproc)
make check

Check out the tpm2-tss README and tpm2-tss INSTALL for more information.

After successful installation a standalone application using ESAPI can be compiled as follows:

gcc standalone-example.c -L=/usr/local/lib/ -ltss2-esys -o standalone-example

Simple example standalone application:

#include <stdlib.h>
#include <stdio.h>
#include <tss2/tss2_esys.h>

int main() {

    TSS2_RC r;

    /* Initialize the ESAPI context */
    ESYS_CONTEXT *ctx;
    r = Esys_Initialize(&ctx, NULL, NULL);

        if (r != TSS2_RC_SUCCESS){
        printf("\nError: Esys_Initializen\n");

    /* Get random data */
    TPM2B_DIGEST *random_bytes;
    r = Esys_GetRandom(ctx, ESYS_TR_NONE, ESYS_TR_NONE, ESYS_TR_NONE, 20,

    if (r != TSS2_RC_SUCCESS){
        printf("\nError: Esys_GetRandom\n");

    for (int i = 0; i < random_bytes->size; i++) {
        printf("0x%x ", random_bytes->buffer[i]);