Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block-buffer: release 0.10 ? #669

Closed
mat-gas opened this issue Nov 17, 2021 · 1 comment · Fixed by #671
Closed

block-buffer: release 0.10 ? #669

mat-gas opened this issue Nov 17, 2021 · 1 comment · Fixed by #671

Comments

@mat-gas
Copy link

mat-gas commented Nov 17, 2021

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/gh.neting.cc-1ecc6299db9ec823/shabal-0.3.0/src/shabal.rs",
      43LL,
      v20,
      &off_407B8,
      &off_407D8);

The related unwrap seems to be this one (https://github.com/RustCrypto/hashes/blob/master/shabal/src/shabal.rs#L248)

image

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

@newpavlov
Copy link
Member

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.

Also I probably will release block-buffer v0.10 synchronously with digest v0.10 (see RustCrypto/traits#727) and updated hashes (RustCrypto/hashes#217) and MAC (RustCrypto/MACs#95) crates.

So to summarize: hopefully the updates will be released relatively soon. At the very least it probably will be done before the end of this year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants