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 dependencies to new prerelease/RC crates #1064

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 50 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions bign256/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ edition = "2021"
rust-version = "1.73"

[dependencies]
elliptic-curve = { version = "=0.14.0-pre.5", features = ["hazmat", "sec1"] }
elliptic-curve = { version = "=0.14.0-pre.6", features = ["sec1"] }

# optional dependencies
belt-hash = { version = "=0.2.0-pre.3", optional = true, default-features = false }
der = { version = "0.8.0-pre.0" }
digest = { version = "0.11.0-pre.8", optional = true }
belt-hash = { version = "=0.2.0-pre.4", optional = true, default-features = false }
der = { version = "0.8.0-rc.0" }
digest = { version = "=0.11.0-pre.9", optional = true }
hex-literal = { version = "0.4", optional = true }
hkdf = { version = "0.13.0-pre.3", optional = true }
hmac = { version = "0.13.0-pre.3", optional = true }
hkdf = { version = "=0.13.0-pre.4", optional = true }
hmac = { version = "=0.13.0-pre.4", optional = true }
rand_core = "0.6.4"
rfc6979 = { version = "=0.5.0-pre.3", optional = true }
pkcs8 = { version = "0.11.0-pre.0", optional = true }
rfc6979 = { version = "=0.5.0-pre.4", optional = true }
pkcs8 = { version = "0.11.0-rc.0", optional = true }
primeorder = { version = "=0.14.0-pre.0", optional = true, path = "../primeorder" }
sec1 = { version = "0.8.0-pre.1", optional = true }
signature = { version = "=2.3.0-pre.3", optional = true }
sec1 = { version = "0.8.0-rc.0", optional = true }
signature = { version = "=2.3.0-pre.4", optional = true }

[dev-dependencies]
criterion = "0.5"
Expand Down
1 change: 1 addition & 0 deletions bign256/src/ecdsa/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl SigningKey {
//

impl PrehashSigner<Signature> for SigningKey {
#[allow(deprecated)] // clone_from_slice
fn sign_prehash(&self, prehash: &[u8]) -> Result<Signature> {
if prehash.len() != <BignP256 as Curve>::FieldBytesSize::USIZE {
return Err(Error::new());
Expand Down
1 change: 1 addition & 0 deletions bign256/src/ecdsa/verifying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl VerifyingKey {
// `*Verifier` trait impls
//
impl PrehashVerifier<Signature> for VerifyingKey {
#[allow(deprecated)] // clone_from_slice
fn verify_prehash(&self, prehash: &[u8], signature: &Signature) -> Result<()> {
// 1. If |𝑆| != 3𝑙, return NO.
if prehash.len() != <BignP256 as Curve>::FieldBytesSize::USIZE {
Expand Down
3 changes: 2 additions & 1 deletion bign256/src/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ impl PublicKey {

/// Get [`PublicKey`] from bytes
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
let mut bytes = Array::clone_from_slice(bytes);
let mut bytes = Array::try_from(bytes).map_err(|_| Error)?;

// It is because public_key in little endian
bytes[..32].reverse();
bytes[32..].reverse();
Expand Down
1 change: 1 addition & 0 deletions bign256/src/secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl SecretKey {
/// sidechannel, always ensure that the input has been pre-padded to `C::FieldBytesSize`.
pub fn from_slice(slice: &[u8]) -> Result<Self> {
if slice.len() == <BignP256 as elliptic_curve::Curve>::FieldBytesSize::USIZE {
#[allow(deprecated)]
Self::from_bytes(FieldBytes::from_slice(slice))
} else if (Self::MIN_SIZE..<BignP256 as elliptic_curve::Curve>::FieldBytesSize::USIZE)
.contains(&slice.len())
Expand Down
6 changes: 3 additions & 3 deletions bp256/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ edition = "2021"
rust-version = "1.73"

[dependencies]
elliptic-curve = { version = "=0.14.0-pre.5", default-features = false, features = ["hazmat", "sec1"] }
elliptic-curve = { version = "=0.14.0-pre.6", default-features = false, features = ["sec1"] }

# optional dependencies
ecdsa = { version = "=0.17.0-pre.5", optional = true, default-features = false, features = ["der"] }
ecdsa = { version = "=0.17.0-pre.7", optional = true, default-features = false, features = ["der"] }
primeorder = { version = "=0.14.0-pre.0", optional = true, path = "../primeorder" }
sha2 = { version = "=0.11.0-pre.3", optional = true, default-features = false }
sha2 = { version = "=0.11.0-pre.4", optional = true, default-features = false }

[features]
default = ["pkcs8", "std"]
Expand Down
7 changes: 2 additions & 5 deletions bp256/src/arithmetic/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ impl FieldElement {

/// Decode [`FieldElement`] from a big endian byte slice.
pub fn from_slice(slice: &[u8]) -> Result<Self> {
if slice.len() == 32 {
Option::from(Self::from_bytes(FieldBytes::from_slice(slice))).ok_or(Error)
} else {
Err(Error)
}
let field_bytes = FieldBytes::try_from(slice).map_err(|_| Error)?;
Self::from_bytes(&field_bytes).into_option().ok_or(Error)
}

/// Decode [`FieldElement`] from [`U256`] converting it into Montgomery form:
Expand Down
Loading
Loading