Added function

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2021-01-02 14:42:22 +01:00
parent ec4a4773cc
commit 47a90f46a9
2 changed files with 20 additions and 24 deletions

View File

@ -34,8 +34,9 @@ def main
puts "Ciphers: #{c1} + #{c2}"
# ALICE
xc1 = wielokrotnoscPunktu(a,b,p,x,c1[0],c1[1])
pmd = sumaPunktow(a,b,p,c2[0],c2[1],xc1[0],-xc1[1])
#xc1 = wielokrotnoscPunktu(a,b,p,x,c1[0],c1[1])
#pmd = sumaPunktow(a,b,p,c2[0],c2[1],xc1[0],-xc1[1])
pmd = deSzyfrowanieElGamala(a,b,p,c1[0],c1[1],c2[0],c2[1],x)
d = algorytmDeKodowania(a,b,p,pmd[0],pmd[1],n,u)
puts "Dekodowana wiadomość #{d.inspect}"
end