01: package org.bouncycastle.jce.spec;
02:
03: import java.math.BigInteger;
04: import java.security.spec.KeySpec;
05:
06: /**
07: * This class specifies a GOST3410-94 public key with its associated parameters.
08: */
09:
10: public class GOST3410PublicKeySpec implements KeySpec {
11:
12: private BigInteger y;
13: private BigInteger p;
14: private BigInteger q;
15: private BigInteger a;
16:
17: /**
18: * Creates a new GOST3410PublicKeySpec with the specified parameter values.
19: *
20: * @param y the public key.
21: * @param p the prime.
22: * @param q the sub-prime.
23: * @param a the base.
24: */
25: public GOST3410PublicKeySpec(BigInteger y, BigInteger p,
26: BigInteger q, BigInteger a) {
27: this .y = y;
28: this .p = p;
29: this .q = q;
30: this .a = a;
31: }
32:
33: /**
34: * Returns the public key <code>y</code>.
35: *
36: * @return the public key <code>y</code>.
37: */
38: public BigInteger getY() {
39: return this .y;
40: }
41:
42: /**
43: * Returns the prime <code>p</code>.
44: *
45: * @return the prime <code>p</code>.
46: */
47: public BigInteger getP() {
48: return this .p;
49: }
50:
51: /**
52: * Returns the sub-prime <code>q</code>.
53: *
54: * @return the sub-prime <code>q</code>.
55: */
56: public BigInteger getQ() {
57: return this .q;
58: }
59:
60: /**
61: * Returns the base <code>g</code>.
62: *
63: * @return the base <code>g</code>.
64: */
65: public BigInteger getA() {
66: return this.a;
67: }
68: }
|