Implementation of Shamir's Scheme