14.07.2013 Views

dissertacao.pdf

dissertacao.pdf

dissertacao.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

While[i ≤ 23,<br />

n0 = Min[n0, nlist[[i, 2]]];<br />

i++;<br />

];<br />

i = 2;<br />

n = nlist[[1, 2]];<br />

While[i ≤ 23,<br />

n = n ∗ nlist[[i, 2]];<br />

i++;<br />

];<br />

m = RandomInteger[n0 − 1];<br />

clist = Table[PowerMod[poli[i, m], nlist[[i, 1]], nlist[[i, 2]]],<br />

{i, 1, l}];<br />

rrp = Append[rrp, {BitLength[n], Timing[<br />

sigma = Max[Table[nlist[[i, 1]] ∗ deg[i], {i, 1, l}]];<br />

h = Table[sigma − deg[i] ∗ nlist[[i, 1]], {i, 1, l}];<br />

gpoli = Function[{i, m},<br />

Mod[PowerMod[m, h[[i]], nlist[[i, 2]]]∗<br />

(PowerMod[poli[i, m], nlist[[i, 1]], nlist[[i, 2]]] − clist[[i]]),<br />

nlist[[i, 2]]]<br />

];<br />

mlist = Table[n/nlist[[i, 2]], {i, 1, l}];<br />

minv = Table[PowerMod[mlist[[i]], −1, nlist[[i, 2]]], {i, 1, l}];<br />

gcrt = Function[m,<br />

r = 0;<br />

i = 1;<br />

While[i ≤ l,<br />

r = r + gpoli[i, m]mlist[[i]]minv[[i]];<br />

i++;<br />

];<br />

Mod[r, n]<br />

];<br />

][[1]]}];<br />

b++;<br />

60

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!