Skip to content

Commit bd7193b

Browse files
committed
Remove unnecessary point conversion
1 parent 561f660 commit bd7193b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ version = "3.0.0-pre.2"
1313

1414
[features]
1515
argon2 = ["dep:argon2"]
16-
curve25519 = ["dep:curve25519-dalek", "curve25519-dalek?/precomputed-tables"]
16+
curve25519 = ["dep:curve25519-dalek"]
1717
default = ["ristretto255-voprf", "serde"]
1818
ristretto255 = ["dep:curve25519-dalek", "voprf/ristretto255"]
1919
ristretto255-voprf = ["ristretto255", "voprf/ristretto255-ciphersuite"]

src/key_exchange/group/curve25519.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
//! Key Exchange group implementation for Curve25519
99

10-
use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
10+
use curve25519_dalek::constants::X25519_BASEPOINT;
1111
use curve25519_dalek::montgomery::MontgomeryPoint;
1212
use curve25519_dalek::scalar::Scalar;
1313
use curve25519_dalek::traits::Identity;
@@ -83,7 +83,7 @@ impl KeGroup for Curve25519 {
8383
}
8484

8585
fn public_key(sk: Self::Sk) -> Self::Pk {
86-
(ED25519_BASEPOINT_TABLE * &sk).to_montgomery()
86+
X25519_BASEPOINT * sk
8787
}
8888

8989
fn diffie_hellman(pk: Self::Pk, sk: Self::Sk) -> GenericArray<u8, Self::PkLen> {

0 commit comments

Comments
 (0)