Class EllipticCurvePublicKey

java.lang.Object
com.unboundid.util.ssl.cert.DecodedPublicKey
com.unboundid.util.ssl.cert.EllipticCurvePublicKey
All Implemented Interfaces:
Serializable

This class provides a data structure for representing the information contained in an elliptic curve public key in an X.509 certificate. As per RFC 5480 section 2.2, and the Standards for Efficient Cryptography SEC 1 document.
See Also:
  • Method Details

    • usesCompressedForm

      public boolean usesCompressedForm()
      Indicates whether the public key uses the compressed form (which merely contains the x coordinate and an indication as to whether the y coordinate is even or odd) or the uncompressed form (which contains both the x and y coordinate values).
      Returns:
      true if the public key uses the compressed form, or false if it uses the uncompressed form.
    • getXCoordinate

      Retrieves the value of the x coordinate. This will always be available.
      Returns:
      The value of the x coordinate.
    • getYCoordinate

      Retrieves the value of the y coordinate. This will only be available if the key was encoded in the uncompressed form.
      Returns:
      The value of the y coordinate, or null if the key was encoded in the compressed form.
    • yCoordinateIsEven

      public boolean yCoordinateIsEven()
      Indicates whether the y coordinate is even or odd.
      Returns:
      true if the y coordinate is even, or false if the y coordinate is odd.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this decoded public key to the provided buffer.
      Specified by:
      toString in class DecodedPublicKey
      Parameters:
      buffer - The buffer to which the information should be appended.