summaryrefslogtreecommitdiff
path: root/3544/CH4/EX4.5.1/Ex4_5_1.sce
blob: df0f7cd5ba2bee0df1aa494b7d750c61df63ad18 (plain)
1
2
3
4
5
6
7
8
9
10
11

//ElGamal Key Generation

p = 11
e1 = 2
d = 3

e2 = modulo(e1^d,p)

disp("Public key:")
printf("(%d,%d,%d)",e1,e2,p)