diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4131f71..c09240e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: - --features serde toolchain: - stable - - 1.57.0 + - 1.60.0 name: test steps: - name: Checkout sources diff --git a/Cargo.toml b/Cargo.toml index 6ac472b..15f3dde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "voprf" readme = "README.md" repository = "https://github.com/novifinancial/voprf/" -rust-version = "1.57" +rust-version = "1.60" version = "0.5.0-pre.1" [features] @@ -45,7 +45,7 @@ zeroize = { version = "1.5", default-features = false } generic-array = { version = "0.14", features = ["more_lengths"] } hex = "0.4" json = "0.12" -p256 = { version = "0.11", default-features = false, features = [ +p256 = { version = "0.12", default-features = false, features = [ "hash2curve", "voprf", ] } diff --git a/README.md b/README.md index 7b8a685..3f74279 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ voprf = "0.5.0-pre.1" ### Minimum Supported Rust Version -Rust **1.57** or higher. +Rust **1.60** or higher. Contributors ------------ diff --git a/src/group/elliptic_curve.rs b/src/group/elliptic_curve.rs index edbd958..b534e8e 100644 --- a/src/group/elliptic_curve.rs +++ b/src/group/elliptic_curve.rs @@ -23,7 +23,7 @@ use crate::{Error, InternalError, Result}; impl Group for C where C: GroupDigest, - ProjectivePoint: CofactorGroup + ToEncodedPoint, + ProjectivePoint: CofactorGroup, FieldSize: ModulusSize, AffinePoint: FromEncodedPoint + ToEncodedPoint, Scalar: FromOkm, @@ -65,7 +65,8 @@ where } fn serialize_elem(elem: Self::Elem) -> GenericArray { - let bytes = elem.to_encoded_point(true); + let affine: AffinePoint = elem.into(); + let bytes = affine.to_encoded_point(true); let bytes = bytes.as_bytes(); let mut result = GenericArray::default(); result[..bytes.len()].copy_from_slice(bytes);