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

Uprev generic array to version 0.14 #95

Merged
merged 2 commits into from
May 5, 2020

Conversation

cbeck88
Copy link
Contributor

@cbeck88 cbeck88 commented Apr 12, 2020

In 0.14 they added a pretty nice feature, which is that you can
now split not just arrays that you hold by value, but you can
split references to generic arrays, into a pair of references to
generic arrays corresponding to the subslices, where the size
calculations are done correctly at compile-time and the buffer
size information is all preserved.

https://docs.rs/generic-array/0.14.1/src/generic_array/sequence.rs.html#302-320

I have some ECIES code that looks like this, that builds on aead trait:

    fn decrypt_in_place_detached(
        &self,
        key: &RistrettoPrivate,
        footer: &GenericArray<u8, Self::FooterSize>,
        buffer: &mut [u8],
    ) -> Result<(), Error> {
        let (footer, version_data): (_, &GenericArray<u8, U2>) = footer.split();

Alternate version is like

    fn decrypt_in_place_detached(
        &self,
        key: &RistrettoPrivate,
        footer: &GenericArray<u8, Self::FooterSize>,
        buffer: &mut [u8],
    ) -> Result<(), Error> {
        let (footer, version_data) = Split::<u8, U48>::split(footer);

I think these are both expected to work generic array 0.14. There
are alternatives of course but they are less tidy :)

Since I'm getting the generic array pub export from you, I think
that to use this, I have to convince you that it's worth it to uprev.
LMK what you think! Thanks

In 0.14 they added a pretty nice feature, which is that you can
now split not just arrays that you hold by value, but you can
split references to generic arrays, into a pair of references to
generic arrays corresponding to the subslices, where the size
calculations are done correctly at compile-time and the buffer
size information is all preserved.

https://docs.rs/generic-array/0.14.1/src/generic_array/sequence.rs.html#302-320

I have some ECIES code that looks like this, that builds on `aead` trait:

```
    fn decrypt_in_place_detached(
        &self,
        key: &RistrettoPrivate,
        footer: &GenericArray<u8, Self::FooterSize>,
        buffer: &mut [u8],
    ) -> Result<(), Error> {
        let (footer, version_data): (_, &GenericArray<u8, U2>) = footer.split();
```

Alternate version is like

```
    fn decrypt_in_place_detached(
        &self,
        key: &RistrettoPrivate,
        footer: &GenericArray<u8, Self::FooterSize>,
        buffer: &mut [u8],
    ) -> Result<(), Error> {
        let (footer, version_data) = Split::<u8, U48>::split(footer);
```

I think these are both expected to work generic array 0.14. There
are alternatives of course but they are less tidy :)

Since I'm getting the generic array pub export from you, I think
that to use this, I have to convince you that it's worth it to uprev.
LMK what you think! Thanks
@tarcieri
Copy link
Member

Looks like this has an MSRV bump (which is fine), but the CI config needs to be updated

@tarcieri
Copy link
Member

tarcieri commented May 4, 2020

Wow, just noticed the MSRV bump is to 1.41.

@cbeck88
Copy link
Contributor Author

cbeck88 commented May 4, 2020

sorry I lost track of this -- I will come back to it soon

let me know if you would rather hold off on MSRV bump

@tarcieri
Copy link
Member

tarcieri commented May 4, 2020

I'd say let's go for it

@tarcieri tarcieri requested a review from newpavlov May 4, 2020 21:33
@tarcieri tarcieri merged commit f80a345 into RustCrypto:master May 5, 2020
@tarcieri
Copy link
Member

tarcieri commented May 5, 2020

Thanks!

Per #43 it might be a bit before this gets released.

@cbeck88 cbeck88 deleted the uprev_generic_array branch May 5, 2020 16:47
tarcieri added a commit to RustCrypto/elliptic-curves that referenced this pull request May 24, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/universal-hashes that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/block-ciphers that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/block-ciphers that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/block-ciphers that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/block-ciphers that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/block-ciphers that referenced this pull request May 25, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/hashes that referenced this pull request May 27, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/stream-ciphers that referenced this pull request May 28, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/stream-ciphers that referenced this pull request May 28, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/MACs that referenced this pull request May 30, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/MACs that referenced this pull request May 30, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/MACs that referenced this pull request May 30, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
tarcieri added a commit to RustCrypto/MACs that referenced this pull request May 30, 2020
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
G1gg1L3s pushed a commit to G1gg1L3s/rust-md4 that referenced this pull request Mar 6, 2021
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
joshuajbouw pushed a commit to near/near-blake2 that referenced this pull request Mar 15, 2021
The MSRV bump is necessary to check in a merge-friendly Cargo.lock
(which is helpful for caching).

We'll want to do this bump anyway soon for `generic-array` v0.14. See:

<RustCrypto/traits#95>
dns2utf8 pushed a commit to dns2utf8/traits that referenced this pull request Jan 24, 2023
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

2 participants