13.1. The KeyValue Element

The KeyValue element contains the actual value of a single public key that may be useful in validating a signature, decrypting data, or agreeing on a key. See Table 13-1 for its identifier. The following sections specify structures for DSA, RSA, and DH keys. The KeyValue element can in clude application-defined keys as element content qualified by another namespace or as character content. Element content is the preferred method because namespaces provide a mechanism to avoid conflicts.

XMLDSIG defines the KeyValue element syntax as follows:

<!-- XMLDSIG KeyValue DTD -->
<!ELEMENT KeyValue (#PCDATA|DSAKeyValue|RSAKeyValue
                    %KeyValue.ANY;)* >

As expanded by XML Encryption, it would be something like this:

 <!-- Extended ...

Get Secure XML: The New Syntax for Signatures and Encryption now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.