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

Bump cipher crate to v0.3.0-pre.3 #205

Merged
merged 1 commit into from Dec 30, 2020
Merged

Bump cipher crate to v0.3.0-pre.3 #205

merged 1 commit into from Dec 30, 2020

Conversation

tarcieri
Copy link
Member

Implements the changes from:

RustCrypto/traits#435

Unfortunately there's a circular dependency with aes, which now pulls in ctr, so the tests which depend on AES are failing.

The plan is to land these changes first, then update the block-ciphers repository, then circle back and update the aes crate dependencies used in this repo.

@tarcieri
Copy link
Member Author

tarcieri commented Dec 30, 2020

Hmmm, this is strange... tests failing with OverflowError:

---- chacha20_seek stdout ----
thread 'chacha20_seek' panicked at 'called `Result::unwrap()` on an `Err` value: OverflowError', /Users/bascule/.cargo/registry/src/github.com-1ecc6299db9ec823/cipher-0.3.0-pre.2/src/stream.rs:54:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- legacy::chacha20_legacy_seek stdout ----
thread 'legacy::chacha20_legacy_seek' panicked at 'called `Result::unwrap()` on an `Err` value: OverflowError', /Users/bascule/.cargo/registry/src/github.com-1ecc6299db9ec823/cipher-0.3.0-pre.2/src/stream.rs:54:32

---- xchacha20::xchacha20_seek stdout ----
thread 'xchacha20::xchacha20_seek' panicked at 'called `Result::unwrap()` on an `Err` value: OverflowError', /Users/bascule/.cargo/registry/src/github.com-1ecc6299db9ec823/cipher-0.3.0-pre.2/src/stream.rs:54:32

Same thing is happening with the salsa20 crate.

tarcieri added a commit to RustCrypto/traits that referenced this pull request Dec 30, 2020
This reverts the implementation of `SeekNum::from_block_byte` which was
merged as part of #435.

I'm not exactly sure what the issue is and it's somewhat difficult to
debug in that it's code that involves both generics and macros causing
an error as part of any failure in a long chain of checked arithmetic,
which I'm trying to debug from the context of a concrete stream cipher
impl (both `chacha20` and `salsa20`) where it's operating over a generic
type.

The error manifests as `OverflowError`:

RustCrypto/stream-ciphers#205 (comment)

This commit reverts to the previous implementation, which is at least
much simpler.
tarcieri added a commit to RustCrypto/traits that referenced this pull request Dec 30, 2020
This reverts the implementation of `SeekNum::from_block_byte` which was
merged as part of #435.

I'm not exactly sure what the issue is and it's somewhat difficult to
debug in that it's code that involves both generics and macros causing
an error as part of any failure in a long chain of checked arithmetic,
which I'm trying to debug from the context of a concrete stream cipher
impl (both `chacha20` and `salsa20`) where it's operating over a generic
type.

The error manifests as `OverflowError`:

RustCrypto/stream-ciphers#205 (comment)

This commit reverts to the previous implementation, which is at least
much simpler.
@tarcieri
Copy link
Member Author

Reverted the changes to SeekNum::from_block_byte in RustCrypto/traits#439 and the chacha20 and salsa20 tests are now passing.

Implements the changes from:

RustCrypto/traits#435

Unfortunately there's a circular dependency with `aes`, which now pulls
in `ctr`, so the tests which depend on AES are failing.

The plan is to land these changes first, then update the `block-ciphers`
repository, then circle back and update the `aes` crate dependencies
used in this repo.
@tarcieri tarcieri changed the title Bump cipher crate to v0.3.0-pre.2 Bump cipher crate to v0.3.0-pre.3 Dec 30, 2020
@tarcieri
Copy link
Member Author

The remaining failures are all due to the circular dependency relationship between aes and ctr.

Going to go ahead and merge, update aes, and then circle back on those failures.

@tarcieri tarcieri merged commit 63ee3a2 into master Dec 30, 2020
@tarcieri tarcieri deleted the cipher/v0.3.0-pre.2 branch December 30, 2020 04:28
tarcieri added a commit that referenced this pull request Dec 30, 2020
This commit completes working through upgrading the `cipher` crate with
circular dependencies between `aes` and `ctr`.

Now that RustCrypto/block-ciphers#217 it's possible to complete the
`cipher` crate upgrade started in #205.

All tests are now passing again.
tarcieri added a commit that referenced this pull request Dec 30, 2020
This commit completes working through upgrading the `cipher` crate with
circular dependencies between `aes` and `ctr`.

Now that RustCrypto/block-ciphers#217 it's possible to complete the
`cipher` crate upgrade started in #205.

All tests are now passing again.
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 this pull request may close these issues.

None yet

1 participant