public class GOST3410ParametersGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.security.SecureRandom |
init_random |
private static java.math.BigInteger |
ONE |
private int |
size |
private static java.math.BigInteger |
TWO |
private int |
typeproc |
Constructor and Description |
---|
GOST3410ParametersGenerator() |
Modifier and Type | Method and Description |
---|---|
GOST3410Parameters |
generateParameters()
which generates the p , q and a values from the given parameters,
returning the GOST3410Parameters object.
|
void |
init(int size,
int typeproc,
java.security.SecureRandom random)
initialise the key generator.
|
private int |
procedure_A(int x0,
int c,
java.math.BigInteger[] pq,
int size) |
private long |
procedure_Aa(long x0,
long c,
java.math.BigInteger[] pq,
int size) |
private void |
procedure_B(int x0,
int c,
java.math.BigInteger[] pq) |
private void |
procedure_Bb(long x0,
long c,
java.math.BigInteger[] pq) |
private java.math.BigInteger |
procedure_C(java.math.BigInteger p,
java.math.BigInteger q)
Procedure C
procedure generates the a value from the given p,q,
returning the a value.
|
private int size
private int typeproc
private java.security.SecureRandom init_random
private static final java.math.BigInteger ONE
private static final java.math.BigInteger TWO
public void init(int size, int typeproc, java.security.SecureRandom random)
size
- size of the keytypeproc
- type procedure A,B = 1; A',B' - elserandom
- random byte source.private int procedure_A(int x0, int c, java.math.BigInteger[] pq, int size)
private long procedure_Aa(long x0, long c, java.math.BigInteger[] pq, int size)
private void procedure_B(int x0, int c, java.math.BigInteger[] pq)
private void procedure_Bb(long x0, long c, java.math.BigInteger[] pq)
private java.math.BigInteger procedure_C(java.math.BigInteger p, java.math.BigInteger q)
public GOST3410Parameters generateParameters()