I've uplifted tpm2-tpmkey [1] to address quirks of the TPM policy command encoding in the ASN.1 [2] spec.
It has quite short errata now: TPM2_PolicyAuthorize returns InvalidPolicy (which will be addressed some day). Other than that it addresses empty policies, special handling for TPM2_PolicySecret and other weirdness.
Plus, has 'parentPublic" extension, which enables implict and automatic parent key discovery.
Other than this crate is decoupled from all crypto libraries, other than pem crate and implementing encoder and decoder with rasn. I
Lot's of stuff have been piled, so it needs boil for a while after all these changes but now it is at least in the ballpark.
[1]
https://docs.rs/tpm2-tpmkey/latest/tpm2_tpmkey/[2]
https://www.hansenpartnership.com/draft-bottomley-tpm2-keys.txt