9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] libsec tls extension: computation of session key?
@ 2005-08-12  8:21 Axel Belinfante
  0 siblings, 0 replies; only message in thread
From: Axel Belinfante @ 2005-08-12  8:21 UTC (permalink / raw)
  To: 9fans

the standard that describes the 802.1x eap-ttls method
discusses the computation of some 'keying material'
as result of the auth handshake.

this material is computed as:
   tls->sec->prf(resultBuf, resultLen,
                 tls->sec->sec, MasterSecretSize,
                 labelString,
                 tls->sec->crandom, RandomSize,
                 tls->sec->srandom, RandomSize );

where labelString is a string prescribed by the protocol,
and resultBuf is the buffer to be holding the result of resultLen.

Either we can expose all details necessary for the computation,
or we can just do the computation and only expose the result.
I have done the latter, by adding resultBuf, resultLen, and
labelString to the TLSconn struct, and doing above computation
(and only doing it if the resultbuf pointer is non-nil)
near the end of the tlsClient function.

Is this a reasonable way of doing this?
If so, should I just submit a patch? (for tlshand.c and libsec.h)

on a related note: there is a minor decoding error in tlshand.c,
in the HCertificateRequest; I'll submit a separate patch.
our universities's server seems to computing some lenth field
of the HCertificateRequest erroneously, I could work around 
that by slightly relaxing size checking of HCertificateRequest;
I'll submit a separate patch for that, I guess...

Axel.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-12  8:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-12  8:21 [9fans] libsec tls extension: computation of session key? Axel Belinfante

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).