Top Fields Constructors Methods
org.bouncycastle.tls

public Class DefaultTlsDHGroupVerifier

extends Object
implements TlsDHGroupVerifier
Class Inheritance
All Implemented Interfaces
org.bouncycastle.tls.TlsDHGroupVerifier
Known Direct Subclasses
org.bouncycastle.jsse.provider.ProvDHGroupVerifier
Imports
java.math.BigInteger, java.util.Vector, org.bouncycastle.tls.crypto.DHGroup, .DHStandardGroups

Field Summary

Modifier and TypeField and Description
private static final Vector<E>
public static final int
protected Vector<E>
protected int

Constructor Summary

AccessConstructor and Description
public
DefaultTlsDHGroupVerifier()

Accept named groups and various standard DH groups with 'P' at least DEFAULT_MINIMUM_PRIME_BITS bits.

public
DefaultTlsDHGroupVerifier(int minimumPrimeBits)

Accept named groups and various standard DH groups with 'P' at least the specified number of bits.

public
DefaultTlsDHGroupVerifier(Vector<E>
a Vector of acceptable DHGroups.
groups
,
int minimumPrimeBits)

Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'.

Method Summary

Modifier and TypeMethod and Description
public boolean
accept(DHGroup
the DHGroup to check
dhGroup
)

Implements org.bouncycastle.tls.TlsDHGroupVerifier.accept.

Check whether the given DH group is acceptable for use.
private static void
protected boolean
protected boolean
protected boolean
protected boolean
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_GROUPSback to summary
private static final Vector<E> DEFAULT_GROUPS
DEFAULT_MINIMUM_PRIME_BITSback to summary
public static final int DEFAULT_MINIMUM_PRIME_BITS
groupsback to summary
protected Vector<E> groups
minimumPrimeBitsback to summary
protected int minimumPrimeBits

Constructor Detail

DefaultTlsDHGroupVerifierback to summary
public DefaultTlsDHGroupVerifier()

Accept named groups and various standard DH groups with 'P' at least DEFAULT_MINIMUM_PRIME_BITS bits.

DefaultTlsDHGroupVerifierback to summary
public DefaultTlsDHGroupVerifier(int minimumPrimeBits)

Accept named groups and various standard DH groups with 'P' at least the specified number of bits.

DefaultTlsDHGroupVerifierback to summary
public DefaultTlsDHGroupVerifier(Vector<E> groups, int minimumPrimeBits)

Accept named groups and a custom set of group parameters, subject to a minimum bitlength for 'P'.

Parameters
groups:Vector<E>

a Vector of acceptable DHGroups.

Method Detail

acceptback to summary
public boolean accept(DHGroup dhGroup)

Implements org.bouncycastle.tls.TlsDHGroupVerifier.accept.

Doc from org.bouncycastle.tls.TlsDHGroupVerifier.accept.

Check whether the given DH group is acceptable for use.

Parameters
dhGroup:DHGroup

the DHGroup to check

Returns:boolean

true if (and only if) the specified group is acceptable

addDefaultGroupback to summary
private static void addDefaultGroup(DHGroup dhGroup)
areGroupsEqualback to summary
protected boolean areGroupsEqual(DHGroup a, DHGroup b)
areParametersEqualback to summary
protected boolean areParametersEqual(BigInteger a, BigInteger b)
checkGroupback to summary
protected boolean checkGroup(DHGroup dhGroup)
checkMinimumPrimeBitsback to summary
protected boolean checkMinimumPrimeBits(DHGroup dhGroup)
getMinimumPrimeBitsback to summary
public int getMinimumPrimeBits()