<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:tahoma,new york,times,serif;font-size:10pt"><div>Hi Mike,<br><br>It appears that I'm wrong about being able to get the same encrypted output as you for PKCS1 v1.5 RSA encryption.<br>When using the public key to do encryption, that are some pseudorandom bytes added to the padding.<br>I was able to get the CMK back from decrypting yours and mine encrypted values using the same private key.<br><br><br>So the examples are correct.<br><br><br>-- Edmund<br><br><br><br><br></div><div style="font-family:tahoma, new york, times, serif;font-size:10pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Mike Jones <Michael.Jones@microsoft.com><br><b><span style="font-weight: bold;">To:</span></b>
 "openid-connect-interop@googlegroups.com" <openid-connect-interop@googlegroups.com>; Emmanuel Raviart <emmanuel@raviart.com>; Brian Campbell <bcampbell@pingidentity.com>; Axel Nennker <Axel.Nennker@telekom.de><br><b><span style="font-weight: bold;">Cc:</span></b> "openid-specs-ab@lists.openid.net" <openid-specs-ab@lists.openid.net><br><b><span style="font-weight: bold;">Sent:</span></b> Wed, September 5, 2012 9:32:41 PM<br><b><span style="font-weight: bold;">Subject:</span></b> RE: Updated JWE encryption examples<br></font><br>

 
 
