public class DSAKeyValue extends BaseElement implements KeyValueElement
Type="http://www.w3.org/2000/09/xmldsig#DSAKeyValue"
(this can be used within a RetrievalMethod or
Reference element to identify the referent's type)DSA keys and the DSA signature algorithm are specified in [DSS]. DSA public key values can have the following fields:
PQGYJseedpgenCounterParameter J is available for inclusion solely for efficiency as it is
calculatable from P and Q. Parameters seed and pgenCounter are used in the
DSA prime number generation algorithm specified in [DSS]. As such, they are
optional but must either both be present or both be absent. This prime
generation algorithm is designed to provide assurance that a weak prime is
not being used and it yields a P and Q value. Parameters P, Q, and G can be
public and common to a group of users. They might be known from application
context. As such, they are optional but P and Q must either both appear or
both be absent. If all of P, Q, seed,
and pgenCounter are present, implementations are not required to
check if they are consistent and are free to use either P and
Q or seed and pgenCounter. All
parameters are encoded as base64 [MIME]
values.
Arbitrary-length integers (e.g. "bignums" such as RSA moduli) are
represented in XML as octet strings as defined by the
ds:CryptoBinary type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="DSAKeyValueType">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<sequence minOccurs="0">
<element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
<element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
</sequence>
<element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
<element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
<element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
<sequence minOccurs="0">
<element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
<element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
</sequence>
</sequence>
</restriction>
</complexContent>
</complexType>
| Modifier and Type | Field and Description |
|---|---|
protected java.math.BigInteger |
mG |
protected java.math.BigInteger |
mP |
protected java.security.interfaces.DSAPublicKey |
mPublicKey |
protected java.math.BigInteger |
mQ |
protected java.math.BigInteger |
mY |
mContext, mElement, mId| Constructor and Description |
|---|
DSAKeyValue(Context aBaglam,
java.security.interfaces.DSAPublicKey aKey) |
DSAKeyValue(org.w3c.dom.Element aElement,
Context aContext)
Construct DSAKeyValue from existing
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger |
getG() |
java.lang.String |
getLocalName() |
java.math.BigInteger |
getP() |
java.security.PublicKey |
getPublicKey() |
java.math.BigInteger |
getQ() |
java.math.BigInteger |
getY() |
addBigIntegerElement, addLineBreak, addLineBreak, checkNamespace, createElement, generateAndSetId, getAttribute, getBigIntegerFromElement, getChildText, getContext, getDocument, getElement, getId, getNamespace, insertBase64EncodedElement, insertElement, insertTextElement, selectChildElement, selectChildren, setIdprotected java.math.BigInteger mP
protected java.math.BigInteger mQ
protected java.math.BigInteger mG
protected java.math.BigInteger mY
protected java.security.interfaces.DSAPublicKey mPublicKey
public DSAKeyValue(Context aBaglam, java.security.interfaces.DSAPublicKey aKey) throws XMLSignatureException
XMLSignatureExceptionpublic DSAKeyValue(org.w3c.dom.Element aElement,
Context aContext)
throws XMLSignatureException
aElement - xml elementaContext - according to contextXMLSignatureException - when structure is invalid or can not be
resolved appropriatelypublic java.security.PublicKey getPublicKey()
throws XMLSignatureException
getPublicKey in interface KeyValueElementXMLSignatureExceptionpublic java.math.BigInteger getP()
public java.math.BigInteger getQ()
public java.math.BigInteger getG()
public java.math.BigInteger getY()
public java.lang.String getLocalName()
getLocalName in class BaseElementCopyright © 2025. All rights reserved.