Elliptic Curve Encryption?

Your example makes no sense at all so it is hard to understand what you think the result should be. By using low-level classes like ECFieldElement you are taking full responsibility to provide sensible parameters. You have selected NIST curve P-224.

This elliptic curve is defined over a specific field. You can retrieve the prime 'q' for this finite field and use it to create field elements by the following (departing from your example).

Your example makes no sense at all so it is hard to understand what you think the result should be. By using low-level classes like ECFieldElement you are taking full responsibility to provide sensible parameters. You have selected NIST curve P-224.

This elliptic curve is defined over a specific field. You can retrieve the prime 'q' for this finite field and use it to create field elements by the following (departing from your example): X9ECParameters x9 = NISTNamedCurves. GetByName("P-224"); ECCurve.

Fp curve = (Fp) x9.getCurve(); BigInteger q = curve.getQ(); ECFieldElement x1 = new ECFieldElement. Fp(q, new BigInteger("8")); ECFieldElement y1 = new ECFieldElement. Fp(q, new BigInteger("9")); The first argument of the ECFieldElement.

Fp constructor is the prime that defines the field. The second problem with your example is that not every pair (x,y) of integers is a point on the elliptic curve. The chance of a random (x,y) being on P-224 is incredibly small.

Here again, by messing with the low-level EPoint classes Bouncycastle does not check this for you. So while you can make the machinery of the elliptic curve addition software run and give you answers, those answers are meaningless. To make any more progress I have to ask first: what are you trying to do?

EDIT: There are two basic ways to find a point on an elliptic curve. Take an existing known point on the curve and scalar multiply by an integer. The result is another point on the curve.

Pick an x-coordinate, say x1. Plug it into the right side of the elliptic curve formula to y1^2 = E(x1). Then attempt to compute a square root in the field.

If the square root exists, then you get two points (x1, y1) and (x1,-y1) that are on the curve. If the square root does not exists, then there is no point on the curve with x-coordinate x1. You can get a point on your elliptic curve by ECPoint.

Fp = (ECPoint. Fp)x9.getG(); You can multiply that point by an integer with the ECPoint. Multiply(...).

Using method #2 is harder than it needs to be with Bouncycastle. All the methods are in the ECPoint and ECFieldElement classes. The ECFieldElement class contains a public square root method that you can use to attempt to compute the square root.

If it returns null then the square root does not exist.

Thanks and what we are trying to do is,multiplication of a Elliptic Curve Point with 1 or -1. Even we are multiplying with -1 we are getting the same point instead of replication of that point therotically...Similarly we tried for addition but we didn't getting the same result... – RAVITEJA Jul 12 at 4:43 The formulae for addition of two ECPoints is: given p(x1,y1) and Q(x2,y2) then x3=slope-x1-x2 and y3=-y1+slope(x1-x3) – RAVITEJA Jul 12 at 5:16 Your example points are not valid, so naturally performing elliptic curve operations on them does not produce the expected result. Again, you cannot simply make up the coordinates (x,y) and expect them to be on a particular curve.

– GregS Jul 12 at 10:26 then please provide me how to choose a point on the curve – RAVITEJA Jul 12 at 10:42.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions