Score:1

Scalar Multiplication using NAF method

pl flag

I am learning about Elliptic curve scalar multiplications and I am on NAF, and I am trying to figure out the concept.

What I understand is if I have K=27 with using NAF the binary looks like this 100-10-1 then the scalar multiplication process like this: 2(2(2(2(2P))-P))-P which is 5DBL and 2ADD.

My questions is if want to scalar K=27 it means the steps like this:

1- 2P (0 bit)

2- 4P (0 bit)

3- 8P-P=7P (-1 bit)

4- 14P (0 bit)

5- 28P-P=27P (-1 bit)

My issue is how can I calculate 28P then minus one P and my group only 27P my group is like this:

 1     3    10
 2     7    12
 3    19     5
 4    17     3
 5     9    16
 6    12     4
 7    11     3
 8    13    16
 9     0     1
10     6     4
11    18    20
12     5     4
13     1     7
14     4     0
15     1    16
16     5    19
17    18     3
18     6    19
19     0    22
20    13     7
21    11    20
22    12    19
23     9     7
24    17    20
25    19    18
26     7    11
27     3    13

`

Score:1
my flag

My issue is how can I calculate 28P then minus one P

The issue that appears to be confusing you is that the order of the curve you picked happens to be 28, and hence 28P happens to be the "point at infinity", which does not correspond to any specific $(x, y)$ coordinates.

In spite of that, it is a well defined 'point' (even if it's not a solution to the curve equation), with well defined addition and subtraction operations; if we designate $I$ as the point at infinity, then we have $I+X = X+I = X-I = X$ and $I-X = -X$, for any point $X$.

If you're using an EC library to do your point operations, it should handle it correctly internally.

Cisco Saeed avatar
pl flag
Actually I modified a code in Matlab, but can i resolve it in matlab code if reached to `Infinity` then instead of `14P doubling` then make `13P doubling = 26P+P=27P` ? What is EC library I can use it in matlab to resolve the issue?
poncho avatar
my flag
@CiscoSaeed: I am unfamiliar with Matlab, and so I cannot help you there
Cisco Saeed avatar
pl flag
No issue Bro, you give me where is the issue and that's enough I hope can get the resolution..Thanks :) I solved it by checking if reach to infinity then minus 1P then continue and the result is correct.2
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.