Re: DSAParams question

Mary Dageforde (mdag@ix.netcom.com)
Tue, 29 Apr 1997 11:49:53 -0700

Message-Id: <2.2.32.19970429184953.00d7808c@popd.ix.netcom.com>
Date: Tue, 29 Apr 1997 11:49:53 -0700
To: Mark Bordas <mbordas@gotham.East.Sun.COM>
From: Mary Dageforde <mdag@ix.netcom.com>
Subject: Re: DSAParams question

Mark,

You're right. Thanks for letting us know about the typo in the
algorithm-specific key pair generator initialization section. The statement
should be

DSAParams dsaParams = new DSAParamsClass(p, q, g);

You're also correct that there's no implementation of the DSAParams
interface (or of the Certificate interface) in the Security API. But it's
easy to create one. An example would be

import java.math.BigInteger;

class DSAParamsClass implements java.security.interfaces.DSAParams {
BigInteger p, q, g;

DSAParamsClass(BigInteger p, BigInteger q, BigInteger g) {
this.p = p;
this.q = q;
this.g = g;
}

public BigInteger getP() {
return p;
}

public BigInteger getQ() {
return q;
}

public BigInteger getG() {
return g;
}
}

Mary

At 12:22 PM 4/14/97 -0400, Mark Bordas wrote:
>
>In the Java Cryptography Architecture API Specification & Reference
>document, there is a code example under the heading "Initializing
>the Key Pair Generator". The Algoritm-Specific Initialization example
>includes the following text:
>
> Assuming the class implementing DSAParams is named DSAParamsClass,
> use the following to initialize the key pair generator:
>
> DSAParams dsaParams = new DSAParams(p, q, g);
>
>This seems to be a typo. But am I correct that there is no implementation
>of the DSAParams interface? Likewise, is there also no implementation
>of the Certificate interface?
>
>
>mark
>
>
>