TPM implementation for device authentication