<div dir="ltr"><div dir="ltr">Hi Todd,<div>     That is exactly what I am trying to do. The final goal is to implement this in hardware. Anyways I figured out that the key expansion routine is slightly different, more specifically the equivalent inverse cipher routine defined in: <a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf">https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf</a></div><div>     As per this the last 128 bits of the expanded key will be the key that I am looking for. I extracted that and was able to decrypt the message successfully.</div><div>     Thanks all the same.</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 16, 2018 at 12:19 AM Viktor Dukhovni <<a href="mailto:openssl-users@dukhovni.org">openssl-users@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> On Nov 15, 2018, at 9:30 AM, Short, Todd via openssl-users <<a href="mailto:openssl-users@openssl.org" target="_blank">openssl-users@openssl.org</a>> wrote:<br>
> <br>
> I have seen this done for hardware acceleration; where the crypto chip can do everything except the handshake.<br>
> (In fact, this mechanism protected at least one device that I know of from the Heartbleed debacle, since the hardware crypto did not understand the record type.)<br>
> <br>
> Look at how the kernel handles TLS, and how the keys are extracted from OpenSSL:<br>
> <br>
> <a href="https://github.com/torvalds/linux/blob/master/Documentation/networking/tls.txt" rel="noreferrer" target="_blank">https://github.com/torvalds/linux/blob/master/Documentation/networking/tls.txt</a><br>
> <a href="https://github.com/openssl/openssl/pull/5253" rel="noreferrer" target="_blank">https://github.com/openssl/openssl/pull/5253</a><br>
<br>
Well, it takes more than just extracting a key.  One also needs to know<br>
the cipher mode, and if not AEAD then the MAC algorithm and whether the<br>
EtM extension has been negotiated, and with TLS 1.3 be prepared to<br>
process keyUpdate messages, post handshake session tickets, ...<br>
<br>
-- <br>
        Viktor.<br>
<br>
-- <br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font color="#444444">Best Regards,</font><div><font color="#444444">Hemant Ranvir</font><br><br><font size="2"><font face="arial, helvetica, sans-serif" color="#444444"><i>"<span style="line-height:21px">To live a creative life, we must lose our fear of being wrong.</span></i></font><span style="color:rgb(136,136,136);line-height:21px"><font face="arial, helvetica, sans-serif"><i><font color="#444444">" - J.C.Pearce</font></i></font></span></font><br></div></div></div></div></div></div>