IAIK ECC
version 2.18

iaik.security.ecc.util
Interface PointCompressor


public interface PointCompressor

All classes supporting the decompression algorithm of ANSI X9.62 must implement this interface. It will be used by the Octet2Point class.


Method Summary
 byte[] compress(FieldElement xCoordinate, FieldElement yCoordinate)
          Point compression according to ANSI X9.62
 AffineCoordinate decompress(FieldElement xCoordinate, int yBit, EllipticCurve curve)
          Point decompression for elliptic curves according to ANSI X9.62
 

Method Detail

compress

public byte[] compress(FieldElement xCoordinate,
                       FieldElement yCoordinate)
Point compression according to ANSI X9.62

Parameters:
xCoordinate - the point's x coordinate
yCoordinate - the point's y coordinate
Returns:
the compressed point

decompress

public AffineCoordinate decompress(FieldElement xCoordinate,
                                   int yBit,
                                   EllipticCurve curve)
                            throws AlgorithmException
Point decompression for elliptic curves according to ANSI X9.62

Parameters:
xCoordinate - the x coordinate of the point
yBit - the rightmost bit of the y coordinate(must be 0 or 1)
curve - the elliptic curve
Returns:
the coordinates in affine representation
Throws:
AlgorithmException - if yBit != 0 or 1 or the square root calculation fails.

IAIK ECC
version 2.18

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