Change digest algorithm to sha256 for EncryptedKey

Cantor, Scott cantor.2 at osu.edu
Tue Apr 17 18:59:01 BST 2012


> Where I am struggling is that a digest algorithm of SHA1 is consistently being
> used for the EncryptedKey within the EncryptedAssertion, EncryptedID,
> despite the digestAlg setting within the shibboleth2.xml

That's a different use of digests. There is a lack of interop around the use of PKCS 2.0 padding with any other digest algorithm, and until recently it wasn't even supported by all the libraries. There's also a hardwired use of SHA1 inside the MGF, which is a requirement dictated by XML Encryption 1.0.

There are, from what I've been told, no security implications to the use of SHA-1 in either spot. XML Encryption 1.1 includes language opening up the MGF to other digests, mainly for the eventual possibility that SHA-1 breaks such that libraries stop including it, but it wasn't done for security.

> Is there any way to force this digest algorithm an SHA256 as well?  It seems to
> default to SHA1 regardless of value in digestAlg attribute.

No, there is no option for it. I don't recall if the APIs even allow for it on the encrypting end (I know mine don't, but I'm not sure Santuario's do either).

-- Scott



More information about the users mailing list