From: dawn.howe at alten.com
To: tpm2@lists.01.org
Subject: [tpm2] Re: Ecrypting and decrypting a file using a TPM2
Date: Wed, 15 Jun 2022 19:29:28 +0000 [thread overview]
Message-ID: <20220615192928.1682.44443@ml01.vlan13.01.org> (raw)
In-Reply-To: 20220615152121.213AA4F3@centrum.cz
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Petr:
Thanks so much for the suggestion. I was able to encrypt and decrypt my files based on the pattern in https://github.com/tpm2-software/tpm2-openssl/blob/master/test/cipher_aes128_cbc.sh. I think I can accomplish what I want with some system calls to openssl.
The code I'm writing is in C++. Is there a way to replace the system call to openssl with a c++ library call (perhaps that takes a provider parameter)?
i.e. Replace the following with a C++ library call
openssl enc -provider tpm2 -aes128 -e -K $KEY -iv $IV -in testdata -out testdata.enc
I'd love to see a code sample if you have one.
thanks,
Dawn
next reply other threads:[~2022-06-15 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 19:29 dawn.howe [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-16 15:42 [tpm2] Re: Ecrypting and decrypting a file using a TPM2 Petr Gotthard
2022-06-15 13:21 Petr Gotthard
2022-06-15 0:27 Steven Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220615192928.1682.44443@ml01.vlan13.01.org \
--to=tpm2@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox