Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


oracle.security.xmlsec.keys
Class DHKeyValue

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.XMLElement
          extended by oracle.security.xmlsec.keys.DHKeyValue

All Implemented Interfaces:
KeyValueData

public class DHKeyValue
extends XMLElement
implements KeyValueData

XML Encryption KeyValue class for Diffie-Hellman public keys.

The DH key values used in a DHKeyValue object are:

Since:
1.2

Field Summary

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
DHKeyValue(org.w3c.dom.Element element)
          Creates a new DHKeyValue instance from the given Element node.
DHKeyValue(org.w3c.dom.Element element, java.lang.String systemId)
          Creates a new DHKeyValue instance from the given Element node.

 

Method Summary
 java.math.BigInteger getGenerator()
          Returns the Generator of this DHKeyValue.
 java.math.BigInteger getP()
          Returns the prime P of this DHKeyValue.
 java.math.BigInteger getPGenCounter()
          Returns the validation parameter pgenCounter value of this DHKeyValue.
 java.math.BigInteger getPublic()
          Returns the public key value of this DHKeyValue.
 java.security.PublicKey getPublicKey()
          Returns a oracle.security.crypto.core.PublicKey.
 java.math.BigInteger getQ()
          Returns the prime Q of this DHKeyValue.
 byte[] getSeed()
          Returns the validation parameter seed bytes of this DHKeyValue.
 java.lang.String getType()
          Returns a URI identifying the type of KeyValue.
 void setDHParams(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g)
          Sets the DH parameters P, Q and Generator.
 void setPublic(java.math.BigInteger y)
          Sets the DH public key value.
 void setValidationParams(byte[] seed, java.math.BigInteger counter)
          Sets the DH validation parameters "seed" and "pgenCounter".

 

Methods inherited from class oracle.security.xmlsec.util.XMLElement
addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, getElement, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDefaultNSPrefix

 

Methods inherited from class oracle.security.xmlsec.util.XMLNode
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

DHKeyValue

public DHKeyValue(org.w3c.dom.Element element)
           throws org.w3c.dom.DOMException
Creates a new DHKeyValue instance from the given Element node.
Parameters:
element - An Element node in the XML document that conforms to the DHKeyValue schema.
Throws:
org.w3c.dom.DOMException

DHKeyValue

public DHKeyValue(org.w3c.dom.Element element,
                  java.lang.String systemId)
           throws org.w3c.dom.DOMException
Creates a new DHKeyValue instance from the given Element node.
Parameters:
element - An Element node in the XML document that conforms to the DHKeyValue schema.
systemId - The URI string system ID for this element.
Throws:
org.w3c.dom.DOMException
Since:
2.0
See Also:
XMLNode.setSystemId(java.lang.String)

Method Detail

setDHParams

public void setDHParams(java.math.BigInteger p,
                        java.math.BigInteger q,
                        java.math.BigInteger g)
                 throws org.w3c.dom.DOMException
Sets the DH parameters P, Q and Generator.
Parameters:
p - The prime P.
q - The prime Q which is a divisor of P-1.
g - The Generator of order q in GF(p).
Throws:
org.w3c.dom.DOMException

getP

public java.math.BigInteger getP()
Returns the prime P of this DHKeyValue.

getQ

public java.math.BigInteger getQ()
Returns the prime Q of this DHKeyValue.

getGenerator

public java.math.BigInteger getGenerator()
Returns the Generator of this DHKeyValue.

setPublic

public void setPublic(java.math.BigInteger y)
               throws org.w3c.dom.DOMException
Sets the DH public key value.
Parameters:
y - The DH public key value.
Throws:
org.w3c.dom.DOMException

getPublic

public java.math.BigInteger getPublic()
Returns the public key value of this DHKeyValue.

setValidationParams

public void setValidationParams(byte[] seed,
                                java.math.BigInteger counter)
                         throws org.w3c.dom.DOMException
Sets the DH validation parameters "seed" and "pgenCounter". Both must either be present or missing in a DHKeyValue instance.
Parameters:
seed - The bytes of the validation parameter "seed".
counter - The validation parameter "pgenCounter".
Throws:
org.w3c.dom.DOMException

getSeed

public byte[] getSeed()
               throws org.w3c.dom.DOMException
Returns the validation parameter seed bytes of this DHKeyValue.
Returns:
A newly allocated byte array containing the seed bytes.
Throws:
org.w3c.dom.DOMException

getPGenCounter

public java.math.BigInteger getPGenCounter()
Returns the validation parameter pgenCounter value of this DHKeyValue.

getPublicKey

public java.security.PublicKey getPublicKey()
Description copied from interface: KeyValueData
Returns a oracle.security.crypto.core.PublicKey.
Specified by:
getPublicKey in interface KeyValueData

getType

public java.lang.String getType()
Description copied from interface: KeyValueData
Returns a URI identifying the type of KeyValue.

Interface XMLURI contains the KeyInfo data type URIs for public key value elements defined in the XML Signature and XML Encryption namespaces, including:

Specified by:
getType in interface KeyValueData

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-05


Copyright © 2005, 2013 , Oracle. All rights reserved.