rust-tss-esapi
rust-tss-esapi copied to clipboard
Add AES encrypt/decrypt example
This adds an example of how to use AES-128-CBC encryption and decryption with a TPM.
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".
Have you forgot to sign the commits?
Have you forgot to sign the commits?
Very likely :) But it wasn't ready to merge yet either.
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.
This has finally come up again so I should be looping back to improve this shortly :)