Trusted platform module (TPM) is a secure element that can be used to securely generate and store keys. It has many possible uses, one of which is encryption of sensitive data. This article describes how to use TPM and tpm-tools package on Linux environment to encrypt different types of data, how to encrypt filesystem partitions and how to bind the encryption with device state.