Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.xmlsec.keys
Class DSAKeyValue

`java.lang.Object
oracle.security.xmlsec.util.XMLNode
oracle.security.xmlsec.util.XMLElement
oracle.security.xmlsec.keys.DSAKeyValue`

All Implemented Interfaces:
  KeyValueData

public class DSAKeyValue
extends XMLElement
implements KeyValueData

XML-DSIG KeyValue class for DSA public keys.

The DSA key values used in a `DSAKeyValue` object are:

- `P, Q`: The DSA parameters P and Q are optional, but they must either both be present or both be absent.
- `G`: The DSA parameter G is optional.
- `Y`: The DSA public key value Y = G^X % P is required.
- `J`: The DSA parameter J = (P - 1) / Q is optional, and is included solely for efficiency. If P and Q are provided in the given `DSAPublicKey`, J will be calculated and included.
- `seed, pgenCounter`: The DSA prime generation seed bytes and counter are optional, but they must either both be present or both be absent.

Field Summary

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

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

Method Summary
`java.math.BigInteger` | `getG()` Returns the parameter G of this `DSAKeyValue`.
`java.math.BigInteger` | `getJ()` Returns the parameter J of this `DSAKeyValue`.
`java.math.BigInteger` | `getP()` Returns the prime modulus P of this `DSAKeyValue`.
`java.math.BigInteger` | `getPGenCounter()` Returns the prime generation counter of `DSAKeyValue`.
`byte[]` | `getPGenSeed()` Returns the prime generation seed bytes of this `DSAKeyValue`.
`oracle.security.crypto.core.PublicKey` | `getPublicKey()` Returns a `oracle.security.crypto.core.PublicKey`.
`java.math.BigInteger` | `getQ()` Returns the parameter Q of this `DSAKeyValue`.
`java.lang.String` | `getType()` Returns a URI identifying the type of KeyValue.
`java.math.BigInteger` | `getY()` Returns the key value Y of this `DSAKeyValue`.
`void` | `setG(java.math.BigInteger g)` Sets the DSA parameter G.
`void` | `setJ(java.math.BigInteger j)` Sets the DSA parameter J = (P - 1) / Q.
`void` | `setPQ(java.math.BigInteger p, java.math.BigInteger q)` Sets the DSA parameters P and Q.
`void` | `setPrimeGen(byte[] seed, java.math.BigInteger counter)` Sets the DSA prime generation Seed and PgenCounter parameters.
`void` | `setY(java.math.BigInteger y)` Sets the DSA key value Y = G^X % P.

Methods inherited from class oracle.security.xmlsec.util.XMLElement
`addNSPrefixAttr, addNSPrefixAttr, addNSPrefixAttrDefault, addNSPrefixAttrDefault, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getChildElementsByTagName, getChildElementsByTagName, getChildElementsByTagNameNS, getChildElementsByTagNameNS, getDefaultNSPrefix, 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

### DSAKeyValue

    public DSAKeyValue(org.w3c.dom.Element element)
                throws org.w3c.dom.DOMException

  Creates a new `DSAKeyValue` instance from the given Element node.
Parameters:
  `element` - An Element node in the XML document that conforms to the XML-DSIG DSAKeyValue schema.

### DSAKeyValue

    public DSAKeyValue(org.w3c.dom.Element element,
                       java.lang.String systemId)
                throws org.w3c.dom.DOMException

  Creates a new `DSAKeyValue` instance from the given Element node.
Parameters:
  `element` - An Element node in the XML document that conforms to the XML-DSIG DSAKeyValue schema.
  `systemId` - The URI string system ID for this element.
Since:
  2.0
See Also:
  `XMLNode.setSystemId(java.lang.String)`

Method Detail

### setPQ

    public void setPQ(java.math.BigInteger p,
                      java.math.BigInteger q)
               throws org.w3c.dom.DOMException

  Sets the DSA parameters P and Q. Both must either be present or missing in a `DSAKeyValue` instance.
  Parameters:
    `p` - The prime modulus.
    `q` - A prime divisor of P-1.
  Throws:
    `org.w3c.dom.DOMException`

### getP

    public java.math.BigInteger getP()

  Returns the prime modulus P of this `DSAKeyValue`.

### getQ

    public java.math.BigInteger getQ()

  Returns the parameter Q of this `DSAKeyValue`.

### setG

    public void setG(java.math.BigInteger g)
              throws org.w3c.dom.DOMException

  Sets the DSA parameter G.
  Parameters:
    `g` - The DSA parameter G.
  Throws:
    `org.w3c.dom.DOMException`

### getG

    public java.math.BigInteger getG()

  Returns the parameter G of this `DSAKeyValue`.

### setY

    public void setY(java.math.BigInteger y)
              throws org.w3c.dom.DOMException

  Sets the DSA key value Y = G^X % P.
  Parameters:
    `y` - The DSA key value Y.
  Throws:
    `org.w3c.dom.DOMException`

### getY

    public java.math.BigInteger getY()

  Returns the key value Y of this `DSAKeyValue`.

### setJ

    public void setJ(java.math.BigInteger j)
              throws org.w3c.dom.DOMException

  Sets the DSA parameter J = (P - 1) / Q.
  Parameters:
    `j` - The DSA parameter J.
  Throws:
    `org.w3c.dom.DOMException`

### getJ

    public java.math.BigInteger getJ()

  Returns the parameter J of this `DSAKeyValue`.

### setPrimeGen

    public void setPrimeGen(byte[] seed,
                            java.math.BigInteger counter)
                     throws org.w3c.dom.DOMException

  Sets the DSA prime generation Seed and PgenCounter parameters. Both must either be present or missing in a `DSAKeyValue` instance.
  Parameters:
    `seed` - The bytes of the prime generation seed.
    `counter` - The prime generation counter.
  Throws:
    `org.w3c.dom.DOMException`

### getPGenSeed

    public byte[] getPGenSeed()
                       throws org.w3c.dom.DOMException

  Returns the prime generation seed bytes of this `DSAKeyValue`.
  Returns:
    A newly allocated byte array containing the seed bytes.
  Throws:
    `org.w3c.dom.DOMException`

### getPGenCounter

    public java.math.BigInteger getPGenCounter()

  Returns the prime generation counter of `DSAKeyValue`.

### getPublicKey

    public oracle.security.crypto.core.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:

  - Diffie-Hellman Public Key `XMLURI.obj_DHKeyValue`
  - DSA Public Key `XMLURI.obj_DSAKeyValue`
  - RSA Public Key `XMLURI.obj_RSAKeyValue`
  Specified by:
    `getType` in interface `KeyValueData`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools XML Security Java API Reference 10g Release 3 (10.1.3) B25383-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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