to load matching private key and I think this is the only option. So,
unless you want to fiddle with tmpengine internals this is your only option.
the ENGINE_load_private_key function. I am probably missing something, so
The whole idea behind TPM that you not supposed to do that but there are
always exceptions. You may be able to extract private key from TPM if it
has MIGRATABLE and LEGACY attributes. And then export it and convert into
OpenSSL key.
There is also another option. You could use `tpmengine` with OpenSSL to
do what you need without violating security. I personally use this approach
but tpmengine requies the key to be created in a very specific way, so I
ended up modifying engine code to fit my requirements.
------------------------------
*Sent: *Thursday, March 24, 2016 3:16:06 AM
*Subject: *Re: [TrouSerS-users] Converting a TPM key into RSA struct
for OpenSSL
But this (assuming it works) will only create a public key. I want to use
the private key with OpenSSL.
Post by Tadd SeiffI only have a few minutes and can't guarantee this is complete or
tested, but maybe it will help.
All you really need is the modulus and exponent from the key. You get
tss_result = Tspi_GetAttribData(hBind_Key, TSS_TSPATTRIB_RSAKEY_INFO,
TSS_TSPATTRIB_KEYINFO_RSA_MODULUS, &m_size, &m);
tss_result = Tspi_GetAttribData(hBind_Key, TSS_TSPATTRIB_RSAKEY_INFO,
TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT, &e_size, &e);
RSA *rsa = RSA_new();
rsa->e = BN_bin2bn(e, e_size, rsa->e);
rsa->n = BN_bin2bn(m, m_size, rsa->n);
-Tadd
Post by eye two areHi, i am trying to convert a TPM key which i obtained from a particular
UUID into an RSA struct to be used with OpenSSL. Does anyone have any
example code on how to do it?
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
TrouSerS-users mailing list
https://lists.sourceforge.net/lists/listinfo/trousers-users
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
TrouSerS-users mailing list
https://lists.sourceforge.net/lists/listinfo/trousers-users