|
Algorithm 2 Products of optimal Ate pairings on the BN curve (Product method). |
Input: , the bit length of s, , , where j is Output:
-
1:
Write s in signed binary form, with
-
2:
-
3:
fortondo
-
4:
-
5:
end for
-
6:
fordown to 0 do
-
7:
-
8:
for
to
d
do
-
9:
-
10:
if
then
-
11:
-
12:
else if
then
-
13:
-
14:
end if
-
15:
end for
-
16:
end for
-
17:
fortoddo
-
18:
-
19:
-
20:
end for
-
21:
-
22:
returnf
|