Return-Path: Delivered-To: apmail-xml-security-dev-archive@www.apache.org Received: (qmail 74411 invoked from network); 11 Aug 2008 19:48:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Aug 2008 19:48:15 -0000 Received: (qmail 76956 invoked by uid 500); 11 Aug 2008 19:48:13 -0000 Delivered-To: apmail-xml-security-dev-archive@xml.apache.org Received: (qmail 76938 invoked by uid 500); 11 Aug 2008 19:48:13 -0000 Mailing-List: contact security-dev-help@xml.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: security-dev@xml.apache.org List-Id: Delivered-To: mailing list security-dev@xml.apache.org Received: (qmail 76927 invoked by uid 99); 11 Aug 2008 19:48:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2008 12:48:13 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [141.161.2.141] (HELO uis-ipmx-2.pdc.uis.georgetown.edu) (141.161.2.141) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2008 19:47:17 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQFAIw0oEiNoRIp/2dsb2JhbACCLy+pLUU X-IronPort-AV: E=Sophos;i="4.32,190,1217822400"; d="scan'208,217";a="127534531" Received: from athena.georgetown.edu ([141.161.18.41]) by smtp-2.pdc.uis.georgetown.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Aug 2008 15:46:21 -0400 Message-ID: <48A0970D.2060403@georgetown.edu> Date: Mon, 11 Aug 2008 15:46:21 -0400 From: Brent Putman User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: security-dev@xml.apache.org Subject: Re: JCEID to Service mapping References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: multipart/alternative; boundary="------------080207050105000909010205" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------080207050105000909010205 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The JCEID algorithm identifier gets looked up by the relevant security provider class (e.g. Cipher), and is based on all 3 parameters: the cipher, mode and padding. This is highly platform vendor and version specific but as far as I remember, support for the ISO10126 padding for XML Encryption was only available in later versions of the default provider stacks that ships with the Java runtimes. With Sun's, for example, I believe 1.4 did *not* include support for that padding. 1.5 does now, although not sure about the initial patch revs. I seem to remember we had an issue in our project with someone using IBM's 1.5 JRE about a year and a half ago, and at that time they did not support that padding in the then-current rev of 1.5. Not sure about now. In their 1.4 I'm guessing most likely not supported either. If you can use recent Bouncy Castle security provider, that should get you support for that padding (and larger AES encryption keys) for any of the runtime platforms. FYI, depending on what other crypto things you're doing, you may have to fiddle with the registered order of the providers in order to get everything to work as expected. --Brent edward.thompson@wachovia.com wrote: > > This isn't technically an XML Security issue, I know, but any help > appreciated. > > Under Java 1.5 when I try to create a, XMLCipher, XMLCipher.AES_128 is > mapped to a JCEID of AES/CBC/ISO10126Padding , whihc is then mapped to > a bouncycastle service of AES. All is well. > > Under Java 1.4, XMLCipher.AES_128 is mapped to a JCEID of > AES/CBC/ISO10126Padding, but no service provider can be found with > trhat JCEID, even though I can dump the service providers and see 3 > AES providers. > > When I say under 1.5/1.4, its actually Websphere 6.0 (which uses 1.4) > and 6.1 (whihc uses 1.5). I am going to try to isolate the code > outside of websphere to see if the behavior chnages, but trying to > understand what maps AES/CBC/ISO10126Padding to a service... > > Ed Thompson > > --------------080207050105000909010205 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit The JCEID algorithm identifier gets looked up by the relevant security provider class (e.g. Cipher), and is based on all 3 parameters: the cipher, mode and padding.

This is highly platform vendor and version specific but as far as I remember, support for the ISO10126 padding for XML Encryption was only available in later versions of the default provider stacks that ships with the Java runtimes.  With Sun's, for example, I believe 1.4 did *not* include support for that padding.  1.5 does now, although not sure about the initial patch revs.  I  seem to remember we had an issue in our project with someone using IBM's 1.5 JRE about a year and a half ago, and at that time they did not support that padding in the then-current rev of 1.5.  Not sure about now. In their 1.4 I'm guessing most likely not supported either.

If you can use recent Bouncy Castle security provider, that should get you support for that padding (and larger AES encryption keys) for any of the runtime platforms.  FYI, depending on what other crypto things you're doing, you may have to fiddle with the registered order of the providers in order to get everything to work as expected.

--Brent


edward.thompson@wachovia.com wrote:

This isn't technically an XML Security issue, I know, but any help appreciated.

Under Java 1.5 when I try to create a, XMLCipher, XMLCipher.AES_128 is mapped to a JCEID of AES/CBC/ISO10126Padding , whihc is then mapped to a bouncycastle service of AES.  All is well.

Under Java 1.4, XMLCipher.AES_128 is mapped to a JCEID of AES/CBC/ISO10126Padding, but  no service provider can be found with trhat JCEID, even though I can dump the service providers and see 3 AES providers.

When I say under 1.5/1.4, its actually Websphere 6.0 (which uses 1.4) and 6.1 (whihc uses 1.5).   I am going to try to isolate the code outside of websphere to see if the behavior chnages, but trying to understand what maps  AES/CBC/ISO10126Padding to a service...

Ed Thompson


--------------080207050105000909010205--