Upgrade p256 to v0.12 (#90)

* Upgrade `p256` to v0.12

* Upgrade MSRV to 1.60
This commit is contained in:
daxpedda
2023-01-19 11:11:56 -08:00
committed by GitHub
parent 2a351ceb4d
commit daa8dc048f
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ jobs:
- --features serde
toolchain:
- stable
- 1.57.0
- 1.60.0
name: test
steps:
- name: Checkout sources
+2 -2
View File
@@ -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",
] }
+1 -1
View File
@@ -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
------------
+3 -2
View File
@@ -23,7 +23,7 @@ use crate::{Error, InternalError, Result};
impl<C> Group for C
where
C: GroupDigest,
ProjectivePoint<Self>: CofactorGroup + ToEncodedPoint<Self>,
ProjectivePoint<Self>: CofactorGroup,
FieldSize<Self>: ModulusSize,
AffinePoint<Self>: FromEncodedPoint<Self> + ToEncodedPoint<Self>,
Scalar<Self>: FromOkm,
@@ -65,7 +65,8 @@ where
}
fn serialize_elem(elem: Self::Elem) -> GenericArray<u8, Self::ElemLen> {
let bytes = elem.to_encoded_point(true);
let affine: AffinePoint<Self> = 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);