4
$\begingroup$

I build some application to encrypt and decrypting some text using ecc

My curve paramaters are

p = 59
a = 2
b = 2

resulting in 64 points including infinite point.

for encrypt and decrypt process i use

e1 = (3, 25)
d (private key) = 53

Here's the problem that i faced

let say i want to encrypt point (45, 48) first, i generate random number k = 47 and i calculate e1 * k

C1 = k * e1
   = 47 * (3, 25)
   = (43, 57)

C2 = P + k * e2
   = (45, 48) + 47 * (53 * (3, 25))
   = (28, 11)

But, when i decrypt the c1 and c2

M = c2 - d x c1
  = (28, 11) - 53 * (43, 57)
  = (43, 57)

I tried to check my calculation in online calculator, but the result is not even in the curve

Can someone explain to me why? where did i go wrong? Sorry for my english Thank you

$\endgroup$
2
$\begingroup$

I would imagine your calculator doesn't know how to handle the point at infinity because it relies fully on affine points. You can compute that

\begin{align*} C_2 &= P + k*e_2 \\ &= (45,48) + 47*53*(3,25) \\ &= 5*(3,25) + 47*53*(3,25) & (\text{since }(45,48) = 5*(3,25)) \\ &= 2496*(3,25) \\ &= \infty & (\text{since }2496\equiv0\bmod 64) \end{align*} This computation seems to go wrong somehow, possibly because it can't represent $\infty$ internally.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.