Skip to content
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
2 changes: 1 addition & 1 deletion elliptic-curve/src/ecdh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ where
/// Compute a Diffie-Hellman shared secret from an ephemeral secret and the
/// public key of the other participant in the exchange.
pub fn diffie_hellman(&self, public_key: &PublicKey<C>) -> SharedSecret<C> {
diffie_hellman(&self.scalar, public_key.as_affine())
diffie_hellman(self.scalar, public_key.as_affine())
}
}

Expand Down
2 changes: 1 addition & 1 deletion elliptic-curve/src/hash2curve/hash2field/expand_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ where
pub fn data(&self) -> &[u8] {
match self {
Self::Hashed(d) => &d[..],
Self::Array(d) => *d,
Self::Array(d) => d,
}
}

Expand Down
2 changes: 1 addition & 1 deletion elliptic-curve/src/hash2curve/osswu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub trait OsswuMap: Field + Sgn0 {
tv2 = gx1 * gxd; // gx1 * gxd
tv4 *= tv2;

let y1 = tv4.pow_vartime(&Self::PARAMS.c1) * tv2; // tv4^C1 * tv2
let y1 = tv4.pow_vartime(Self::PARAMS.c1) * tv2; // tv4^C1 * tv2
let x2n = tv3 * x1n; // tv3 * x1n

let y2 = y1 * Self::PARAMS.c2 * tv1 * self; // y1 * c2 * tv1 * u
Expand Down
11 changes: 9 additions & 2 deletions elliptic-curve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]
#![forbid(unsafe_code, clippy::unwrap_used)]
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
#![forbid(unsafe_code)]
#![warn(
clippy::mod_module_files,
clippy::unwrap_used,
missing_docs,
rust_2018_idioms,
unused_lifetimes,
unused_qualifications
)]

//! ## Usage
//!
Expand Down
2 changes: 1 addition & 1 deletion elliptic-curve/src/secret_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ where
return Err(Error);
}

Self::from_sec1_der(&*der_bytes).map_err(|_| Error)
Self::from_sec1_der(&der_bytes).map_err(|_| Error)
}

/// Serialize private key as self-zeroizing PEM-encoded SEC1 `ECPrivateKey`
Expand Down