Repository: facebook/opaque-ke (language: rust)

Issue:
Rename X25519 to Curve25519
I realized that in the past I didn't properly understand the difference between those two words.
The current X25519 implementation doesn't actually use the X25519 key exchange method, it's still using 3DH, so I believe that the appropriate term is Curve25519 instead.

Does that make sense?


Discussion / hints:
Fine by me, if you are up for putting up a PR to make this rename change!

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 667572ae..bfed51b5 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -16,10 +16,10 @@ jobs:
           - --features ristretto255-u64,ristretto255-voprf
           - --features ristretto255-u32,ristretto255-voprf
           -
-          - --features x25519-u64,ristretto255-u64,ristretto255-voprf
-          - --features x25519-u32,ristretto255-u32,ristretto255-voprf
-          - --features x25519-u64
-          - --features x25519-u32
+          - --features curve25519-u64,ristretto255-u64,ristretto255-voprf
+          - --features curve25519-u32,ristretto255-u32,ristretto255-voprf
+          - --features curve25519-u64
+          - --features curve25519-u32
         frontend_feature:
           -
           - --features argon2
@@ -64,10 +64,10 @@ jobs:
           - --features ristretto255-u64,ristretto255-voprf
           - --features ristretto255-u32,ristretto255-voprf
           -
-          - x25519-u64,ristretto255-u64,ristretto255-voprf
-          - x25519-u32,ristretto255-u64,ristretto255-voprf
-          - x25519-u64
-          - x25519-u32
+          - curve25519-u64,ristretto255-u64,ristretto255-voprf
+          - curve25519-u32,ristretto255-u64,ristretto255-voprf
+          - curve25519-u64
+          - curve25519-u32
     steps:
       - uses: actions/checkout@v3
       - uses: hecrj/setup-rust-action@v1
@@ -138,10 +138,10 @@ jobs:
           - ristretto255-u64,ristretto255-voprf
           - ristretto255-u32,ristretto255-voprf
           -
-          - x25519-u64,ristretto255-u64,ristretto255-voprf
-          - x25519-u32,ristretto255-u32,ristretto255-voprf
-          - x25519-u64
-          - x25519-u32
+          - curve25519-u64,ristretto255-u64,ristretto255-voprf
+          - curve25519-u32,ristretto255-u32,ristretto255-voprf
+          - curve25519-u64
+          - curve25519-u32
         frontend_feature:
           - argon2
           - serde
@@ -161,10 +161,10 @@ jobs:
           - --features ristretto255-u64,ristretto255-voprf
           - --features ristretto255-u32,ristretto255-voprf
           -
-          - --features x25519-u64,ristretto255-u64,ristretto255-voprf
-          - --features x25519-u32,ristretto255-u32,ristretto255-voprf
-          - --features x25519-u32
-          - --features x25519-u32
+          - --features curve25519-u64,ristretto255-u64,ristretto255-voprf
+          - --features curve25519-u32,ristretto255-u32,ristretto255-voprf
+          - --features curve25519-u32
+          - --features curve25519-u32
     steps:
       - name: Checkout sources
         uses: actions/checkout@v3
@@ -201,7 +201,7 @@ jobs:
         uses: actions-rs/cargo@v1
         with:
           command: clippy
-          args: --all-targets --features argon2,std,x25519-u64 -- -D warnings
+          args: --all-targets --features argon2,std,curve25519-u64 -- -D warnings
 
       - name: Run cargo doc
         uses: actions-rs/cargo@v1
@@ -209,7 +209,7 @@ jobs:
           RUSTDOCFLAGS: -D warnings
         with:
           command: doc
-          args: --no-deps --document-private-items --features argon2,std,x25519-u64
+          args: --no-deps --document-private-items --features argon2,std,curve25519-u64
 
   format:
     name: cargo fmt
diff --git a/Cargo.toml b/Cargo.toml
index 084b2e50..56c1b9c4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,12 @@ rust-version = "1.57"
 version = "2.0.0"
 
 [features]
+curve25519 = ["curve25519-dalek"]
+curve25519-fiat-u32 = ["curve25519-dalek/fiat_u32_backend", "curve25519"]
+curve25519-fiat-u64 = ["curve25519-dalek/fiat_u64_backend", "curve25519"]
+curve25519-u32 = ["curve25519-dalek/u32_backend", "curve25519"]
+curve25519-u64 = ["curve25519-dalek/u64_backend", "curve25519"]
+curve255195519-simd = ["curve25519-dalek/simd_backend", "curve25519"]
 default = ["ristretto255-u64", "ristretto255-voprf", "serde"]
 ristretto255 = ["curve25519-dalek", "voprf/ristretto255"]
 ristretto255-fiat-u32 = ["curve25519-dalek/fiat_u32_backend", "ristretto255"]
