Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.dsa
Class DSAPublicKeyOpenPGP  view DSAPublicKeyOpenPGP download DSAPublicKeyOpenPGP.java

java.lang.Object
  extended bycryptix.jce.provider.dsa.DSAPublicKeyOpenPGP
All Implemented Interfaces:
java.security.interfaces.DSAKey, java.security.interfaces.DSAPublicKey, java.security.Key, java.security.PublicKey, java.io.Serializable

final class DSAPublicKeyOpenPGP
extends java.lang.Object
implements java.security.interfaces.DSAPublicKey

Public key for DSA. No parameter checking is done. This keys can encode itself in OpenPGP-like Cryptix format.


Field Summary
private  java.security.interfaces.DSAParams params
          DSA parameters (g, q, p)
private  java.math.BigInteger y
          Public value y
 
Fields inherited from interface java.security.interfaces.DSAPublicKey
serialVersionUID
 
Constructor Summary
(package private) DSAPublicKeyOpenPGP(java.math.BigInteger y, java.security.interfaces.DSAParams params)
          Construct a public key from the given values.
 
Method Summary
 java.lang.String getAlgorithm()
          This method returns the name of the algorithm for this key.
 byte[] getEncoded()
          From RFC 2440bis: Algorithm Specific Fields for DSA public keys: - MPI of DSA prime p; - MPI of DSA group order q (q is a prime divisor of p-1); - MPI of DSA group generator g; - MPI of DSA public key value y (= g**x where x is secret).
 java.lang.String getFormat()
          This method returns the name of the encoding format for this key.
 java.security.interfaces.DSAParams getParams()
          Return DSA parameters (g,q, p).
 java.math.BigInteger getY()
          Returns public value Y.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

y

private final java.math.BigInteger y
Public value y


params

private final java.security.interfaces.DSAParams params
DSA parameters (g, q, p)

Constructor Detail

DSAPublicKeyOpenPGP

DSAPublicKeyOpenPGP(java.math.BigInteger y,
                    java.security.interfaces.DSAParams params)
Construct a public key from the given values. No parameter checking is done.

Method Detail

getY

public java.math.BigInteger getY()
Returns public value Y.

Specified by:
getY in interface java.security.interfaces.DSAPublicKey

getParams

public java.security.interfaces.DSAParams getParams()
Return DSA parameters (g,q, p).

Specified by:
getParams in interface java.security.interfaces.DSAKey

getAlgorithm

public java.lang.String getAlgorithm()
Description copied from interface: java.security.Key
This method returns the name of the algorithm for this key. This is a String such as "RSA".

Specified by:
getAlgorithm in interface java.security.Key

getFormat

public java.lang.String getFormat()
Description copied from interface: java.security.Key
This method returns the name of the encoding format for this key. This is the name of the ASN.1 data format used for this key, such as "X.509" or "PKCS#8". This method returns null if this key does not have an encoding format.

Specified by:
getFormat in interface java.security.Key

getEncoded

public byte[] getEncoded()
From RFC 2440bis: Algorithm Specific Fields for DSA public keys: - MPI of DSA prime p; - MPI of DSA group order q (q is a prime divisor of p-1); - MPI of DSA group generator g; - MPI of DSA public key value y (= g**x where x is secret).

Specified by:
getEncoded in interface java.security.Key