Skip to content

Releases: bilowik/sss-rs

v0.12.0

17 Jun 19:47
Compare
Choose a tag to compare

Bumping due to a few missing deprecation notices and some likely-backwards-compatible generics improvements. There
was also the unhandled case where 0 shares were sent to reconstruct_secrets and would cause a panic, so it's call
signature had to be changed to Result, which is a breaking change.

General

  • Better test coverage
  • A fuzzing test to poke around for edge cases (behind the feature flag "fuzz_tests")

Wrapped sharing

  • Deprecate a few old functions that were missed in 0.11.0.
  • Checks for number of share outputs/inputs for Sharer/Reconstructor to ensure reconstruction is possible and
    avoids a u8 overflow panic
  • Wrappers around Sharer/Reconstructor for the common use case of iterating over buffered reads/writes. These
    are very similar to the deprecated share_to_writeables/reconstruct_from_srcs but are more efficient and handle
    errors more gracefully.

Basic Sharing

  • Remove Error::EmptySecretArray, was unused and sharing an empty array is technically valid, although serves no
    purpose.
  • Change the call signature of reconstruct functions to Result<...> to avoid a panic when 0 shares are passed to them.

v0.11.0 The big optimizationing

13 Jun 00:53
Compare
Choose a tag to compare

Huge optimizations, like, insanely huge optimizations. Not because I did a good job optimizing, but because I did such a piss-poor job writing the original code back when I was a wee little Rust baby.

General

  • Removed a lot of old code that was no longer in use, including a lot of the geometry module from back before the migration to using finite field arithmetic.
  • Lots of new documentation, lots of cleanup of old documentation.
  • Implemented the "rayon" feature to enabling concurrent sharing/reconstructing via the rayon crate. Enabled by default.
  • Added new criterion-based benchmarks, to compare performance against 0.10.1, I added those same benchmarks to a branch based on 0.10.1 callled v0.10.1_with_benches which includes just the basic_sharing benches since wrapped_sharing is not very equitable to its 0.10.1 version.
  • The time for reconstruction and for sharing a secret of a given length is now relatively even! (at least for 2 secrets)

Wrapped sharing

  • Deprecated most of the original sharing wrapped_sharing functions
  • Added new, much cleaner share/reconstruct functions.
  • Added infinitely more useful, optimized, cleaner Sharer and Reconstructor structs for large files or streams, compared to the old multitude of share/reconstruct functions that sought to handle those cases.
    • Heavily inspired by sha3 hash implementation :)
  • Remove old Error variants that are no longer instantiated.
    • This was missed by linters, they were only ever accessed in the Display impl but never directly instantiated anymore.

Basic sharing

  • Completely remove reliance of the very inefficient matrix transposition required when sharing slices of bytes. Included a lot of cloning, a lot of Vec allocations. The benchmark improvements from this alone were ~30%, and for very large secrets >=65536 bytes, a ~90% improvement.
    • The time for sharing and reconstructing now also scales very very linearly with the length of secret!
  • Added parallelization, further improving performance for payloads > 4096 in size.
  • Renamed the from_secrets_no_points and reconstruct_secrets_no_points by replacing _no_points with _compressed
  • Cleaned up a lot of unneeded allocations
  • Replaced all argument instances of &[u8] and Vec<u8> with AsRef<[u8]>
  • Replaced all argument instances of Vec<Vec<u8>> with U: AsRef<[u8]>, T: AsRef<[U]>
  • Remove old Error variants that are no longer instantiated.
    • This was missed by linters, they were only ever accessed in the Display impl but never directly instantiated anymore.

v0.10.1

07 Jun 17:06
Compare
Choose a tag to compare

sss-rs 0.10.1 06/05/2023

  • Fix an issue where the hash length was not being calculated correctly during reconstruction
    • This is mostly for correctness and for debugging. The only time this issue would be noticeable is if
      an shorter src_len than expected was provided during reconstruction, which would result in more than
      the final 64-bytes being pulled for hash comparison.
  • Dependency update and cleanup

v0.10.0

01 Jun 21:48
Compare
Choose a tag to compare
Add ^ to deps