Improvements and better tests

adapt tests to hexadecimal encoding
limit lagrange function for the purposes of secret sharing