Shamir's secret sharing interpolation problem

427 Views Asked by At

I try to understand this protocol - Shamir's secret sharing - threshold scheme. I got my data and I made interpolation basing on examples published on Wikipedia. You can see them below (sorry, I am old-fashioned and I solve every thing on the paper :p):

enter image description here

As I read on Wikipedia free term of interpolating polynominal should be equal to my $S$ (secret value). It isn't. Can you explain why? Maybe I forgot to use modulo somewhere? Wikipedia doesn't tell how to handle it. I hope I made all calculations ok. I am sorry, I am newbie to algebra, just curious abotu secret sharing. Please give me protips, general solutions. Thanks!

2

There are 2 best solutions below

1
On

The problem with your approach is the handling of fractions in modular arithmetic. Though $3/2$ can be interpreted as $3.2^{-1}$ in the modulus but $1\frac{1}{2}$ is not having any meaning in modular arithmetic. Take that into account.

0
On

$l3=2(x-1)(x-2)$ is bad,

$l3=\frac{(x-1)(x-2)}{2}$ is correct