<style><!--
 
 _filtered {font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
 
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri", "sans-serif";}
a:link, span.MsoHyperlink
        {
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {

margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma", "sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri", "sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {

margin-right:0in;

margin-left:0in;
font-size:10.0pt;
font-family:"Times New Roman", "serif";}
span.emailstyle18
        {
font-family:"Calibri", "sans-serif";
color:windowtext;}
span.emailstyle19
        {
font-family:"Calibri", "sans-serif";
color:#002060;}
span.EmailStyle21
        {
font-family:"Calibri", "sans-serif";
color:#1F497D;}
span.BalloonTextChar
        {


font-family:"Tahoma", "sans-serif";}
.MsoChpDefault
        {
font-size:10.0pt;}
 _filtered {
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {}
--></style>


<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D;">Were you able to get the same encrypted key value for the example at
<a rel="nofollow" target="_blank" href="http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-05#appendix-A.2">
http://tools.ietf.org/html/draft-ietf-jose-json-web-encryption-05#appendix-A.2</a>?  If so, then we should figure out why your encrypted key value is different for the new example.</span></p> 
<p class="MsoNormal"><span style="color:#1F497D;">  </span></p> 
<p class="MsoNormal"><span style="color:#1F497D;">                                                            -- Mike</span></p> 
<p class="MsoNormal"><span style="color:#1F497D;">  </span></p> 
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;">
<p class="MsoNormal"><b><span style="font-size:10.0pt;">From:</span></b><span style="font-size:10.0pt;"> openid-connect-interop@googlegroups.com [mailto:openid-connect-interop@googlegroups.com]
<b>On Behalf Of </b>Edmund Jay<br>
<b>Sent:</b> Wednesday, September 05, 2012 12:24 PM<br>
<b>To:</b> openid-connect-interop@googlegroups.com; Emmanuel Raviart; Brian Campbell; Axel Nennker<br>
<b>Cc:</b> openid-connect-interop@googlegroups.com; openid-specs-ab@lists.openid.net<br>
<b>Subject:</b> Re: Updated JWE encryption examples</span></p> 
</div>
</div>
<p class="MsoNormal">  </p> 
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;"><span style="font-size:10.0pt;">Hi Mike,<br>
<br>
I've got the following results with your examples :<br>
<br>
JWE.log :<br>
<br>
I'm unable to get the same encrypted key using either the private or public part of the given key. However, I am able to decrypt your encrypted key with no problem. Since it's only using PCKS1-v1_5, I believe I should be able to get the same encrypted key value.<br>
<br>
The CEK and CIK and ciphertext results are the same.<br>
<br>
Using your encrypted key gives me the same results for the integrity value.<br>
<br>
<br>
JWE2.log :<br>
<br>
Due to the RSA-OAEP algorithm, I can only perform decryption on your encrypted key. The decrypted value matches your CMK.<br>
Using your AAD, the I was able to successfully decrypt and verify your data.<br>
<br>
-- Edmund<br>
<br>
<br>
<br>
<br>
</span></p> 
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;">  </span></p> 
<div>
<div class="MsoNormal" style="text-align:center;" align="center"><span style="font-size:10.0pt;">
<hr align="center" size="1" width="100%">
</span></div>
<p class="MsoNormal" style="margin-bottom:12.0pt;"><b><span style="font-size:10.0pt;">From:</span></b><span style="font-size:10.0pt;"> Mike Jones <<a rel="nofollow" ymailto="mailto:Michael.Jones@microsoft.com" target="_blank" href="mailto:Michael.Jones@microsoft.com">Michael.Jones@microsoft.com</a>><br>
<b>To:</b> Edmund Jay <<a rel="nofollow" ymailto="mailto:ejay@mgi1.com" target="_blank" href="mailto:ejay@mgi1.com">ejay@mgi1.com</a>>; Emmanuel Raviart <<a rel="nofollow" ymailto="mailto:emmanuel@raviart.com" target="_blank" href="mailto:emmanuel@raviart.com">emmanuel@raviart.com</a>>; Brian Campbell <<a rel="nofollow" ymailto="mailto:bcampbell@pingidentity.com" target="_blank" href="mailto:bcampbell@pingidentity.com">bcampbell@pingidentity.com</a>>; Axel Nennker
 <<a rel="nofollow" ymailto="mailto:Axel.Nennker@telekom.de" target="_blank" href="mailto:Axel.Nennker@telekom.de">Axel.Nennker@telekom.de</a>><br>
<b>Cc:</b> "<a rel="nofollow" ymailto="mailto:openid-connect-interop@googlegroups.com" target="_blank" href="mailto:openid-connect-interop@googlegroups.com">openid-connect-interop@googlegroups.com</a>" <<a rel="nofollow" ymailto="mailto:openid-connect-interop@googlegroups.com" target="_blank" href="mailto:openid-connect-interop@googlegroups.com">openid-connect-interop@googlegroups.com</a>>; "<a rel="nofollow" ymailto="mailto:openid-specs-ab@lists.openid.net" target="_blank" href="mailto:openid-specs-ab@lists.openid.net">openid-specs-ab@lists.openid.net</a>"
 <<a rel="nofollow" ymailto="mailto:openid-specs-ab@lists.openid.net" target="_blank" href="mailto:openid-specs-ab@lists.openid.net">openid-specs-ab@lists.openid.net</a>><br>
<b>Sent:</b> Tue, September 4, 2012 11:56:28 AM<br>
<b>Subject:</b> Re: Updated JWE encryption examples</span><span style="font-size:12.0pt;"></span></p> 
<div>
<p class="MsoNormal"><span style="color:#002060;">Have any of you tried decrypting these updated examples?  I plan on using them in the next release of the JWE spec, but would like confirmation that they’re correct.</span></p> 
<p class="MsoNormal"><span style="color:#002060;"> </span></p> 
<p class="MsoNormal"><span style="color:#002060;">                                                                Thanks again,</span></p> 
<p class="MsoNormal"><span style="color:#002060;">                                                                -- Mike</span></p> 
<p class="MsoNormal"><span style="color:#002060;"> </span></p> 
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;">
<p class="MsoNormal"><b><span style="font-size:10.0pt;">From:</span></b><span style="font-size:10.0pt;">
<a rel="nofollow" ymailto="mailto:openid-connect-interop@googlegroups.com" target="_blank" href="mailto:openid-connect-interop@googlegroups.com">openid-connect-interop@googlegroups.com</a>
<a rel="nofollow" ymailto="mailto:[mailto:openid-connect-interop@googlegroups.com]" target="_blank" href="mailto:[mailto:openid-connect-interop@googlegroups.com]">[mailto:openid-connect-interop@googlegroups.com]</a>
<b>On Behalf Of </b>Mike Jones<br>
<b>Sent:</b> Wednesday, August 29, 2012 10:12 PM<br>
<b>To:</b> Edmund Jay; Emmanuel Raviart; Brian Campbell; Axel Nennker<br>
<b>Cc:</b> <a rel="nofollow" ymailto="mailto:openid-connect-interop@googlegroups.com" target="_blank" href="mailto:openid-connect-interop@googlegroups.com">openid-connect-interop@googlegroups.com</a>;
<a rel="nofollow" ymailto="mailto:openid-specs-ab@lists.openid.net" target="_blank" href="mailto:openid-specs-ab@lists.openid.net">openid-specs-ab@lists.openid.net</a><br>
<b>Subject:</b> Updated JWE encryption examples</span></p> 
</div>
</div>
<p class="MsoNormal"> </p> 
<p class="MsoNormal">Here’s updated encryption examples incorporating the proposed JWE/JWA changes.  In summary, changes in these computations are:</p> 
<p class="MsoListParagraph"><span style="font-family:Symbol;">·</span><span style="font-size:7.0pt;">        </span><span style="font-size:7.0pt;font-family:Symbol;">
</span>Updated the Concat KDF calculation, per yesterday’s e-mail</p> 
<p class="MsoListParagraph"><span style="font-family:Symbol;">·</span><span style="font-size:7.0pt;">        </span><span style="font-size:7.0pt;font-family:Symbol;">
</span>Consolidated the “enc”, “int”, and “kdf” parameters into a composite “enc” parameter, with new AES CBC “enc” values
<span style="color:#1F497D;">“A128CBC+HS256” and “A256CBC+HS512”</span></p> 
<p class="MsoListParagraph"><span style="font-family:Symbol;">·</span><span style="font-size:7.0pt;">        </span><span style="font-size:7.0pt;font-family:Symbol;">
</span><span style="color:#1F497D;">Moved initialization vector out of the header into its own dot-separated parameter value (to save space and to factor it out for the JSON Serialization), with the JWE representation becoming header.encryptedKey.initializationVector.ciphertext.integrityValue</span></p> 
<p class="MsoNormal"> </p> 
<p class="MsoNormal">The examples attached are:</p> 
<p class="MsoListParagraph"><span style="font-family:Symbol;">·</span><span style="font-size:7.0pt;">        </span><span style="font-size:7.0pt;font-family:Symbol;">
</span>JWE.log:  Will be used to create the new AES-CBC example in Section 3.2 and Appendix A.2 of the JWE specification</p> 
<p class="MsoListParagraph"><span style="font-family:Symbol;">·</span><span style="font-size:7.0pt;">        </span><span style="font-size:7.0pt;font-family:Symbol;">
</span>JWE2.log:  Will be used to create the new AES-GCM example in Section 3.1 and Appendix A.1 of the JWE specification</p> 
<p class="MsoNormal"> </p> 
<p class="MsoNormal">It would be great if any of you can verify that you can decrypt these results!</p> 
<p class="MsoNormal"> </p> 
<p class="MsoNormal">                                                            Thanks again,</p> 
<p class="MsoNormal">                                                            -- Mike</p> 
<p class="MsoNormal"> </p> 
</div>
</div>
</div>
</div>
</div>


</div></div>



</div></body></html>