Upgrade p256 to v0.12 (#90)
* Upgrade `p256` to v0.12 * Upgrade MSRV to 1.60
This commit is contained in:
@@ -43,7 +43,7 @@ jobs:
|
||||
- --features serde
|
||||
toolchain:
|
||||
- stable
|
||||
- 1.57.0
|
||||
- 1.60.0
|
||||
name: test
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
||||
+2
-2
@@ -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",
|
||||
] }
|
||||
|
||||
@@ -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
|
||||
------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user