XKMS

XML Key Management Specification (XKMS) uses public key infrastructure (PKI) to secure communication among applications. Web services can receive updated key information from an XKMS-compliant server for encryption and authentication.

XKMS is made up of:

The following demonstrates encryption.

<?xml version="1.0"?>
<PaymentInfo xmlns="http://example.org/paymentv2">
  <Name>John Smith</Name>
  <CreditCard Limit="5,000" Currency="USD">
    <Number>
      <EncryptedData
          xmlns="http://www.w3.org/2001/04/xmlenc#"
          Type="http://www.w3.org/2001/04/xmlenc#Content">
        <CipherData>
          <CipherValue>A23B45C56</CipherValue>
        </CipherData>
      </EncryptedData>
    </Number>
    <Issuer>Example Bank</Issuer>
    <Expiration>04/02</Expiration>
  </CreditCard>
</PaymentInfo>

(Courtesy of http://www.w3.org/TR/2013/REC-xmlenc-core1-20130411/)

The following shows a signature.

<Signature Id="MyFirstSignature"
           xmlns="http://www.w3.org/2000/09/xmldsig#">
   <SignedInfo>
      <CanonicalizationMethod
          Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
      <SignatureMethod
          Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
      <Reference
          URI="http://www.w3.org/TR/2000/REC-xhtml1-20000126/">
         <Transforms>
            <Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
         </Transforms>
         <DigestMethod
             Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
         <DigestValue>
            dGhpcyBpcyBub3QgYSBzaWduYXR1cmUK...
         </DigestValue>
      </Reference>
   </SignedInfo>
   <SignatureValue>...</SignatureValue>
   <KeyInfo>
      <KeyValue>
         <DSAKeyValue>
            <P>...</P><Q>...</Q><G>...</G><Y>...</Y>
         </DSAKeyValue>
      </KeyValue>
   </KeyInfo>
</Signature>

(Courtesy of http://www.w3.org/TR/2013/REC-xmldsig-core1-20130411/)