HashAgile: expose the algorithm and the content#658
Conversation
d14caf0 to
1307816
Compare
|
missing clippy lints are fixed in #657, i'll rebase once that merges. |
|
Question: Is there any way to reverse the dependency, so that the abstraction stuff remains in the abstraction module, without making things very awkward? |
1307816 to
455334f
Compare
|
I've moved the implementation in |
455334f to
e66a968
Compare
|
Yeah, I think its fine. How would the use tss_esapi::{structures::HashAgile, abstractions::*};? Or can it be narrowed down? I mean if this is the case I still think it is reasonable. |
|
You don't need any You will need to enable |
There was a problem hiding this comment.
Pull request overview
This PR extends HashAgile to better support validating TPM-produced HMACs by exposing the hashing algorithm and providing a conversion helper for the digest when using RustCrypto.
Changes:
- Made
HashAgile’s internal fields crate-visible and added a publichashing_algorithm()accessor. - Added a RustCrypto-only
HashAgile::to_output()helper to convert the stored digest into adigest::Output<H>for a selected RustCrypto hash type.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tss-esapi/src/structures/hash/agile.rs |
Exposes the stored hashing algorithm via a new accessor and relaxes field visibility for internal use. |
tss-esapi/src/abstraction/hashing.rs |
Adds RustCrypto interoperability (to_output) for extracting HashAgile digest content as a typed RustCrypto output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This allows to verify an hmac signature emitted by a TPM. Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
e66a968 to
3cd67f9
Compare
This allows to verify an hmac signature emitted by a TPM.