EC Calculations in Java Just for the sake of learning, I'm attempting to write an ECDSA implementation in Java.

I have what I believe is a correct implementation for point addition and doubling, but I'm not sure how to implement point multiplication - Every online description I've found says to use an algorithm like this:

public static Point pointMultiply(BigInteger kin, Point a, Curve curve) {
        Point r = new Point(BigInteger.ZERO, BigInteger.ONE);

        BigInteger k = kin.mod(curve.getN());
        int length = k.bitLength();

        byte[] binarray = new byte[length];

        for(int i = 0; i &lt; length; i++) {
            binarray[i] = k.mod(BigInteger.TWO).byteValue();
            k = k.divide(BigInteger.TWO);
        }

        for(int i = length - 1; i &gt;= 0; i--) {
            r = pointAdd(r, r, curve);

            if(binarray[i] == 1) {
                r = pointAdd(r, a, curve);
            }
        }

        return r;
    }


Except all of those descriptions define r as the point at infinity. That's great, except my point doubling/adding code requires actual values in order to operate on the point. How do I find an actual value for that point so I can manipulate it, and if there is no defined value, how would I implement point multiplication?

Most of the descriptions of the point at infinity I've found say that it either isn't a real point and is some sort of abstract thing (in which case I don't understand how one can manipulate it) or that it has coordinates of (0,1), which does not give me a correct pubkey when I test it against BouncyCastle.
How do I find an actual value for that point so I can manipulate it


You don't, because the articles you read are right, there is no affine representation for the point at infinity. The usual approach is then to have a flag or something in your point class that indicates whether it currently holds the point at infinity and trigger special behavior on the additon and doubling routines when this flag is set.


  that it has coordinates of (0,1)


This is true for curves in so-called Edwards form with $c=1$ (which is quite usual).


  how would I implement point multiplication?


In serious implementations projective coordinates or jacobian coordinates are used for these calculations and the point at infinity does have a representation using these coordinates with which you can work more easily.