org.bouncycastle.crypto.generators
Class GOST3410ParametersGenerator
java.lang.Object
org.bouncycastle.crypto.generators.GOST3410ParametersGenerator
public class GOST3410ParametersGenerator
- extends java.lang.Object
generate suitable parameters for GOST3410.
Field Summary |
private java.security.SecureRandom |
init_random
|
private static java.math.BigInteger |
ONE
|
private int |
size
|
private static java.math.BigInteger |
TWO
|
private int |
typeproc
|
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
private int size
typeproc
private int typeproc
init_random
private java.security.SecureRandom init_random
ONE
private static final java.math.BigInteger ONE
TWO
private static final java.math.BigInteger TWO
GOST3410ParametersGenerator
public GOST3410ParametersGenerator()
init
public void init(int size,
int typeproc,
java.security.SecureRandom random)
- initialise the key generator.
- Parameters:
size
- size of the keytypeproc
- type procedure A,B = 1; A',B' - elserandom
- random byte source.
procedure_A
private int procedure_A(int x0,
int c,
java.math.BigInteger[] pq,
int size)
procedure_Aa
private long procedure_Aa(long x0,
long c,
java.math.BigInteger[] pq,
int size)
procedure_B
private void procedure_B(int x0,
int c,
java.math.BigInteger[] pq)
procedure_Bb
private void procedure_Bb(long x0,
long c,
java.math.BigInteger[] pq)
procedure_C
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.
generateParameters
public GOST3410Parameters generateParameters()
- which generates the p , q and a values from the given parameters,
returning the GOST3410Parameters object.