Skip to content

Commit

Permalink
Bump RustCrypto dependencies
Browse files Browse the repository at this point in the history
Fixes a problem in CI with tarpaulin
  • Loading branch information
fjarri committed May 18, 2021
1 parent f3c0d61 commit ee26f76
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/umbral-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.46.0 # MSRV
- 1.51.0 # MSRV
- stable
target:
# TODO (#13): there are some build problems with `getrandom` package.
Expand All @@ -47,15 +47,15 @@ jobs:
include:
# 32-bit Linux
- target: i686-unknown-linux-gnu
rust: 1.46.0 # MSRV
rust: 1.51.0 # MSRV
deps: sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
rust: stable
deps: sudo apt install gcc-multilib

# 64-bit Linux
- target: x86_64-unknown-linux-gnu
rust: 1.46.0 # MSRV
rust: 1.51.0 # MSRV
- target: x86_64-unknown-linux-gnu
rust: stable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.46.0 # MSRV
toolchain: 1.51.0 # MSRV
components: clippy
override: true
profile: minimal
Expand Down
3 changes: 0 additions & 3 deletions umbral-pre-python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ fn hash<T: AsSerializableBackend<U> + HasName, U: SerializableToArray>(obj: &T)
})
}

// For some reason this lint is not recognized in Rust 1.46 (the one in CI)
// remove when CI is updated to a newer Rust version.
#[allow(clippy::unknown_clippy_lints)]
#[allow(clippy::unnecessary_wraps)] // Don't want to wrap it in Ok() on every call
fn hexstr<T: AsSerializableBackend<U> + HasName, U: SerializableToArray>(
obj: &T,
Expand Down
18 changes: 9 additions & 9 deletions umbral-pre/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ readme = "README.md"
categories = ["cryptography", "no-std"]

[dependencies]
k256 = { version = "0.7", default-features = false, features = ["ecdsa", "arithmetic"] }
k256 = { version = "0.8", default-features = false, features = ["ecdsa", "arithmetic"] }
sha2 = "0.9"
chacha20poly1305 = { version = "0.7", features = ["xchacha20poly1305"] }
hkdf = "0.10"
chacha20poly1305 = { version = "0.8", features = ["xchacha20poly1305"] }
hkdf = "0.11"

# These packages are among the dependencies of the packages above.
# Their versions should be updated when the main packages above are updated.
elliptic-curve = { version = "0.8", default-features = false, features = ["digest"] }
elliptic-curve = "0.9"
digest = "0.9"
generic-array = "0.14"
aead = { version = "0.3", features = ["heapless"] }
ecdsa = "0.10"
signature = "1.2"
rand_core = { version = "0.5", default-features = false, features = ["getrandom"] }
aead = { version = "0.4", features = ["heapless"] }
ecdsa = "0.11"
signature = "1.3"
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
typenum = "1.13" # typenum is a 2018-edition crate starting from 1.13
getrandom = { version = "0.1", default-features = false, features = ["wasm-bindgen"] }
getrandom = { version = "0.2", default-features = false, features = ["wasm-bindgen", "rdrand"] }
subtle = { version = "2.4", default-features = false }

[dev-dependencies]
Expand Down
5 changes: 3 additions & 2 deletions umbral-pre/src/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
use core::default::Default;
use core::ops::{Add, Mul, Sub};
use digest::Digest;
use ecdsa::hazmat::FromDigest;
use elliptic_curve::ff::PrimeField;
use elliptic_curve::scalar::NonZeroScalar;
use elliptic_curve::sec1::{CompressedPointSize, EncodedPoint, FromEncodedPoint, ToEncodedPoint};
use elliptic_curve::{AffinePoint, Curve, FromDigest, ProjectiveArithmetic, Scalar};
use elliptic_curve::NonZeroScalar;
use elliptic_curve::{AffinePoint, Curve, ProjectiveArithmetic, Scalar};
use generic_array::GenericArray;
use k256::Secp256k1;
use rand_core::OsRng;
Expand Down
4 changes: 2 additions & 2 deletions umbral-pre/src/dem.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloc::boxed::Box;

use aead::{Aead, AeadInPlace, Payload};
use aead::{Aead, AeadCore, Payload};
use chacha20poly1305::aead::NewAead;
use chacha20poly1305::{Key, XChaCha20Poly1305, XNonce};
use generic_array::{ArrayLength, GenericArray};
Expand Down Expand Up @@ -47,7 +47,7 @@ pub(crate) fn kdf<T: ArrayLength<u8>>(
okm
}

type NonceSize = <XChaCha20Poly1305 as AeadInPlace>::NonceSize;
type NonceSize = <XChaCha20Poly1305 as AeadCore>::NonceSize;

pub(crate) struct DEM {
cipher: XChaCha20Poly1305,
Expand Down

0 comments on commit ee26f76

Please sign in to comment.