In: Computer Science
Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks.
This scheme is called (k,n) {\displaystyle \left(k,n\right)}()threshold scheme where k is number of pieces and n is number of participants. Now we have (2,5) sharing scheme that means with 2 pieces we can regerate the secret.
Also we have to build the polynomial such that:
Now our k is 2 so equation will go upto only 2 terms i.e.
f(x) = a0+a1x
Now a0 is non coefficient part, so it is the key(lets call it s). We have given f(x) = 0 for x = 11 and f(x) = 1 for x =8, putting in equation:
0 = s + 11*a mod 19 ……(i)
1 = s + 8*a mod 19 ……(ii)
Subtracting i and ii
-1 = 3*a mod 19
18 = 3*a mod 19
Or a = 6
Putting in i we get :
0 = s +11*(6) mod 19
0=s + 66 mod 19
S=-66 mod 19
S= 10 mod 19
S= 10
Now
New equation will be:
K= s + 5*a mod 19
K = 10+5*6 mod 19
K= 40 mod 19
K= 2 mod 19
Hence k = 2