Top Description Fields Constructors Methods
org.bouncycastle.crypto.generators

public Class GOST3410ParametersGenerator

extends Object
Class Inheritance
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.params.GOST3410Parameters, .GOST3410ValidationParameters, org.bouncycastle.util.BigIntegers

generate suitable parameters for GOST3410.

Field Summary

Modifier and TypeField and Description
private SecureRandom
private static final BigInteger
private int
private static final BigInteger
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public GOST3410Parameters

Returns:

a generated GOST3410 parameters object.
generateParameters
()

which generates the p , q and a values from the given parameters, returning the GOST3410Parameters object.

public void
init(int
size of the key
size
,
int
type procedure A,B = 1; A',B' - else
typeproc
,
SecureRandom
random byte source.
random
)

initialise the key generator.

private int
procedure_A(int x0, int c, BigInteger[] pq, int size)

private long
procedure_Aa(long x0, long c, BigInteger[] pq, int size)

private void
procedure_B(int x0, int c, BigInteger[] pq)

private void
procedure_Bb(long x0, long c, BigInteger[] pq)

private BigInteger
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

init_randomback to summary
private SecureRandom init_random
ONEback to summary
private static final BigInteger ONE
sizeback to summary
private int size
TWOback to summary
private static final BigInteger TWO
typeprocback to summary
private int typeproc

Constructor Detail

GOST3410ParametersGeneratorback to summary
public GOST3410ParametersGenerator()

Method Detail

generateParametersback to summary
public GOST3410Parameters generateParameters()

which generates the p , q and a values from the given parameters, returning the GOST3410Parameters object.

Returns:GOST3410Parameters

a generated GOST3410 parameters object.

initback to summary
public void init(int size, int typeproc, SecureRandom random)

initialise the key generator.

Parameters
size:int

size of the key

typeproc:int

type procedure A,B = 1; A',B' - else

random:SecureRandom

random byte source.

procedure_Aback to summary
private int procedure_A(int x0, int c, BigInteger[] pq, int size)
procedure_Aaback to summary
private long procedure_Aa(long x0, long c, BigInteger[] pq, int size)
procedure_Bback to summary
private void procedure_B(int x0, int c, BigInteger[] pq)
procedure_Bbback to summary
private void procedure_Bb(long x0, long c, BigInteger[] pq)
procedure_Cback to summary
private BigInteger procedure_C(BigInteger p, BigInteger q)