Software-based TPM and MTM Emulator