<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><base href="x-msg://222/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 3 Jul 2013, at 21:34, Eric Goodman &lt;<a href="mailto:Eric.Goodman@ucop.edu">Eric.Goodman@ucop.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 11pt; ">This is not a Shibboleth question but a more general SAML/metadata one. I’m working with a (non-Shib) IdP integrated with a (non-Shib) SP and was getting errors encrypting assertions.</span></div></div></div></blockquote><div><br></div><div>As Scott mentioned in his reply, I don't think we were aware of other implementations which were making any kind of attempt to use this metadata. &nbsp;So if you were prepared to let us know which non-Shib IdP and SP you were talking about in each case, that would probably be good information to have for the future.</div><div><br></div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">In the IdP Metadata (the local metadata read by the IdP), the encryption key section contains:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in; ">&lt;md:EncryptionMethod Algorithm="<a href="http://www.w3.org/2001/04/xmlenc#aes128-cbc" style="color: purple; text-decoration: underline; ">http://www.w3.org/2001/04/xmlenc#aes128-cbc</a>"&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;xenc:KeySize xmlns:xenc="<a href="http://www.w3.org/2001/04/xmlenc#" style="color: purple; text-decoration: underline; ">http://www.w3.org/2001/04/xmlenc#</a>"&gt;128&lt;/xenc:KeySize&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in; ">&lt;/md:EncryptionMethod&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">In the SP-provided metadata (again, also loaded on the IdP side), it contains:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: 0.5in; ">&lt;md:EncryptionMethod Algorithm="<a href="http://www.w3.org/2001/04/xmlenc#aes128-cbc" style="color: purple; text-decoration: underline; ">http://www.w3.org/2001/04/xmlenc#aes128-cbc</a>" /&gt;<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">When trying to send an assertion between these two, I get “Data encryption algorithm and strength mismatch” errors. I was able to fix the error two different ways: (a) adding the 128 KeySize child element to the SP’s EncyptionMethod tag, or (b) removing the EncryptionMethod element altogether. Note that I did not change the SP’s actual configuration in any way, just edited my IdP’s local copy of the SP’s metadata.<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">My questions for the collective:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">1) Is this (declaring the encryption methods to be incompatible) correct or buggy behavior on the part of my IdP? (I can believe either answer)</div></div></div></blockquote><div><br></div><div>Notwithstanding Scott's observation that all this is less well defined than one might hope, I'd say this was clearly a bug on the IdP's part.</div><div><br></div><div>The SAML metadata spec punts to the XML Encryption spec for this, in which:</div><div><br></div><div><a href="http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod">http://www.w3.org/TR/xmlenc-core/#sec-EncryptionMethod</a></div><div><br></div><div><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); ">"The presence of any child element under&nbsp;</span><code style="background-color: rgb(255, 255, 255); ">EncryptionMethod</code><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); ">&nbsp;which is not permitted by the algorithm or the presence of a&nbsp;</span><code style="background-color: rgb(255, 255, 255); ">KeySize&nbsp;</code><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); ">child inconsistent with the algorithm MUST be treated as an error. (All algorithm URIs specified in this document imply a key size but this is not true in general. Most popular stream cipher algorithms take variable size keys.)"</span></div><div><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); "><br></span></div><div><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); ">Later, it defines the aes128-cbc algorithm ID described above. &nbsp;The example given omits the KeySize child element.</span></div><div><span style="font-family: sans-serif; background-color: rgb(255, 255, 255); "><br></span></div><div><font face="sans-serif">It seems to me fairly clear from this that the intention of the XML Encryption spec is that for an algorithm whose key size is fixed, such as this one, that an explicit key size &nbsp;child element MAY appear as long as it has the correct value, but that it is optional and if omitted the key size is to be implied from the algorithm.</font></div><div><font face="sans-serif"><br></font></div><div><font face="sans-serif">In other words, the XML Encryption specification thinks those two algorithm specifiers mean the same thing, and the IdP is incorrect in requiring an explicit KeySize when the algorithm identifier implies a fixed key size.</font><span style="font-family: sans-serif; ">&nbsp;</span><span style="font-family: sans-serif; ">&nbsp;"Encrypt using 128-bit AES in Cipher Block Chaining mode" implies a 128-bit key.</span></div><div><br></div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; ">2) Given that I don’t see any entries in the InCommon Metadata that contain an EncryptionMethod element, I’d guess that best practice is to just omit these entries from metadata. Are there any reasons to include this information?</div></div></div></blockquote><div><br></div><div>In the long term, we need EncryptionMethod in SP metadata so that IdPs can be more agile in the algorithms they use. &nbsp;They allow an SP to signal support for encryption methods with more security (Galois/Counter Mode in particular) or explicitly signal *lack* of support for weak methods.</div><div><br></div><div>One reason most federations don't publish EncryptionMethod today is that we weren't aware of implementations using it. &nbsp;Another is that some very old software (which no-one should be running any more) falls over when it's present. &nbsp;The UK federation, for example, collects this information when it's provided during registrations but at the moment filters it out before publication.</div><div><br></div></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>-- Ian<br></div><div><br></div></span></span></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-tab-span" style="white-space: pre; "><br class="Apple-interchange-newline">        </span>-- Ian<br></div><div><span class="Apple-style-span" style="font-size: medium; "><br></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></body></html>