Intel

Developer Zone

EccAlg.CurvePoint

com.intel.crypto

Class EccAlg.CurvePoint

  • java.lang.Object
    • com.intel.crypto.EccAlg.CurvePoint
  • Enclosing class:
    EccAlg


    public static class EccAlg.CurvePoint
    extends java.lang.Object
    This class represents a generic uncompressed point (x, y) on an elliptic curve.
    NOTE: currently there is no support for compressed curve point representation.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      byte[] x
      The X coordinate of the point, the size should correspond to the curve type
      byte[] y
      The Y coordinate of the point, the size should correspond to the curve type
    • Constructor Summary

      Constructors
      Constructor and Description
      EccAlg.CurvePoint()
      Create an empty CurvePoint instance
      EccAlg.CurvePoint(short curveType)
      Creates a new instance of CurvePoint where the x and y are set to appropriate size zeroed buffers.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      static short getCoordinateSize(short curveType)
      Return the size of a coordinate on the given curve in bytes.
      int hashCode()
      java.lang.String toString()
      Converts the curve point to a string in the format: "(X=79BE667E F9DCBBAC, Y=55A06295 CE870B07)"
      • Methods inherited from class java.lang.Object

        getClass
    • Field Detail

      • x

        public byte[] x
        The X coordinate of the point, the size should correspond to the curve type
      • y

        public byte[] y
        The Y coordinate of the point, the size should correspond to the curve type
    • Constructor Detail

      • EccAlg.CurvePoint

        public EccAlg.CurvePoint()
        Create an empty CurvePoint instance
      • EccAlg.CurvePoint

        public EccAlg.CurvePoint(short curveType)
                          throws CryptoException
        Creates a new instance of CurvePoint where the x and y are set to appropriate size zeroed buffers.
        Parameters:
        curveType - the ECC curve type - one of EccAlg.ECC_CURVE_TYPE_XXX values
        Throws:
        IllegalParameterException - - curveType isn't supported
        CryptoException
    • Method Detail

      • getCoordinateSize

        public static final short getCoordinateSize(short curveType)
                                             throws CryptoException
        Return the size of a coordinate on the given curve in bytes.
        Parameters:
        curveType - the ECC curve type - one of EccAlg.ECC_CURVE_TYPE_XXX values
        Returns:
        the size of the coordinate in bytes.
        Throws:
        IllegalParameterException - - curveType isn't supported.
        CryptoException
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public final java.lang.String toString()
        Converts the curve point to a string in the format: "(X=79BE667E F9DCBBAC, Y=55A06295 CE870B07)"
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of the curve point
      • equals

        public final boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object