You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using tags/sizing and reducing the number of nesting done
Add more default templates users can use. For more specific structs, such as tpmu.PublicParams adding all most commonly used would be nice to have for users. For broader structs like tpmt.Public, having examples to follow should suffice.
Add a way to pick common combinations of tpma.Object aside for manually setting true for each specific field.
The text was updated successfully, but these errors were encountered:
I don't think we should reduce the nesting. The value of this library is its 1:1-ness with the actual TPM spec, which is deeply nested. The spec makes it clear when you pass a TPM2B_X vs a TPMS_X and I think those types should be very clearly delineated from each other to avoid making people debug "there shouldn't have been a size prefix to my serialization but I accidentally got one" (and vice-versa) type issues.
That said, I think we can make these issues better using the other suggestions:
Default templates.
Add a way to pick common combinations
We should provide "standard" TPMU_PUBLIC_PARMS for various obvious cases (RSA signing/decryption, ECC signing decryption, sealed blob), and this will cut a huge chunk of the nesting out:
#300 had
#300 suggested a number of ideas here.
The text was updated successfully, but these errors were encountered: