parallaxsecond / parallaxsecond/rust-tss-esapi

Add missing ESAPI TPM commands

Open
#656 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
135
Forks
80
Avg merge
1d 17h
Merged PRs (30d)
5

Description

I here created this issue to track the implementation status of TPM 2.0 commands.

Currently, 80 of the 119 TPM commands have been implemented, while 39 remain unimplemented. The 38 functions, excluding the deprecated encrypt_decrypt() function, should be implemented.

Note that the *_Async and *_Finish functions are excluded.

Full list of the TPM commands

tcg_esapi_tpm_commands_rust_tss_esapi.ods

References
List of missing commands

The deprecated ESAPI Esys_EncryptDecrypt() is excluded.

  1. Esys_IncrementalSelfTest(): incremental_self_test() to testing.rs
  2. Esys_CreateLoaded(): create_load() to object_commands.rs (deprecated in v184)
  3. Esys_Rewrap(): rewrap() to duplication_commands.rs
  4. Esys_MAC(): mac() to symmetric_primitives.rs
  5. Esys_MAC_Start(): mac_start() to hash_hmac_event_sequences.rs
  6. Esys_EventSequenceComplete(): event_sequence_complete() to hash_hmac_event_sequences.rs
  7. Esys_SetCommandCodeAuditStatus(): set_command_audit_status() to command_audit.rs
  8. Esys_PCR_Event(): pcr_event() to integrity_collection_pcr.rs
  9. Esys_PCR_Allocate(): pcr_allocate() to integrity_collection_pcr.rs
  10. Esys_PCR_SetAuthPolicy(): pcr_set_auth_policy() to integrity_collection_pcr.rs
  11. Esys_PCR_SetAuthValue(): pcr_set_auth_value() to integrity_collection_pcr.rs
  12. Esys_PolicyTicket(): policy_ticket() to enhanced_authorization_ea_commands.rs
  13. Esys_PolicyNV(): policy_nv() to enhanced_authorization_ea_commands.rs
  14. Esys_PolicyCounterTimer(): policy_count_timer() to enhanced_authorization_ea_commands.rs
  15. Esys_HierarchyControl(): hierarchy_control() to hierarchy_commands.rs
  16. Esys_SetPrimaryPolicy(): set_primary_policy() to hierarchy_commands.rs
  17. Esys_ChangePPS(): change_pps() to hierarchy_commands.rs
  18. Esys_ChangeEPS(): change_eps() to hierarchy_commands.rs
  19. Esys_DictionaryAttackLockReset(): dictionary_attack_lock_reset() to dictionary_attack_functions.rs
  20. Esys_DictionaryAttackParameters(): dictionary_attack_parameter() to dictionary_attack_functions.rs
  21. Esys_PP_Commands(): pp_commands() to miscellaneous_management_functions.rs
  22. Esys_SetAlgorithmSet(): set_algorithm_set() to miscellaneous_management_functions.rs
  23. Esys_FieldUpgradeStart(): field_upgrade_start() to field_upgrade.rs
  24. Esys_FieldUpgradeData(): field_upgrade_data() to field_upgrade.rs
  25. Esys_FirmwareRead(): firmware_read() to field_upgrade.rs
  26. Esys_ReadClock(): read_clock() to clocks_and_timers.rs
  27. Esys_ClockSet(): clock_set() to clocks_and_timers.rs
  28. Esys_ClockRateAdjust(): clock_rate_adjust() to clocks_and_timers.rs
  29. Esys_NV_SetBits(): nv_set_bits() to non_volatile_storage.rs
  30. Esys_NV_WriteLock(): nv_write_lock() to non_volatile_storage.rs
  31. Esys_NV_GlobalWriteLock(): global_write_lock() to non_volatile_storage.rs
  32. Esys_NV_ReadLock(): nv_read_lock() to to non_volatile_storage.rs
  33. Esys_NV_ChangeAuth(): nv_change_auth() to to non_volatile_storage.rs
  34. Esys_NV_Certify(): nv_certify() to non_volatile_storage.rs
  35. Esys_ACT_SetTimeout(): act_set_timeout() to authenticated_countdown_timer.rs
  36. Esys_AC_GetCapability(): get_capability() to attached_components.rs
  37. Esys_AC_Send(): ac_send() to attached_components.rs
  38. Esys_Policy_AC_SendSelect(): policy_ac_send_select() to attached_components.rs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing command implementations in the referenced Rust modules and comparing the unchecked commands with the TCG ESAPI and TPM 2.0 specifications. Focus on testing.rs, symmetric_primitives.rs, hash_hmac_event_sequences.rs, dictionary_attack_functions.rs, miscellaneous_management_functions.rs, field_upgrade.rs, authenticated_countdown_timer.rs, and attached_components.rs. Done means implementing every remaining non-deprecated command while excluding *_Async and *_Finish functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.