~brian-thomason/+junk/bouncycastle

« back to all changes in this revision

Viewing changes to src/org/bouncycastle/jce/spec/GOST3410PublicKeySpec.java

  • Committer: Brian Thomason
  • Date: 2011-12-20 17:20:32 UTC
  • Revision ID: brian.thomason@canonical.com-20111220172032-rdtm13jgdxtksacr
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.bouncycastle.jce.spec;
 
2
 
 
3
import java.math.BigInteger;
 
4
import java.security.spec.KeySpec;
 
5
 
 
6
/**
 
7
 * This class specifies a GOST3410-94 public key with its associated parameters.
 
8
 */
 
9
 
 
10
public class GOST3410PublicKeySpec
 
11
    implements KeySpec
 
12
{
 
13
 
 
14
    private BigInteger y;
 
15
    private BigInteger p;
 
16
    private BigInteger q;
 
17
    private BigInteger a;
 
18
 
 
19
    /**
 
20
     * Creates a new GOST3410PublicKeySpec with the specified parameter values.
 
21
     *
 
22
     * @param y the public key.
 
23
     * @param p the prime.
 
24
     * @param q the sub-prime.
 
25
     * @param a the base.
 
26
     */
 
27
    public GOST3410PublicKeySpec(
 
28
        BigInteger y,
 
29
        BigInteger p,
 
30
        BigInteger q,
 
31
        BigInteger a)
 
32
    {
 
33
        this.y = y;
 
34
        this.p = p;
 
35
        this.q = q;
 
36
        this.a = a;
 
37
    }
 
38
 
 
39
    /**
 
40
     * Returns the public key <code>y</code>.
 
41
     *
 
42
     * @return the public key <code>y</code>.
 
43
     */
 
44
    public BigInteger getY()
 
45
    {
 
46
        return this.y;
 
47
    }
 
48
 
 
49
    /**
 
50
     * Returns the prime <code>p</code>.
 
51
     *
 
52
     * @return the prime <code>p</code>.
 
53
     */
 
54
    public BigInteger getP()
 
55
    {
 
56
        return this.p;
 
57
    }
 
58
 
 
59
    /**
 
60
     * Returns the sub-prime <code>q</code>.
 
61
     *
 
62
     * @return the sub-prime <code>q</code>.
 
63
     */
 
64
    public BigInteger getQ()
 
65
    {
 
66
        return this.q;
 
67
    }
 
68
 
 
69
    /**
 
70
     * Returns the base <code>g</code>.
 
71
     *
 
72
     * @return the base <code>g</code>.
 
73
     */
 
74
    public BigInteger getA()
 
75
    {
 
76
        return this.a;
 
77
    }
 
78
}