All pastes #915710 Raw Edit

Mine

public cpp v1 · immutable
#915710 ·published 2008-02-24 00:07 UTC
rendered paste body
#ifndef ECPOINT_H#define ECPOINT_H// Abstract base class defining the interface of an elliptic curve point,// plus associated operations required for implementing Pollard's rho// algorithm for discrete logarithms.template<class Integer>class ECPoint{	public:		// Virtual destructor		virtual ~EllipticCurve()		{		}		// Perform elliptic addition of the current point with another		// point. For the benefit of chained expressions, the method must		// return *this.		virtual ECPoint& add(const ECPoint& arg) = 0;		// Perform point doubling on the current point (add it to itself).		// For the benefit of chained expressions, the method must return		// *this.		virtual ECPoint& double() = 0;		// Multiply the point by an integer, specified using the Integer		// class. Said Integer class doesn't need to implement the full		// functionality of a multi-precision integer package, just the		// ability to test bits in the binary representation of the		// underlying integer. For the benefit of chained expressions, the		// method must return *this.		virtual ECPoint& multiply(Integer& arg) = 0;};#endif // ECPOINT_H