Implementation of Shamir's secret sharing scheme