Algorithm 1 The distribution algorithm |
Input: , the threshold n, area , and area (). Output: These n shares: .
-
1:
for x from do
-
2:
for y from do
-
3:
/* consists of modules.*/
-
4:
if then
-
5:
.
-
6:
else
-
7:
.
-
8:
end if
-
9:
if then
-
10:
.
-
11:
else
-
12:
.
-
13:
end if
-
14:
-
15:
if then
-
16:
.
-
17:
else
-
18:
.
-
19:
end if
-
20:
end for
-
21:
end for
Output:
|