Skip to main content

<DerivedKeyToken>

<DerivedKeyToken>

The purpose of <DerivedKeyToken> is to carry information that both the sender and the recipient can independently use to generate the same symmetric key. These parties can use that symmetric key for encryption, decryption, signing, and signature validation, for the associated parts of the SOAP message.

The following shows a partial example:

<DerivedKeyToken xmlns="[parts omitted]ws-secureconversation/200512" 
                 xmlns:wsc="[parts omitted]ws-secureconversation/200512" 
                 wsu:Id="Enc-943C6673-E3F3-48E4-AA24-A7F82CCF6511">
   <SecurityTokenReference xmlns="[parts omitted]oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <Reference URI="#Id-658202BF-239A-4A8C-A100-BB25579F366B"></Reference>
   </SecurityTokenReference>
   <Nonce>GbjRvVNrPtHs0zo/w9Ne0w==</Nonce>
</DerivedKeyToken>

Details

The parts of this element are as follows:

  • Id is the unique identifier for the element. InterSystems IRIS generates this automatically.

  • <EncryptionMethod> indicates the algorithm that was used to encrypt this data.

    In InterSystems IRIS, you can specify this algorithm. See Specifying the Block Encryption Algorithm.

  • <SecurityTokenReference> indicates the symmetric key to use as a basis when computing the derived key. This can contain a <Reference> element whose URI attribute points to either an <EncryptedKey> or another <DerivedKeyToken> in the same message.

    Or <SecurityTokenReference> can contain a <KeyIdentifier> that references the SHA1 hash of the <EncryptedKey> that was used. For example:

    <SecurityTokenReference xmlns="[parts omitted]oasis-200401-wss-wssecurity-secext-1.0.xsd" 
                                   s01:TokenType="[parts omitted]#EncryptedKey" 
                                   xmlns:s01="h[parts omitted]oasis-wss-wssecurity-secext-1.1.xsd">
       <KeyIdentifier EncodingType="[parts omitted]#Base64Binary" 
                                  [parts omitted]#EncryptedKeySHA1">
                         U8CEWXdUPsIk/r8JT+2KdwU/gSw=
       </KeyIdentifier>
    </SecurityTokenReference>
    
  • <Nonce> is the base–64–encoded value that was used the seed in the key derivation function for this derived key.

Computation for the <DerivedKeyToken> element uses a subset of the mechanism defined for TLS in RFC 2246.

The connection between the <DerivedKeyToken> element and the associated <EncryptedData> or <Signature> elements is handled as follows:

  • Each <DerivedKeyToken> includes an Id attribute with a unique identifier.

  • Within each <EncryptedData> element that has been encrypted by the symmetric key indicated by a given <DerivedKeyToken>, there is a <SecurityTokenReference> element whose URI attribute points to that <DerivedKeyToken>.

  • Within each <Signature> element whose value was computed by the symmetric key indicated by a given <DerivedKeyToken>, there is a <SecurityTokenReference> element whose URI attribute points to that <DerivedKeyToken>.

  • Each <EncryptedData> and <Signature> element also includes the Id attribute with a unique identifier.

  • The WS-Security header includes a <ReferenceList> element that refers to the <EncryptedData> and <Signature> elements.

Position in Message

A <DerivedKeyToken> should be included within <Security> before any <EncryptedData> and <Signature> elements that refer to it.

FeedbackOpens in a new tab