ibm.security.internal.spec
Class XECPublicKeySpec
- java.lang.Object
-
- ibm.security.internal.spec.XECPublicKeySpec
-
- All Implemented Interfaces:
- java.security.spec.KeySpec
public class XECPublicKeySpec extends java.lang.Object implements java.security.spec.KeySpecA class representing elliptic curve public keys as defined in RFC 7748, including the curve and other algorithm parameters. The public key is a particular point on the curve, which is represented using only its u-coordinate. A u-coordinate is an element of the field of integers modulo some value that is determined by the algorithm parameters. This field element is represented by a BigInteger which may hold any value. That is, the BigInteger is not restricted to the range of canonical field elements.- Since:
- 1.8
-
-
Constructor Summary
Constructors Constructor and Description XECPublicKeySpec(java.security.spec.AlgorithmParameterSpec params, java.math.BigInteger u)Construct a public key spec from params
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description NamedParameterSpecgetParams()Get the algorithm parameters.java.math.BigIntegergetU()Get the u coordinate of the point.
-
-
-
Constructor Detail
-
XECPublicKeySpec
public XECPublicKeySpec(java.security.spec.AlgorithmParameterSpec params, java.math.BigInteger u) throws java.lang.NullPointerException, java.security.spec.InvalidParameterSpecExceptionConstruct a public key spec from params- Parameters:
params- the algorithm parametersu- the u-coordinate- Throws:
java.lang.NullPointerException- if either ofuorparamsis nulljava.security.spec.InvalidParameterSpecException- ifparamsis not of type NamedParameterSpec
-
-
Method Detail
-
getU
public java.math.BigInteger getU()
Get the u coordinate of the point.- Returns:
- the u-coordinate, represented using a BigInteger which may hold any value.
-
getParams
public NamedParameterSpec getParams()
Get the algorithm parameters.- Returns:
- the algorithm parameters that define the curve and other settings.
-
-