<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Metze,<o:p></o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> 
  The SharedSecret used for AES session key computation, as described in 3.1.4.3
MS-NRPC , should be the NTOWF (MD4(UNICODE(Passwd))) of the plaintext password.
  The section 3.1.1 of MS-NRPC explains what a SharedSecret is used for session
key calculation in Windows implementations.  The SharedSecret  is stored in UnicodePwd
AD attribute.  Please see section 3.1.1 and Windows Behavior notes
&lt;66&gt;,&lt;67&gt; of MS-NRPC for details.  <o:p></o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> 
   I will continue working on all questions related to AES encryption.<o:p></o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>Thanks!<o:p></o:p></span></p>

<p class=MsoPlainText><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal>--------------------------------------------------------------------<o:p></o:p></p>

<p class=MsoNormal>Hongwei&nbsp; Sun - Sr. Support Escalation Engineer<o:p></o:p></p>

<p class=MsoNormal>DSC Protocol&nbsp; Team, Microsoft<o:p></o:p></p>

<p class=MsoNormal><a href="mailto:hongweis@microsoft.com"><span
style='color:blue'>hongweis@microsoft.com</span></a><o:p></o:p></p>

<p class=MsoNormal>Tel:&nbsp; 469-7757027 x 57027<o:p></o:p></p>

<p class=MsoNormal>---------------------------------------------------------------------<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><span style='color:black'><o:p>&nbsp;</o:p></span></p>

<p class=MsoPlainText>-----Original Message-----<o:p></o:p></p>

<p class=MsoPlainText>From: Stefan (metze) Metzmacher [mailto:metze@samba.org] <o:p></o:p></p>

<p class=MsoPlainText>Sent: Tuesday, August 25, 2009 11:13 AM<o:p></o:p></p>

<p class=MsoPlainText>To: Interoperability Documentation Help<o:p></o:p></p>

<p class=MsoPlainText>Cc: pfif@tridgell.net; cifs-protocol@samba.org<o:p></o:p></p>

<p class=MsoPlainText>Subject: MS-NRPC: AES Schannel problems<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Hi,<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I'm currently trying to implement the AES based Netlogon
Secure Channel in Samba.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>But the documentation is not really clear about the used
algorithms.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I have started with the implementation here:<o:p></o:p></p>

<p class=MsoPlainText>http://gitweb.samba.org/?p=metze/samba/wip.git;a=shortlog;h=refs/heads/master4-schannel<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>And here's the actual commit that tries to add aes support:<o:p></o:p></p>

<p class=MsoPlainText>http://gitweb.samba.org/?p=metze/samba/wip.git;a=commitdiff;h=50dca9ce0f051c863f00cc949db2c19bf247887b<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>In Section &quot;3.1.4.3 Session-Key Computation&quot;
the hmac-sha256 base computation of the session-key seems to use the plain
SharedSecret and not the NT-HASH of it (MD4(UNICODE(ShareSecret))), is that
correct?<o:p></o:p></p>

<p class=MsoPlainText>I thought the plain text is never stored in AD by
default...<o:p></o:p></p>

<p class=MsoPlainText>Where should the netlogon server get the plain text from?<o:p></o:p></p>

<p class=MsoPlainText>I just tried the NT-HASH see my
netlogon_creds_init_hmac_sha256() function.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>In Section &quot;3.1.4.4 Netlogon Credential
Computation&quot; there's a AesEncrypt function used. Can you please document
the exact algorithm that's used there. You say AES128 is used in CFB mode
without initialization vector.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation<o:p></o:p></p>

<p class=MsoPlainText>says that all modes except ECB require an IV.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>It would also be nice if you could add some more example
values in secion 4.2 Cryptographic Values for Session Key Validation.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>metze<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>