IAIK ECC
version 2.18

iaik.security.ecc.math.ecgroup
Class AffineCoordinate

java.lang.Object
  extended byiaik.security.ecc.math.ecgroup.Coordinate
      extended byiaik.security.ecc.math.ecgroup.AffineCoordinate
All Implemented Interfaces:
java.lang.Cloneable

public class AffineCoordinate
extends Coordinate
implements java.lang.Cloneable

Representation of affine coordinates (x, y), where x and y are elements of a (finite) field.


Field Summary
 
Fields inherited from class iaik.security.ecc.math.ecgroup.Coordinate
coordinateType_, x_, y_
 
Constructor Summary
AffineCoordinate(FieldElement x, FieldElement y)
          Creates a new affine coordinate.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object other)
           
 int hashCode()
          Returns the hash code of this value.
 Coordinate toAffine()
          Transforms the current coordinate representation into affine coordinates.
 iaik.asn1.OCTET_STRING toASN1Object()
          Elliptic Curve Points to Octet String Conversion Primitive or EC2OSP as defined in P1363.
 iaik.security.ecc.math.ecgroup.ProjectiveCoordinate toProjective()
          Converts the coordinates to a projective representation.
 java.lang.String toString()
          A human readable coordinate representation.
 
Methods inherited from class iaik.security.ecc.math.ecgroup.Coordinate
getCoordinateType, getX, getY, setX, setY
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AffineCoordinate

public AffineCoordinate(FieldElement x,
                        FieldElement y)
Creates a new affine coordinate.

Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class Coordinate
Returns:
a deep copy of this object.

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in class Coordinate
Parameters:
other - the other object.
Returns:
true if and only if the other object is of the same class and both coordinates are equal.

hashCode

public int hashCode()
Returns the hash code of this value.

Specified by:
hashCode in class Coordinate
Returns:
the hash code of this value.

toAffine

public Coordinate toAffine()
Description copied from class: Coordinate
Transforms the current coordinate representation into affine coordinates. If the coordinates are already affine subclasses may simply return "this".

Specified by:
toAffine in class Coordinate
Returns:
the affine representation.

toASN1Object

public iaik.asn1.OCTET_STRING toASN1Object()
Elliptic Curve Points to Octet String Conversion Primitive or EC2OSP as defined in P1363.

Specified by:
toASN1Object in class Coordinate
Returns:
the octet string ASN.1 structure

toProjective

public iaik.security.ecc.math.ecgroup.ProjectiveCoordinate toProjective()
Converts the coordinates to a projective representation.

Returns:
the projective coordinates.

toString

public java.lang.String toString()
Description copied from class: Coordinate
A human readable coordinate representation.

Overrides:
toString in class Coordinate
Returns:
x and y coordinates.

IAIK ECC
version 2.18

IAIK-ECC 2.18, (c) 2002 IAIK, (c) 2003 SIC