rust-tss-esapi icon indicating copy to clipboard operation
rust-tss-esapi copied to clipboard

Add AES encrypt/decrypt example

Open Firstyear opened this issue 1 year ago • 5 comments
trafficstars

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

Firstyear avatar Feb 04 '24 05:02 Firstyear

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".

Firstyear avatar Feb 04 '24 05:02 Firstyear

Have you forgot to sign the commits?

Superhepper avatar Apr 03 '24 18:04 Superhepper

Have you forgot to sign the commits?

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

Firstyear avatar Apr 03 '24 22:04 Firstyear

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 avatar May 01 '24 05:05 Firstyear

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

Firstyear avatar Jul 22 '24 02:07 Firstyear