Releases: bilowik/sss-rs
Releases · bilowik/sss-rs
v0.13.0
sss-rs 0.13.0 04/27/2025
General
- More test coverage, specifically utilizing itertools to ensure that every X subset of Y shares can correctly reproduce the secret
- An additional fuzz test which specifically tests sharing and reconstructing some secret with X required shares, 255 shares created, and Y shares used for
reconstruction where 2 <= X <= 255 and X <= Y <= 255. - X-values generated for shares are not fully random and not incremental.
- Removal of various previously-deprecated functions.
Wrapped sharing
- (Potentially Breaking) Removed generic T param from Reconstructor to put it in line with the Sharer.
- The generic parameter is instead defined on the
new()method. Usage of thenew()method is unchanged
so this is only breaking if you explicitly utilized theReconstructor<T>when defining a variable or argument.
- The generic parameter is instead defined on the
- X-values used in share generation will be randomized (since this utilizes functionality from basic_sharing)
Basic sharing
- Randomly generate the X-values used during share generation, as opposed to incremental X-values.
- This provides less information to an attacker, but it also entirely backwards compatible with previously
generated shares.
- This provides less information to an attacker, but it also entirely backwards compatible with previously
v0.12.0
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
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
geometrymodule 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_bencheswhich 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_sharingfunctions - Added new, much cleaner
share/reconstructfunctions. - Added infinitely more useful, optimized, cleaner
SharerandReconstructorstructs 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
Errorvariants 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_pointsandreconstruct_secrets_no_pointsby replacing_no_pointswith_compressed - Cleaned up a lot of unneeded allocations
- Replaced all argument instances of
&[u8]andVec<u8>withAsRef<[u8]> - Replaced all argument instances of
Vec<Vec<u8>>withU: AsRef<[u8]>, T: AsRef<[U]> - Remove old
Errorvariants 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
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 shortersrc_lenthan expected was provided during reconstruction, which would result in more than
the final 64-bytes being pulled for hash comparison.
- This is mostly for correctness and for debugging. The only time this issue would be noticeable is if
- Dependency update and cleanup