Algorithm 7.1 The GNAF computation of an l-tuple of the positive integers

Input: An l-tuple of positive integers vj. Output:h NAFSð Þv i ¼ h NAFSð Þ v<sup>1</sup> ; NAFSð Þ v<sup>2</sup> ; …; NAFSð Þ vl i:


Applied Mathematics

$$\mathbf{12.} \qquad \text{Return } \left( e\_{1j}, e\_{2j}, \dots, e\_{m\_j} \right).$$

13. End For

$$\mathbf{14. Return } NAF(v\_j) = \left(e\_{m\_j}, \ldots, e\_{2j}, e\_{1j}\right).$$

In Figure 3, the digraph G has the vertices vj for j = 1, 2, 3, 4 and edges em for m = 1, 2, …, 7.

Figure 3. The digraph has the vertices vj for j = 1, 2, 3, 4 and edges em for m = 1, 2, …, 7.

The incidence matrix of G that is given in Figure 3 is

$$A = \begin{bmatrix} v\_1 \\ v\_2 \\ \hline \\ v\_3 \\ \hline \\ v\_4 \end{bmatrix} \begin{bmatrix} -1 & 0 & 0 & 1 & -1 & 0 & -1 \\ 1 & 1 & 0 & 0 & 0 & 1 & 0 \\ 0 & -1 & -1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & -1 & 0 & -1 & 1 \end{bmatrix} \cdot \begin{bmatrix} \\ \\ \\ \\ \\ \\ \end{bmatrix}$$

So, the NAF representations of 4-tuple hv1; v2; v3; v4i are

hð�1; 0; 0; 1; �1; 0; �1Þ;ð1; 1; 0; 0; 0; 1; 0Þ;ð0; �1; �1; 0; 1; 0; 0Þ;ð0; 0; 1; �1; 0; �1; 1Þi:

The GNAF method for l-tuple of the scalar multiplications can be performed using Algorithm (7.2).

### Algorithm 7.2 The GNAF method for computing l-tuple of the scalar multiplication

Input: The l-tuple of positive integers vj and P ∈E(Fp). Output: The l-tuple of the scalar multiplications hi vP :

1. Algorithm (7.1) uses to compute GNAF(v).

	- 4.1 Qj 2Qj.

The Graphs for Elliptic Curve Cryptography DOI: http://dx.doi.org/10.5772/intechopen.83579

 4.2 If eij ¼ 1 then Qj Qj +P. 4.3 Elseif eij ¼ �1 then Qj Qj �P. 4.4 Else go to step (4.5). 4.5 End if 5. End for 6. End for

D E 7. Return Qj <sup>¼</sup> vjP :

Using Algorithm (7.2), the final result of 4-tuple of the scalar multiplications is given by

hv1P; v2P; v3P; v4Pi ¼ hð28; 32Þ;ð46; 63Þ;ð25; 90Þ;ð82; 15Þi:
