You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I was just wondering, block-buffer has been in pre (0.10.0-preX) state for almost a year now
In 0.10, this commit (#113) is of particular interest because of the "make it almost panic-free" part : This PR modifies block-buffer and block-padding APIs to reduce their surface and to make them mostly panic-free
As quite some algorithms depends on it, releasing the version here and bumping dependencies should also make those panic-free too
For instance, with this mini-reproducer for the Shabal algorithm, still using block-buffer 0.9:
let mut a = Shabal256::new();
a.update(b"\x01");
a.finalize();
When looking at the assembly:
if ( (unsigned __int8)sub_9050(a1 + 8, 64LL, *(_QWORD *)a1) )
sub_6E20(
"called `Result::unwrap()` on an `Err` value /home/test/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/shabal-0.3.0/src/shabal.rs",
43LL,
v20,
&off_407B8,
&off_407D8);
There is a bunch of unmerged changes in #566. I think the block-buffer part is mostly complete, but I ponder about some potential changes to block-padding in respect of exposing amount of space needed for padding at the type system level. But I probably will release those later in a backwards compatible manner.
Hi,
I was just wondering,
block-buffer
has been inpre
(0.10.0-preX) state for almost a year nowIn 0.10, this commit (#113) is of particular interest because of the "make it almost panic-free" part :
This PR modifies block-buffer and block-padding APIs to reduce their surface and to make them mostly panic-free
As quite some algorithms depends on it, releasing the version here and bumping dependencies should also make those panic-free too
For instance, with this mini-reproducer for the Shabal algorithm, still using block-buffer 0.9:
When looking at the assembly:
The related
unwrap
seems to be this one (https://github.com/RustCrypto/hashes/blob/master/shabal/src/shabal.rs#L248)AFAIK, it should be panic-free in 0.10 and the compiler should optimize away this error handling
Again, sorry for the inconvenience and thanks for all the hard work on those different crates
The text was updated successfully, but these errors were encountered: