public enum EcParameterFormat extends java.lang.Enum<EcParameterFormat>
| Enum Constant and Description |
|---|
implicitCA
The 'implicitCA' EC domain parameter format.
|
named
The 'named' EC domain parameter format.
|
specified
The 'specified' EC domain parameter format.
|
| Modifier and Type | Method and Description |
|---|---|
static EcParameterFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EcParameterFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EcParameterFormat specified
With this format, all of the EC domain parameter values (i.e. curve, base point, order, and cofactor) are explicitly encoded. The size of the resulting encoded EC domain parameters is much larger when using this format as compared to the other formats, but this format has the benefit of being the most widely interoperable. Most third party products that support EC will support some set of 'named' EC domain parameters and also support 'specified' EC domain parameters. If such a product is encountered that does not support all of the 'named' EC domain parameters that Entrust does, forcing an encoding in 'specified' format is one way to still achieve interoperability with this product.
It is recommended to use this EC domain parameter encoding format
when using custom EC domain parameters (i.e. non-standardized EC
domain parameters), or when wide interoperability is paramount. To
convert a set of existing EC domain parameters to 'specified' format,
use the
EcParameterFactory.getSpecifiedInstance(ECParameterSpec) API.
To force an EC public key or private key to use the 'specified' EC
domain parameter format during an encode operation refer to the
EcPublicKey.getEncoded(boolean) or
EcPrivateKey.getEncoded(boolean) APIs.
public static final EcParameterFormat named
With this format, an object identifier that uniquely identifies the set of EC domain parameter values is encoded. The size of the resulting encoded EC domain parameters is small (typically 10-20 bytes), but this format does have interoperability drawbacks. For EC domain parameters that are widely used (i.e. NIST's EC domain parameters), most products will accept this format. However, it is possible when using less common EC domain parameters, that some products reject this format.
It is recommended to use this EC domain parameter format when using
any of the 'named' EC domains supported in this release (refer to the
class documentation of EcParameterFactory for a list of
supported named EC domains). To convert a set of existing EC domain
parameters to 'named' format, use the
EcParameterFactory.getNamedInstance(ECParameterSpec) API.
public static final EcParameterFormat implicitCA
With this format, a NULL value is encoded to
represent the set of EC domain parameter values. It simply indicates
that the parameters are inherited from elsewhere. This size of the
resulting encoding is very small (2 bytes), but this format does have
severe interoperability drawbacks. Both the encoding and decoding
application must have the same interpretation of which set of EC
domain parameter values that 'implicitCA' refers to. In the Toolkit,
this can be configured through the
EcParameterFactory.setConfiguredImplicitCaParams(ECParameterSpec)
API.
It is recommended to only use this EC domain parameter format in a
closed environment, when one has control over both the encoding and
decoding ends. To convert a set of existing EC domain parameters to
'implicitCA' format, use the
EcParameterFactory.getImplicitCaInstance(ECParameterSpec)
API.
public static EcParameterFormat[] values()
for (EcParameterFormat c : EcParameterFormat.values()) System.out.println(c);
public static EcParameterFormat valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null