Implemented Shamir secret sharing scheme