IDP 3.1 Wrong keysize

Brent Putman putmanb at georgetown.edu
Mon Mar 16 13:11:53 EDT 2015



On 3/15/15 11:04 PM, Rhian Resnick wrote:
> *​*Evening,
>
> We are testing IDP 3.1 and discovered that
> when http://www.w3.org/2001/04/xmlenc#tripledes-cbc is listed
> first in the SP's ​metadata first the following error is generated.
> We are running Oracle JDK 8 r40 on Tomcat8. We can work around this
> by changing the order of possible encrypting key algorithms or
> removing tripledes-cbc, but we did find it odd and thought you might
> have seen this before. 
>
> *Exception:*
>
> 2015-03-15 22:14:43,593 - ERROR [net.shibboleth.idp.saml.profile:-2]
> - Uncaught runtime exception
> java.security.InvalidParameterException: Wrong keysize: must be equal
> to 112 or 168
> at
> com.sun.crypto.provider.DESedeKeyGenerator.engineInit(DESedeKeyGenerator.java:94)
>


Yes, I'm familiar with the general issue.  IIRC the Java JCA stuff is
somewhat inconsistent in what they consider to be the key size for
triple DES keys.  Some security provider impls treat it as 192 and some
treat it as 168 (or 112 if the DESede variant which reuses the first
DES key as the third key also).

I think it has to do with:  Original DES keys were defined as 64 bits. 
However 8 bits were defined as parity bits.  This was back (in the 70's
I think) when communications channels weren't so reliable, so they
built some parity bits right into the key itself.  Or something like
that.  So anyway, only 56 bits of actual key material.

So depending on whether they treat a DES key as 56 vs 64 bits, some
impls treat a triple DES key as either 168 or 192. 

I'll look into it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/users/attachments/20150316/ca2688f1/attachment.html 


More information about the users mailing list