…hen running tests.
…. Fix Segfault causing bug in Shamir#evaluate_polynomial_at when @prime was not passed to it.
…t(OpenSSL::Digest::SHA256.new, hmac_key, hmac_data) with an empty String hmac_key it blows up with a Segfault.
…ort of those methods. Hope to eliminate Stack Level too deep interpreter crashes.
…ers and is not strictly needed.
This ties the generated secret back to the original and verifies a perfect match every time. Now we can be assured that the re-hydrated secret is in fact exactly the same as the secret the shares were generated from even though we no longer have access to it. Also may help prevent cheating.
This release includes a number of enhancements which necessitated changes to the public API as well as the String format of the Share#to_s which is the part that actually gets shared between people. The changes include: - New Share#to_s output which is a Base64 encoded MessagePack serialization of a JSON Hash of the Share. This should allow more flexibility since the underlying format is a Hash that can be used to instantiate a new Share. The MessagePack and Base64 protocols are platform independent. - No longer use the pbkdf2 hashes as a way to create a secure Hash of the original secret. Instead use a SHA256 HMAC where the HMAC key is the original secret and the HMAC data is a SHA256 hash of the Secret. This allows passing this HMAC as part of the Share String which in turn allows one to *verify* that the secret that is re-hydrated is in *fact* the same as the Secret that was originally used to create the Share. Previously, one could never be sure that the re-hydrated secret was the same if for example a typo crept into the Share String. - Removed support for the old Share String format. Use the older version of the Gem if you need this supported.
…r new syntax.
…alue for later use in Shares.
…ugh normal encode/decode steps.