santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tse <>
Subject Is the sample program for XML encryption ok?
Date Wed, 18 Feb 2009 12:02:36 GMT
Dear gurus,

I'm working with the Apache XML security 1.4.2 (Java version) and suspect a
problem in the sample.

This sample is supplied with the 1.4.2 package:

The sample runs fine and produced this (and the key-encryption-key file
<apache:RootElement xmlns:apache="">
    <xenc:EncryptedData xmlns:xenc=""
        <xenc:EncryptionMethod Algorithm="" xmlns:xenc=""/>
        <ds:KeyInfo xmlns:ds="">
            <*xenc:EncryptedKey *xmlns:xenc="">
                <xenc:EncryptionMethod Algorithm="" xmlns:xenc=""/>
                <xenc:CipherData xmlns:xenc="">
                    <xenc:CipherValue xmlns:xenc="
        <xenc:CipherData xmlns:xenc="">
            <xenc:CipherValue xmlns:xenc="


In the XML encryption spec,  link here:

*"The EncryptedData or EncryptedKey element specify the associated keying
material via a child of ds:KeyInfo. All of the child elements of
ds:KeyInfospecified in [
MAY be used as qualified: *"

>From the XML spec, does it mean that an extra <ds:KeyInfo> should be placed
in the <xenc:EncryptedKey> element to provide information about the
encrypted key?  If so, sample code might need updating.


View raw message