public class AmDHPublicKey extends AmPublicKey implements javax.crypto.interfaces.DHPublicKey
vec
Constructor and Description |
---|
AmDHPublicKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
java.math.BigInteger y)
Konstruktor für Ephemeral Public Key (TR-03110 V2.05 D.3.4)
|
AmDHPublicKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y) |
AmDHPublicKey(org.bouncycastle.asn1.ASN1Sequence seq) |
Modifier and Type | Method and Description |
---|---|
protected void |
decode(org.bouncycastle.asn1.ASN1Sequence seq)
Extrahiert aus der übergebenen DERSequence die Daten des Public Keys Objects.
|
java.lang.String |
getAlgorithm()
Returns the standard algorithm name for this key.
|
byte[] |
getEncoded()
Returns the key in its primary encoding format, or null
if this key does not support encoding.
|
java.lang.String |
getFormat()
Returns the name of the primary encoding format of this key,
or null if this key does not support encoding.
|
java.math.BigInteger |
getG()
Returns generator g
|
java.math.BigInteger |
getP()
Returns prime modulus p
|
javax.crypto.spec.DHParameterSpec |
getParams()
Returns the key parameters.
|
java.math.BigInteger |
getQ()
Returns oder of the subgroup q
|
java.math.BigInteger |
getY()
Returns the public value,
y . |
org.bouncycastle.asn1.ASN1Primitive |
toASN1Primitive()
Return an object, possibly constructed, of ASN.1 primitives
|
getOID
public AmDHPublicKey(org.bouncycastle.asn1.ASN1Sequence seq)
seq
- public AmDHPublicKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger y)
public AmDHPublicKey(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, java.math.BigInteger y)
oid
- OIDy
- public valuepublic java.lang.String getAlgorithm()
java.security.Key
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
java.security.Key
"X.509"
. Similarly,
the name of the ASN.1 data format for private keys is
PrivateKeyInfo,
as defined by the PKCS #8 standard; in this case, the returned format is
"PKCS#8"
.getFormat
in interface java.security.Key
public byte[] getEncoded()
java.security.Key
getEncoded
in interface java.security.Key
protected void decode(org.bouncycastle.asn1.ASN1Sequence seq)
AmPublicKey
decode
in class AmPublicKey
public java.math.BigInteger getP() throws java.io.IOException
java.io.IOException
public java.math.BigInteger getG() throws java.io.IOException
java.io.IOException
public java.math.BigInteger getQ() throws java.io.IOException
java.io.IOException
public java.math.BigInteger getY()
javax.crypto.interfaces.DHPublicKey
y
.getY
in interface javax.crypto.interfaces.DHPublicKey
y
public javax.crypto.spec.DHParameterSpec getParams()
javax.crypto.interfaces.DHKey
getParams
in interface javax.crypto.interfaces.DHKey
public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
org.bouncycastle.asn1.ASN1Encodable
toASN1Primitive
in interface org.bouncycastle.asn1.ASN1Encodable
toASN1Primitive
in class AmPublicKey