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.KeySpec
    A 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
      NamedParameterSpec getParams()
      Get the algorithm parameters.
      java.math.BigInteger getU()
      Get the u coordinate of the point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XECPublicKeySpec

        public XECPublicKeySpec(java.security.spec.AlgorithmParameterSpec params,
                                java.math.BigInteger u)
                         throws java.lang.NullPointerException,
                                java.security.spec.InvalidParameterSpecException
        Construct a public key spec from params
        Parameters:
        params - the algorithm parameters
        u - the u-coordinate
        Throws:
        java.lang.NullPointerException - if either of u or params is null
        java.security.spec.InvalidParameterSpecException - if params is 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.

© Portions Copyright 2003, 2023 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2023 Oracle and/or its affiliates. All rights reserved.