parallaxsecond / rust-tss-esapi

TSS 2.0 Enhanced System API (ESAPI) Rust wrapper
https://docs.rs/tss-esapi/
Apache License 2.0
85 stars 51 forks source link

Add AES encrypt/decrypt example #492

Open Firstyear opened 7 months ago

Firstyear commented 7 months ago

This adds an example of how to use AES-128-CBC encryption and decryption with a TPM.

Firstyear commented 7 months ago

Please note there are two comments in the code that we should probably discuss. First is exposing the AES block size from the AesKeyBits enum. The second is if we should add pkcs7 padding to the crate to prevent people from "rolling their own".

Superhepper commented 5 months ago

Have you forgot to sign the commits?

Firstyear commented 5 months ago

Have you forgot to sign the commits?

Very likely :) But it wasn't ready to merge yet either.

Firstyear commented 4 months ago

Okay, I've rebased an updated to latest main. I think that pkcs7/padding is "out of scope" for this crate, and I'm going to make an example of exposing the TPM via rust-crypto interfaces so we can inherit their padding options. I'll hopefully have this example "converted" shortly as a POC.

Firstyear commented 1 month ago

This has finally come up again so I should be looping back to improve this shortly :)