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

chore: update deps #1578

Closed

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Mar 24, 2022

Hopefully this will let us use fewer duplicate deps.

Explicitly doesn't update:

  • bellperson
  • neptune
  • bitvec 1.0 because I couldn't get it working and don't really care (only used in testing).

Importantly:

  • Upgrades to clap 3
  • Upgrades to bitvec 1
  • Upgrades to blake2b/blake2s 1.0
  • Upgrades byte-unit (requires rust 2021 edition support).
  • Replaces cpuid-bool with cpufeatures (as recommended).
  • Upgrades aes and fixes some fallout.
  • Upgrades hwloc (in case that matters)
  • Upgrades num-bigint (in case that matters)

Processes,
}

impl FromStr for Mode {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, one can derive ArgEnum. But that doesn't actually work with type_of_t, so I'm not sure what one is supposed to do here. But this version should actually work.

fr32/src/padding.rs Outdated Show resolved Hide resolved
Comment on lines +13 to 26
let mode = cbc::Encryptor::<aes::Aes256>::new_from_slices(key, &IV).context("invalid key")?;

Ok(mode.encrypt_vec(plaintext))
Ok(mode.encrypt_padded_vec_mut::<ZeroPadding>(plaintext))
}

pub fn decode(key: &[u8], ciphertext: &[u8]) -> Result<Vec<u8>> {
ensure!(key.len() == 32, "invalid key length");

let mode = Cbc::<Aes256, ZeroPadding>::new_var(key, &IV).context("invalid key")?;
let mode = cbc::Decryptor::<aes::Aes256>::new_from_slices(key, &IV).context("invalid key")?;

let res = mode.decrypt_vec(ciphertext).context("failed to decrypt")?;
let res = mode
.decrypt_padded_vec_mut::<ZeroPadding>(ciphertext)
.context("failed to decrypt")?;
Ok(res)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this carefully.

@Stebalien
Copy link
Member Author

This turned into a bit of a "deal with all the deprecated things"-fest.

@Stebalien
Copy link
Member Author

Hopefully this will let us use fewer duplicate deps.

Ha, ha ha. Who was I kidding.

@Stebalien
Copy link
Member Author

The test failures are timeouts. I'm not sure what the right approach there is.

@vmx
Copy link
Contributor

vmx commented Mar 25, 2022

The test failures are timeouts. I'm not sure what the right approach there is.

I'm working on that. :( that our current cache is broken. Sounds like I need to provide a quick fix to unblock folks.

@vmx
Copy link
Contributor

vmx commented Mar 25, 2022

@Stebalien #1582 that PR should make CI work again. Sadly it takes a long time to run (I'm also working on that problem).

Hopefully this will let us use fewer duplicate deps.

Except:

- bellperson
- neptune
Copy link
Contributor

@vmx vmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'd like that @DrPeterVanNostrand has another at the hasher changs.

fil-proofs-tooling/Cargo.toml Outdated Show resolved Hide resolved
@cryptonemo
Copy link
Collaborator

LGTM, but I'd like that @DrPeterVanNostrand has another at the hasher changs.

Ditto, thanks!

@cryptonemo cryptonemo mentioned this pull request Apr 4, 2022
cryptonemo added a commit that referenced this pull request Apr 4, 2022
* chore: update deps

Hopefully this will let us use fewer duplicate deps.

Except:

- bellperson
- neptune

* chore: remove outdated byte-unit version comment

Co-authored-by: Steven Allen <[email protected]>
@cryptonemo
Copy link
Collaborator

Closing in favor of #1584

@cryptonemo cryptonemo closed this Apr 4, 2022
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.

3 participants