variable flen in *_rsa_priv_enc
carolin.latze at unifr.ch
Mon Feb 4 10:48:45 EST 2008
Jouni Malinen wrote:
> On Fri, Feb 01, 2008 at 04:41:12PM +0100, Carolin Latze wrote:
>> I am still working on the integration of the TPM into wpa_supplicant. At
>> the moment, I am wondering, why flen in the *_rsa_priv_enc is always 36
>> (at least in my scenario). From what I see in cryptoapi_rsa_priv_enc in
>> tls_openssl.c, wpa_supplicant also expects it to be 36 as this is 16
>> (MD5) + 20 (SHA-1), but why?
> The length is required to be 36 since only the standard RSA signing for
> TLS is supported (see RFC 2246, Chap. 4.7).
Oh yes, you are right.
>> I need an SHA-1 hash to sign using the TPM.
> What exactly are you signing? Are you using DSS instead of RSA signing?
No, but the TPM only supports signing of SHA-1 hashes till now (using
the RSA private key). From what I see in the RFC, the structure, that
will be signed consists of two 8 bytes fields and one 20 bytes SHA-1
hash. Furthermore, the RFC says "The contents of hash [the 20 bytes
SHA-1] are used as input for the signing algorithm, then the entire
structure is encrypted with a stream cipher.". So it should be possible
to sign the hash using the TPM and handle the rest outside the module.
Have to think of that...
More information about the HostAP