Skip to content

Commit 26f1fa8

Browse files
committed
Upgrade p256 to v0.12
1 parent 8901b74 commit 26f1fa8

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

.github/workflows/main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- --features serde
2424
toolchain:
2525
- stable
26-
- 1.57.0
26+
- 1.60.0
2727
name: test
2828
steps:
2929
- name: Checkout sources
@@ -78,7 +78,7 @@ jobs:
7878
matrix:
7979
toolchain:
8080
- stable
81-
- 1.57.0
81+
- 1.60.0
8282
name: test simple_login command-line example
8383
steps:
8484
- name: install expect
@@ -101,7 +101,7 @@ jobs:
101101
matrix:
102102
toolchain:
103103
- stable
104-
- 1.57.0
104+
- 1.60.0
105105
name: test digital_locker command-line example
106106
steps:
107107
- name: install expect

Cargo.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "Apache-2.0 OR MIT"
88
name = "opaque-ke"
99
readme = "README.md"
1010
repository = "https://github.com/novifinancial/opaque-ke"
11-
rust-version = "1.57"
11+
rust-version = "1.60"
1212
version = "2.0.0"
1313

1414
[features]
@@ -52,14 +52,15 @@ chacha20poly1305 = "0.10"
5252
criterion = "0.4"
5353
hex = "0.4"
5454
json = "0.12"
55-
p256 = { version = "0.11", default-features = false, features = [
55+
p256 = { version = "0.12", default-features = false, features = [
5656
"hash2curve",
5757
"voprf",
5858
] }
5959
proptest = "1"
6060
rand = "0.8"
6161
regex = "1"
62-
rustyline = "10"
62+
# MSRV
63+
rustyline = "10.1.1"
6364
scrypt = "0.10"
6465
serde_json = "1"
6566

@@ -75,3 +76,6 @@ targets = []
7576
[[example]]
7677
name = "simple_login"
7778
required-features = ["argon2"]
79+
80+
[patch.crates-io]
81+
voprf = { git = "https://github.com/facebook/voprf" }

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ opaque-ke = "2"
2727

2828
### Minimum Supported Rust Version
2929

30-
Rust **1.57** or higher.
30+
Rust **1.60** or higher.
3131

3232
Audit
3333
-----

src/key_exchange/group/elliptic_curve.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ where
2525
G: GroupDigest,
2626
FieldSize<Self>: ModulusSize,
2727
AffinePoint<Self>: FromEncodedPoint<Self> + ToEncodedPoint<Self>,
28-
ProjectivePoint<Self>: CofactorGroup + ToEncodedPoint<Self>,
28+
ProjectivePoint<Self>: CofactorGroup,
2929
Scalar<Self>: FromOkm,
3030
{
3131
type Pk = ProjectivePoint<Self>;
@@ -37,7 +37,8 @@ where
3737
type SkLen = FieldSize<Self>;
3838

3939
fn serialize_pk(pk: Self::Pk) -> GenericArray<u8, Self::PkLen> {
40-
GenericArray::clone_from_slice(pk.to_encoded_point(true).as_bytes())
40+
let affine: AffinePoint<Self> = pk.into();
41+
GenericArray::clone_from_slice(affine.to_encoded_point(true).as_bytes())
4142
}
4243

4344
fn deserialize_pk(bytes: &[u8]) -> Result<Self::Pk, InternalError> {

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! ### Minimum Supported Rust Version
1616
//!
17-
//! Rust **1.57** or higher.
17+
//! Rust **1.60** or higher.
1818
//!
1919
//! # Overview
2020
//!

0 commit comments

Comments
 (0)