01: package org.bouncycastle.jce.spec;
02:
03: import java.math.BigInteger;
04: import java.security.spec.AlgorithmParameterSpec;
05:
06: public class ElGamalParameterSpec implements AlgorithmParameterSpec {
07: private BigInteger p;
08: private BigInteger g;
09:
10: /**
11: * Constructs a parameter set for Diffie-Hellman, using a prime modulus
12: * <code>p</code> and a base generator <code>g</code>.
13: *
14: * @param p the prime modulus
15: * @param g the base generator
16: */
17: public ElGamalParameterSpec(BigInteger p, BigInteger g) {
18: this .p = p;
19: this .g = g;
20: }
21:
22: /**
23: * Returns the prime modulus <code>p</code>.
24: *
25: * @return the prime modulus <code>p</code>
26: */
27: public BigInteger getP() {
28: return p;
29: }
30:
31: /**
32: * Returns the base generator <code>g</code>.
33: *
34: * @return the base generator <code>g</code>
35: */
36: public BigInteger getG() {
37: return g;
38: }
39: }
|