@@ -22,12 +28,6 @@ ristretto255-u64 = ["curve25519-dalek/u64_backend", "ristretto255"]
 ristretto255-voprf = ["ristretto255", "voprf/ristretto255-ciphersuite"]
 serde = ["serde_", "generic-array/serde", "voprf/serde"]
 std = ["getrandom"]
-x25519 = ["curve25519-dalek"]
-x25519-fiat-u32 = ["curve25519-dalek/fiat_u32_backend", "x25519"]
-x25519-fiat-u64 = ["curve25519-dalek/fiat_u64_backend", "x25519"]
-x25519-simd = ["curve25519-dalek/simd_backend", "x25519"]
-x25519-u32 = ["curve25519-dalek/u32_backend", "x25519"]
-x25519-u64 = ["curve25519-dalek/u64_backend", "x25519"]
 
 [dependencies]
 argon2 = { version = "0.4", default-features = false, features = [
@@ -74,7 +74,7 @@ harness = false
 name = "opaque"
 
 [package.metadata.docs.rs]
-features = ["argon2", "std", "x25519-u64"]
+features = ["argon2", "std", "curve25519-u64"]
 targets = []
 
 [[example]]
diff --git a/src/key_exchange/group/x25519.rs b/src/key_exchange/group/curve25519.rs
similarity index 93%
rename from src/key_exchange/group/x25519.rs
rename to src/key_exchange/group/curve25519.rs
index bf670677..8719989f 100644
--- a/src/key_exchange/group/x25519.rs
+++ b/src/key_exchange/group/curve25519.rs
@@ -5,7 +5,7 @@
 // License, Version 2.0 found in the LICENSE-APACHE file in the root directory
 // of this source tree.
 
-//! Key Exchange group implementation for X25519
+//! Key Exchange group implementation for Curve25519
 
 use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
 use curve25519_dalek::montgomery::MontgomeryPoint;
@@ -22,11 +22,11 @@ use subtle::ConstantTimeEq;
 use super::KeGroup;
 use crate::errors::InternalError;
 
-/// Implementation for X25519.
-pub struct X25519;
+/// Implementation for Curve25519.
+pub struct Curve25519;
 
-/// The implementation of such a subgroup for Ristretto
-impl KeGroup for X25519 {
+/// The implementation of such a subgroup for Curve25519
+impl KeGroup for Curve25519 {
     type Pk = MontgomeryPoint;
     type PkLen = U32;
     type Sk = Scalar;
diff --git a/src/key_exchange/group/mod.rs b/src/key_exchange/group/mod.rs
index fe2dd283..c78382a4 100644
--- a/src/key_exchange/group/mod.rs
+++ b/src/key_exchange/group/mod.rs
@@ -7,11 +7,11 @@
 
 //! Includes the KeGroup trait and definitions for the key exchange groups
 
+#[cfg(feature = "curve25519")]
+pub mod curve25519;
 mod elliptic_curve;
 #[cfg(feature = "ristretto255")]
 pub mod ristretto255;
-#[cfg(feature = "x25519")]
-pub mod x25519;
 
 use digest::core_api::BlockSizeUser;
 use digest::{Digest, OutputSizeUser};
diff --git a/src/lib.rs b/src/lib.rs
index f929dc32..80d1f3a4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1106,9 +1106,9 @@
 //!   `curve25519-dalek` will fail to compile without a selected backend. This
 //!   enables the use of [`Ristretto255`] as a `KeGroup` and `OprfCs`.
 //!
-//! - The `x25519` feature is similar to the `ristretto255` feature and requires
-//!   to select a backend like `x25519-u64`, other backends are the same as in
-//!   `ristretto255-*`. This enables [`X25519`] as a `KeGroup`.
+//! - The `curve25519` feature is similar to the `ristretto255` feature and
+//!   requires to select a backend like `curve25519-u64`, other backends are the
+//!   same as in `ristretto255-*`. This enables [`Curve25519`] as a `KeGroup`.
 //!
 //! - The `ristretto255-simd` feature is re-exported from [curve25519-dalek](https://doc.dalek.rs/curve25519_dalek/index.html#backends-and-features)
 //!   and enables parallel formulas, using either AVX2 or AVX512-IFMA. This will
@@ -1157,10 +1157,10 @@ mod tests;
 pub use ciphersuite::CipherSuite;
 pub use rand;
 
+#[cfg(feature = "curve25519")]
+pub use crate::key_exchange::group::curve25519::Curve25519;
 #[cfg(feature = "ristretto255")]
 pub use crate::key_exchange::group::ristretto255::Ristretto255;
-#[cfg(feature = "x25519")]
-pub use crate::key_exchange::group::x25519::X25519;
 pub use crate::messages::{
     CredentialFinalization, CredentialFinalizationLen, CredentialRequest, CredentialRequestLen,
     CredentialResponse, CredentialResponseLen, RegistrationRequest, RegistrationRequestLen,


Test patch:
diff --git a/src/tests/full_test.rs b/src/tests/full_test.rs
index f2f936a1..363cd550 100644
--- a/src/tests/full_test.rs
+++ b/src/tests/full_test.rs
@@ -61,24 +61,24 @@ impl CipherSuite for P256 {
     type Ksf = Identity;
 }
 
-#[cfg(all(feature = "x25519", feature = "ristretto255"))]
-struct X25519Ristretto255;
+#[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+struct Curve25519Ristretto255;
 
-#[cfg(all(feature = "x25519", feature = "ristretto255"))]
-impl CipherSuite for X25519Ristretto255 {
+#[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+impl CipherSuite for Curve25519Ristretto255 {
     type OprfCs = crate::Ristretto255;
-    type KeGroup = crate::X25519;
+    type KeGroup = crate::Curve25519;
     type KeyExchange = TripleDh;
     type Ksf = Identity;
 }
 
-#[cfg(feature = "x25519")]
-struct X25519P256;
+#[cfg(feature = "curve25519")]
+struct Curve25519P256;
 
-#[cfg(feature = "x25519")]
-impl CipherSuite for X25519P256 {
+#[cfg(feature = "curve25519")]
+impl CipherSuite for Curve25519P256 {
     type OprfCs = p256::NistP256;
-    type KeGroup = crate::X25519;
+    type KeGroup = crate::Curve25519;
     type KeyExchange = TripleDh;
     type Ksf = Identity;
 }
@@ -122,7 +122,7 @@ static STR_PASSWORD: &str = "password";
 static STR_CREDENTIAL_IDENTIFIER: &str = "credential_identifier";
 
 // To regenerate these test vectors, run:
-// cargo test --features x25519-u64 -- --nocapture generate_test_vectors
+// cargo test --features curve25519-u64 -- --nocapture generate_test_vectors
 #[cfg(feature = "ristretto255")]
 static TEST_VECTOR_RISTRETTO255: &str = r#"
 {
@@ -199,8 +199,8 @@ static TEST_VECTOR_P256: &str = r#"
 }
 "#;
 
-#[cfg(all(feature = "x25519", feature = "ristretto255"))]
-static TEST_VECTOR_X25519_RISTRETTO255: &str = r#"
+#[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+static TEST_VECTOR_CURVE25519_RISTRETTO255: &str = r#"
 {
     "client_s_pk": "f535ff1f431781ebdf247ba474600b35900c78bae062b78bca336f93125fae78",
     "client_s_sk": "a2965d641d8faac6d78929faaea9d849260374dfbc48fcd8508d619e91549e0f",
@@ -237,8 +237,8 @@ static TEST_VECTOR_X25519_RISTRETTO255: &str = r#"
 }
 "#;
 
-#[cfg(feature = "x25519")]
-static TEST_VECTOR_X25519_P256: &str = r#"
+#[cfg(feature = "curve25519")]
+static TEST_VECTOR_CURVE25519_P256: &str = r#"
 {
     "client_s_pk": "984c4d0154f43c559a6e9c11e53899796c14df117333d23415e6271694fad424",
     "client_s_sk": "2b3e92c34952a4c3deb75b18f9096d22256f54819f608e181720da0d48590108",
@@ -682,19 +682,19 @@ fn generate_test_vectors() -> Result<(), ProtocolError> {
     let parameters = generate_parameters::<P256>()?;
     println!("P-256: {}", stringify_test_vectors(&parameters));
 
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
     {
-        let parameters = generate_parameters::<X25519Ristretto255>()?;
+        let parameters = generate_parameters::<Curve25519Ristretto255>()?;
         println!(
-            "X25519 Ristretto255: {}",
+            "Curve25519 Ristretto255: {}",
             stringify_test_vectors(&parameters)
         );
     }
 
-    #[cfg(feature = "x25519")]
+    #[cfg(feature = "curve25519")]
     {
-        let parameters = generate_parameters::<X25519P256>()?;
-        println!("X25519 P-256: {}", stringify_test_vectors(&parameters));
+        let parameters = generate_parameters::<Curve25519P256>()?;
+        println!("Curve25519 P-256: {}", stringify_test_vectors(&parameters));
     }
 
     Ok(())
@@ -732,10 +732,10 @@ fn test_registration_request() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -777,10 +777,10 @@ fn test_serialization() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -827,10 +827,10 @@ fn test_registration_response() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -890,10 +890,10 @@ fn test_registration_upload() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -934,10 +934,10 @@ fn test_password_file() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -986,10 +986,10 @@ fn test_credential_request() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -1065,10 +1065,10 @@ fn test_credential_response() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -1128,10 +1128,10 @@ fn test_credential_finalization() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -1165,10 +1165,10 @@ fn test_server_login_finish() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>(TEST_VECTOR_RISTRETTO255)?;
     inner::<P256>(TEST_VECTOR_P256)?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>(TEST_VECTOR_X25519_RISTRETTO255)?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>(TEST_VECTOR_X25519_P256)?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>(TEST_VECTOR_CURVE25519_RISTRETTO255)?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>(TEST_VECTOR_CURVE25519_P256)?;
 
     Ok(())
 }
@@ -1252,10 +1252,10 @@ fn test_complete_flow_success() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     test_complete_flow::<Ristretto255>(b"good password", b"good password")?;
     test_complete_flow::<P256>(b"good password", b"good password")?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    test_complete_flow::<X25519Ristretto255>(b"good password", b"good password")?;
-    #[cfg(feature = "x25519")]
-    test_complete_flow::<X25519P256>(b"good password", b"good password")?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    test_complete_flow::<Curve25519Ristretto255>(b"good password", b"good password")?;
+    #[cfg(feature = "curve25519")]
+    test_complete_flow::<Curve25519P256>(b"good password", b"good password")?;
 
     Ok(())
 }
@@ -1265,10 +1265,10 @@ fn test_complete_flow_fail() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     test_complete_flow::<Ristretto255>(b"good password", b"bad password")?;
     test_complete_flow::<P256>(b"good password", b"bad password")?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    test_complete_flow::<X25519Ristretto255>(b"good password", b"bad password")?;
-    #[cfg(feature = "x25519")]
-    test_complete_flow::<X25519P256>(b"good password", b"bad password")?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    test_complete_flow::<Curve25519Ristretto255>(b"good password", b"bad password")?;
+    #[cfg(feature = "curve25519")]
+    test_complete_flow::<Curve25519P256>(b"good password", b"bad password")?;
 
     Ok(())
 }
@@ -1302,10 +1302,10 @@ fn test_zeroize_client_registration_start() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1350,10 +1350,10 @@ fn test_zeroize_client_registration_finish() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1407,10 +1407,10 @@ fn test_zeroize_server_registration_finish() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1463,10 +1463,10 @@ fn test_zeroize_client_login_start() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1527,10 +1527,10 @@ fn test_zeroize_server_login_start() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1617,10 +1617,10 @@ fn test_zeroize_client_login_finish() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1689,10 +1689,10 @@ fn test_zeroize_server_login_finish() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1742,10 +1742,10 @@ fn test_scalar_always_nonzero() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1800,10 +1800,10 @@ fn test_reflected_value_error_registration() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }
@@ -1877,10 +1877,10 @@ fn test_reflected_value_error_login() -> Result<(), ProtocolError> {
     #[cfg(feature = "ristretto255")]
     inner::<Ristretto255>()?;
     inner::<P256>()?;
-    #[cfg(all(feature = "x25519", feature = "ristretto255"))]
-    inner::<X25519Ristretto255>()?;
-    #[cfg(feature = "x25519")]
-    inner::<X25519P256>()?;
+    #[cfg(all(feature = "curve25519", feature = "ristretto255"))]
+    inner::<Curve25519Ristretto255>()?;
+    #[cfg(feature = "curve25519")]
+    inner::<Curve25519P256>()?;
 
     Ok(())
 }