From c93600498efe6cc64bc1b0b44ae53cbc122b8334 Mon Sep 17 00:00:00 2001 From: daxpedda Date: Wed, 6 Oct 2021 02:52:08 +0200 Subject: [PATCH] Add `clippy::cargo` and remove dependencies (#23) --- Cargo.toml | 15 +++------------ src/group/p256.rs | 3 +-- src/lib.rs | 3 ++- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5b76d9d..40466c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,9 @@ name = "voprf" version = "0.1.0" description = "An implementation of a verifiable oblivious pseudorandom function (VOPRF)" authors = ["Kevin Lewi "] -categories = ["no-std"] +repository = "https://github.com/novifinancial/voprf/" +categories = ["no-std", "algorithms", "cryptography"] +keywords = ["oprf"] license = "MIT" edition = "2018" readme = "README.md" @@ -20,14 +22,11 @@ serialize = ["serde", "base64", "generic-array/serde", "curve25519-dalek/serde"] [dependencies] base64 = { version = "0.13", default-features = false, features = ["alloc"], optional = true } -constant_time_eq = "0.1" curve25519-dalek = { version = "3", default-features = false } digest = "0.9" displaydoc = { version = "0.2", default-features = false } generic-array = "0.14" getrandom = { version = "0.2", optional = true } -hkdf = "0.11" -hmac = "0.11" num-bigint = { version = "0.4", default-features = false, optional = true } num-integer = { version = "0.1", default-features = false, optional = true } num-traits = { version = "0.2", default-features = false, optional = true } @@ -42,18 +41,10 @@ zeroize = { version = "1", features = ["zeroize_derive"] } getrandom = { version = "0.2", features = ["js"], optional = true } [dev-dependencies] -base64 = "0.13" -bincode = "1" -chacha20poly1305 = "0.8" -criterion = "0.3" hex = "0.4" json = "0.12" -lazy_static = "1" -serde_json = "1" sha2 = "0.9" -proptest = "1" regex = "1" -rustyline = "8" voprf = { path = "", default-features = false, features = ["std"] } [package.metadata.docs.rs] diff --git a/src/group/p256.rs b/src/group/p256.rs index 109091b..ee66b99 100644 --- a/src/group/p256.rs +++ b/src/group/p256.rs @@ -27,11 +27,10 @@ use once_cell::unsync::Lazy; use p256_::elliptic_curve::group::prime::PrimeCurveAffine; use p256_::elliptic_curve::group::GroupEncoding; use p256_::elliptic_curve::sec1::{FromEncodedPoint, ToEncodedPoint}; -use p256_::elliptic_curve::subtle::ConstantTimeEq; use p256_::elliptic_curve::Field; use p256_::{AffinePoint, EncodedPoint, ProjectivePoint}; use rand::{CryptoRng, RngCore}; -use subtle::{Choice, ConditionallySelectable}; +use subtle::{Choice, ConditionallySelectable, ConstantTimeEq}; // `L: 48` pub const L: usize = 48; diff --git a/src/lib.rs b/src/lib.rs index 449866d..2772018 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -425,8 +425,9 @@ //! [curve25519-dalek](https://doc.dalek.rs/curve25519_dalek/index.html#backends-and-features) and enables parallel formulas, //! using either AVX2 or AVX512-IFMA. This will automatically enable the `u64_backend` and requires Rust nightly. -#![cfg_attr(not(feature = "bench"), deny(missing_docs))] #![deny(unsafe_code)] +#![warn(clippy::cargo, missing_docs)] +#![allow(clippy::multiple_crate_versions)] #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(docsrs, feature(doc_cfg))]