How the value of prime integer taken in Shamir's Secret sharing scheme. I have taken p which is greater than my secret and the no of shares. When i do calculation without modp then secret reconstruct happens successfully but when i do calculations modp then secret reconstruction is not happening. Below is my example Secret S=100 a1=3 a2=6 a3=7 Prime P=107 I had calculated 8 shares without modp. In this case secret 100 appears after reconstruction S1(1,116) S2(2,186) S3(3,352) S4(4,656) S5(5,1140) S6(6,1846) S7(7,2816) S8(8,4092)
But when i take f(x) mod 107 then secret doesn't appears as 100 instead some fraction value appears .Request to suggest how prime no p is selected.