Repository: novifinancial/opaque-ke
Pull request #145 (2021-02-21 23:38:33)

Fixing test vector bug with envelope ciphertext serialization and updating VOPRF
To keep in sync with the updates from https://github.com/cfrg/draft-irtf-cfrg-opaque/pull/151


Patch:
diff --git a/benches/oprf.rs b/benches/oprf.rs
index 56e8642..9e9fbc6 100644
--- a/benches/oprf.rs
+++ b/benches/oprf.rs
@@ -11,7 +11,7 @@ use curve25519_dalek::ristretto::RistrettoPoint;
 use generic_array::arr;
 use opaque_ke::{
     group::Group,
-    oprf::{blind_shim, evaluate_shim, unblind_and_finalize_shim},
+    oprf::{blind_shim, evaluate_shim, finalize_shim},
 };
 use rand::{prelude::ThreadRng, thread_rng};
 use sha2::Sha512;
@@ -57,9 +57,9 @@ fn oprf3(c: &mut Criterion) {
     let salt = RistrettoPoint::from_scalar_slice(&salt_bytes).unwrap();
     let beta = evaluate_shim::<RistrettoPoint>(alpha, &salt);
 
-    c.bench_function("unblind_and_finalize with Ristretto", move |b| {
+    c.bench_function("finalize with Ristretto", move |b| {
         b.iter(|| {
-            let _res = unblind_and_finalize_shim::<RistrettoPoint, Sha512>(&token, beta).unwrap();
+            let _res = finalize_shim::<RistrettoPoint, Sha512>(&token, beta).unwrap();
         })
     });
 }
diff --git a/src/envelope.rs b/src/envelope.rs
index 078016b..a10a4f5 100644
--- a/src/envelope.rs
+++ b/src/envelope.rs
@@ -7,7 +7,7 @@ use crate::{
     errors::{utils::check_slice_size_atleast, InternalPakeError, PakeError, ProtocolError},
     hash::Hash,
     keypair::Key,
-    serialization::{serialize, tokenize},
+    serialization::serialize,
 };
 use digest::Digest;
 use generic_array::{typenum::Unsigned, GenericArray};
@@ -49,12 +49,7 @@ pub(crate) struct InnerEnvelope {
 
 impl InnerEnvelope {
     pub(crate) fn serialize(&self) -> Vec<u8> {
-        [
-            &[self.mode as u8],
-            &self.nonce[..],
-            &serialize(&self.ciphertext, 2)[..],
-        ]
-        .concat()
+        [&[self.mode as u8], &self.nonce[..], &self.ciphertext[..]].concat()
     }
 
     pub(crate) fn deserialize(input: &[u8]) -> Result<(Self, Vec<u8>), ProtocolError> {
@@ -65,23 +60,22 @@ impl InnerEnvelope {
         }
         let mode = InnerEnvelopeMode::try_from(input[0])?;
 
+        let key_len = <Key as SizedBytes>::Len::to_usize();
+
         let bytes = &input[1..];
-        if bytes.len() < NONCE_LEN {
+        if bytes.len() < NONCE_LEN + key_len {
             return Err(ProtocolError::VerificationError(
                 PakeError::SerializationError,
             ));
         }
 
-        let nonce = &bytes[..NONCE_LEN];
-        let (ciphertext, remainder) = tokenize(&bytes[NONCE_LEN..], 2)?;
-
         Ok((
             Self {
                 mode,
-                nonce: nonce.to_vec(),
-                ciphertext,
+                nonce: bytes[..NONCE_LEN].to_vec(),
+                ciphertext: bytes[NONCE_LEN..NONCE_LEN + key_len].to_vec(),
             },
-            remainder,
+            bytes[NONCE_LEN + key_len..].to_vec(),
         ))
     }
 }
diff --git a/src/opaque.rs b/src/opaque.rs
index ba9c6fc..e867ef1 100644
--- a/src/opaque.rs
+++ b/src/opaque.rs
@@ -27,8 +27,6 @@ use rand::{CryptoRng, RngCore};
 use std::{convert::TryFrom, marker::PhantomData};
 use zeroize::Zeroize;
 
-static STR_OPAQUE_VERSION: &[u8] = b"OPAQUE";
-
 // Registration
 // ============
 
@@ -852,10 +850,6 @@ fn get_password_derived_key<G: GroupWithMapToCurve, SH: SlowHash<D>, D: Hash>(
     token: &oprf::Token<G>,
     beta: G,
 ) -> Result<Vec<u8>, InternalPakeError> {
-    let oprf_output = oprf::finalize::<G, D>(
-        &token.data,
-        &oprf::unblind::<G>(token, beta),
-        STR_OPAQUE_VERSION,
-    );
+    let oprf_output = oprf::finalize::<G, D>(&token.data, &token.blind, beta);
     SH::hash(oprf_output)
 }
diff --git a/src/oprf.rs b/src/oprf.rs
index c3b3f01..ad1e883 100644
--- a/src/oprf.rs
+++ b/src/oprf.rs
@@ -50,21 +50,23 @@ pub(crate) fn evaluate<G: Group>(point: G, oprf_key: &G::Scalar) -> G {
 
 /// Computes the third step for the multiplicative blinding version of DH-OPRF, in which
 /// the client unblinds the server's message.
-pub(crate) fn unblind<G: Group>(token: &Token<G>, point: G) -> Vec<u8> {
-    let unblinded = point * &G::scalar_invert(&token.blind);
-    unblinded.to_arr().to_vec()
+pub(crate) fn finalize<G: GroupWithMapToCurve, H: Hash>(
+    input: &[u8],
+    blind: &G::Scalar,
+    evaluated_element: G,
+) -> GenericArray<u8, <H as Digest>::OutputSize> {
+    let unblinded_element = evaluated_element * &G::scalar_invert(blind);
+    finalize_after_unblind::<G, H>(input, unblinded_element)
 }
 
-pub(crate) fn finalize<G: GroupWithMapToCurve, H: Hash>(
-    token_data: &[u8],
-    issued_token: &[u8],
-    info: &[u8],
+fn finalize_after_unblind<G: GroupWithMapToCurve, H: Hash>(
+    input: &[u8],
+    unblinded_element: G,
 ) -> GenericArray<u8, <H as Digest>::OutputSize> {
     let finalize_dst = [STR_VOPRF_FINALIZE, &G::get_context_string(MODE_BASE)].concat();
     let hash_input = [
-        serialize(token_data, 2),
-        serialize(issued_token, 2),
-        serialize(info, 2),
+        serialize(input, 2),
+        serialize(&unblinded_element.to_arr().to_vec(), 2),
         serialize(&finalize_dst, 2),
     ]
     .concat();
@@ -95,15 +97,11 @@ pub fn evaluate_shim<G: Group>(point: G, oprf_key: &G::Scalar) -> G {
 #[cfg(feature = "bench")]
 #[doc(hidden)]
 #[inline]
-pub fn unblind_and_finalize_shim<G: GroupWithMapToCurve, H: Hash>(
+pub fn finalize_shim<G: GroupWithMapToCurve, H: Hash>(
     token: &Token<G>,
     point: G,
 ) -> Result<GenericArray<u8, <H as Digest>::OutputSize>, InternalPakeError> {
-    Ok(finalize::<G, H>(
-        &token.data,
-        &unblind::<G>(token, point),
-        b"",
-    ))
+    Ok(finalize::<G, H>(&token.data, &token.blind, point))
 }
 
 ///////////
@@ -127,7 +125,7 @@ mod tests {
             RistrettoPoint::from_scalar_slice(GenericArray::from_slice(&oprf_key[..])).unwrap();
         let res = point * scalar;
 
-        finalize::<RistrettoPoint, sha2::Sha512>(&input, &res.to_arr().to_vec(), b"")
+        finalize_after_unblind::<RistrettoPoint, sha2::Sha512>(&input, res)
     }
 
     #[test]
@@ -141,8 +139,7 @@ mod tests {
         ];
         let oprf_key = RistrettoPoint::from_scalar_slice(&oprf_key_bytes)?;
         let beta = evaluate::<RistrettoPoint>(alpha, &oprf_key);
-        let res =
-            finalize::<RistrettoPoint, sha2::Sha512>(&token.data, &unblind(&token, beta), b"");
+        let res = finalize::<RistrettoPoint, sha2::Sha512>(&token.data, &token.blind, beta);
         let res2 = prf(&input[..], &oprf_key.as_bytes());
         assert_eq!(res, res2);
         Ok(())
@@ -154,12 +151,11 @@ mod tests {
         let mut input = vec![0u8; 64];
         rng.fill_bytes(&mut input);
         let (token, alpha) = blind::<_, RistrettoPoint, sha2::Sha512>(&input, &mut rng).unwrap();
-        let res =
-            finalize::<RistrettoPoint, sha2::Sha512>(&token.data, &unblind(&token, alpha), b"");
+        let res = finalize::<RistrettoPoint, sha2::Sha512>(&token.data, &token.blind, alpha);
 
         let dst = [STR_VOPRF, &RistrettoPoint::get_context_string(MODE_BASE)].concat();
         let point = RistrettoPoint::map_to_curve::<Sha512>(&input, &dst).unwrap();
-        let res2 = finalize::<RistrettoPoint, sha2::Sha512>(&input, &point.to_arr().to_vec(), b"");
+        let res2 = finalize_after_unblind::<RistrettoPoint, sha2::Sha512>(&input, point);
 
         assert_eq!(res, res2);
     }


Test patch:
diff --git a/src/serialization/tests.rs b/src/serialization/tests.rs
index 1627262..596639c 100644
--- a/src/serialization/tests.rs
+++ b/src/serialization/tests.rs
@@ -74,14 +74,15 @@ fn server_registration_roundtrip() {
     let reg = ServerRegistration::<Default>::deserialize(&oprf_bytes[..]).unwrap();
     let reg_bytes = reg.serialize();
     assert_eq!(reg_bytes, oprf_bytes);
-    // If we do have envelope and client pk, the server registration contains
-    // the whole kit
+
+    let mut ciphertext = [0u8; 32];
+    rng.fill_bytes(&mut ciphertext);
 
     // Construct a mock envelope
     let mut mock_envelope_bytes = Vec::new();
     mock_envelope_bytes.extend_from_slice(&[1; 1]); // mode = 1
     mock_envelope_bytes.extend_from_slice(&vec![0; NonceLen::to_usize()]); // empty nonce
-    mock_envelope_bytes.extend_from_slice(&[0, 0]); // empty ciphertext
+    mock_envelope_bytes.extend_from_slice(&ciphertext); // ciphertext which is an encrypted private key
     mock_envelope_bytes.extend_from_slice(&[0; MAC_SIZE]); // length-MAC_SIZE hmac
 
     let mock_client_kp = Default::generate_random_keypair(&mut rng);
diff --git a/src/tests/full_test.rs b/src/tests/full_test.rs
index e0ca122..cf5a6a4 100644
--- a/src/tests/full_test.rs
+++ b/src/tests/full_test.rs
@@ -68,37 +68,37 @@ pub struct TestVectorParameters {
 
 static TEST_VECTOR: &str = r#"
 {
-    "client_s_pk": "c83bbe77d4bae020134fa3e75eb8e21f52bbcab7149d0d921af52c6a3edc6706",
-    "client_s_sk": "e0f252dc3506125ac25b9cf57c0f5104070e3990f432a319c801d47c25eff209",
-    "client_e_pk": "1a28a68246a6149c429e8ebe57dccbb764d9ff7a6b094727dbd863ec3b553b3a",
-    "client_e_sk": "3eb9867c6b0d0031f2fcab920598be82d526df916fab71d81842ced65a800008",
-    "server_s_pk": "b0240feaab8cefa1ed162c0f175243893681bae36a7a67a73881d3ae2345b811",
-    "server_s_sk": "37c93770d27945246edcb124c47d5fae83a9cd9e47c72cf681460ccc8cd4d70b",
-    "server_e_pk": "2a442437b58a4ed0a39a954d8f775e08d8d94f9554fe35618fa703d2fef7a66f",
-    "server_e_sk": "79ff8259a71fabb27d0c267677639bec741e7dbe72240c54eb70513eca5a8306",
+    "client_s_pk": "6e0a6082dd29936c44b47ecb8a5fe72e4b321a0ac314b0080ca4c48afdabd215",
+    "client_s_sk": "3000848b34d9073885d427e766b7093cc13bdce992ef31cd00ba2c77ff074504",
+    "client_e_pk": "5260ad6eb47ac1db44babcce9327327d50e1a0133c0425acca3efcf41b119718",
+    "client_e_sk": "1526e0bed9af28830da956589d65768ed2a20d9689e82c90b89e4e33904e4009",
+    "server_s_pk": "c21a38653eb19437669bfa066a446b6eea7c1f253ac7adf4798d6c68e171b273",
+    "server_s_sk": "2a38b385e9fb7e0a89aa0f005c729b0c4e22eeedea8c105cf136d9c5c334880f",
+    "server_e_pk": "125f4a2dd9353c8c37a08527a323908835d3fbc374260d32e829d5c3fa81f325",
+    "server_e_sk": "7ef6ada36f3983c0f24705a29d3a453e3e17c28d347f226b24c0aa5ab12a700d",
     "id_u": "696455",
     "id_s": "696453",
     "password": "70617373776f7264",
-    "blinding_factor": "3912c0df0f2b3b659da47803bdd94492084e5aa9b6f75d2966ed69aff57db001",
-    "oprf_key": "14a29db285876949dc997d4257a85ff53f9676a40c5c5428e20cd2e5b2ce9105",
-    "envelope_nonce": "08c8ea116a059f708b598cfba38664423bf00ecae224c22b2c4fe9d7c04f69f1",
-    "client_nonce": "e44552fcf7e2b872e80d9c0213adeba9e41c43c668f73e08aaa43f4fa7747e0e",
-    "server_nonce": "03bfe3d1ba36d894fda7fcdf02da7dd16b043e1a08d82b662a9cdcd65a621336",
+    "blinding_factor": "a32862d66eb57246321fb6b229e83786745c3afdf8957ebe38b01c17571ba105",
+    "oprf_key": "0851f5ec43e0b702bfcb9d8ec208085b51c0fc5200234901407c176327aa0b02",
+    "envelope_nonce": "78b006042d011bdca5d0058a978d2103a6d546de311a2e8cd025fbc67303a468",
+    "client_nonce": "43497a6f86ba31a6a7f399271fb3b4b4f82c4af086bc431ebaeab7d768ff8a64",
+    "server_nonce": "680cd27da18bc56d4317e7db61de1726a70ebe4e49aee38a3bdb6787cf85466e",
     "info1": "696e666f31",
     "einfo2": "65696e666f32",
-    "registration_request": "d6ebc1daf688bf812ca6ab0cbb797ba165aa2670c285f531ef7cd438c7b10f49",
-    "registration_response": "8c7c3b570fcfb533ce06b36e428be0b7504cbeda53ef17abda7149efdf6fa51bb0240feaab8cefa1ed162c0f175243893681bae36a7a67a73881d3ae2345b811",
-    "registration_upload": "c83bbe77d4bae020134fa3e75eb8e21f52bbcab7149d0d921af52c6a3edc67060208c8ea116a059f708b598cfba38664423bf00ecae224c22b2c4fe9d7c04f69f10020c87927d29c345906f2017ee54d959c2859cd49a2017ed0213d10ef42189de3ba17c334967d8f41e7f1b7f0bb2bfaa478a741f8c3395edde2154f04b415e64b36cc2d21aacdf2d9e25dd63073476537d3bff44b93d7c0e239062610c457ab2298",
-    "credential_request": "d6ebc1daf688bf812ca6ab0cbb797ba165aa2670c285f531ef7cd438c7b10f49e44552fcf7e2b872e80d9c0213adeba9e41c43c668f73e08aaa43f4fa7747e0e0005696e666f311a28a68246a6149c429e8ebe57dccbb764d9ff7a6b094727dbd863ec3b553b3a",
-    "credential_response": "8c7c3b570fcfb533ce06b36e428be0b7504cbeda53ef17abda7149efdf6fa51bb0240feaab8cefa1ed162c0f175243893681bae36a7a67a73881d3ae2345b8110208c8ea116a059f708b598cfba38664423bf00ecae224c22b2c4fe9d7c04f69f10020c87927d29c345906f2017ee54d959c2859cd49a2017ed0213d10ef42189de3ba17c334967d8f41e7f1b7f0bb2bfaa478a741f8c3395edde2154f04b415e64b36cc2d21aacdf2d9e25dd63073476537d3bff44b93d7c0e239062610c457ab229803bfe3d1ba36d894fda7fcdf02da7dd16b043e1a08d82b662a9cdcd65a6213362a442437b58a4ed0a39a954d8f775e08d8d94f9554fe35618fa703d2fef7a66f00064901d7e2dd4e743653346e3f049210c1353005640e5eec45b1123519b0601fa378b2cd74ea81a7d92e62298c80517db7f5deee19d7558004b6566c50264f6665cdae5dcc7913",
-    "credential_finalization": "9b2c7dc06e635a6f121df9e1781ddca3551757e181ed0585494a20f71b098b26faafa4943c931b7af582d28fd791934026d69583255a604a08f3913436dddec9",
-    "client_registration_state": "3912c0df0f2b3b659da47803bdd94492084e5aa9b6f75d2966ed69aff57db00170617373776f7264",
-    "client_login_state": "3912c0df0f2b3b659da47803bdd94492084e5aa9b6f75d2966ed69aff57db0010067d6ebc1daf688bf812ca6ab0cbb797ba165aa2670c285f531ef7cd438c7b10f49e44552fcf7e2b872e80d9c0213adeba9e41c43c668f73e08aaa43f4fa7747e0e0005696e666f311a28a68246a6149c429e8ebe57dccbb764d9ff7a6b094727dbd863ec3b553b3a00403eb9867c6b0d0031f2fcab920598be82d526df916fab71d81842ced65a800008e44552fcf7e2b872e80d9c0213adeba9e41c43c668f73e08aaa43f4fa7747e0e70617373776f7264",
-    "server_registration_state": "14a29db285876949dc997d4257a85ff53f9676a40c5c5428e20cd2e5b2ce9105",
-    "server_login_state": "cee1e837a695fc63287e3896a1305455ba06c553bb2253dce4295dacd25a2a6e7c6da523db352db9c3fafa6dd753ed5b060c9650176650ede7ecd85c52c4c6c63dae7f5c960b0e87f57fee3604ae36664bb514ca3a0e861f96124f12bf30002a3818ee21fe38e800c8a694dcbd0158a6a47496297b062fa1a4ce3c4971a00b042cbb870c351ba904f64d183f1cdc755bcab82ed00cf090bd73c1862423503cb1b66dda9fb369d22ac2fdc76b578db8b25e84a45bfe030702d704d354f8efaa27",
-    "password_file": "14a29db285876949dc997d4257a85ff53f9676a40c5c5428e20cd2e5b2ce9105c83bbe77d4bae020134fa3e75eb8e21f52bbcab7149d0d921af52c6a3edc67060208c8ea116a059f708b598cfba38664423bf00ecae224c22b2c4fe9d7c04f69f10020c87927d29c345906f2017ee54d959c2859cd49a2017ed0213d10ef42189de3ba17c334967d8f41e7f1b7f0bb2bfaa478a741f8c3395edde2154f04b415e64b36cc2d21aacdf2d9e25dd63073476537d3bff44b93d7c0e239062610c457ab2298",
-    "export_key": "dec7b035715f5a7cc3cc205d190a2fce6ce81a6c643e644689a6516aed5b35c7fa31babe78edb1845d6ab092784feeae7ed11919dfcd90077b15e43e69a878ea",
-    "session_key": "2cbb870c351ba904f64d183f1cdc755bcab82ed00cf090bd73c1862423503cb1b66dda9fb369d22ac2fdc76b578db8b25e84a45bfe030702d704d354f8efaa27"
+    "registration_request": "14ba86e53018ce5507d2bfb2d98ad3f60e302d826bff3410a5ec669c8e1ef17d",
+    "registration_response": "aee5c937a85acfbdbd71faf1c5519bfe9e44b0b7489dcc663df9f1ca5b520b6ac21a38653eb19437669bfa066a446b6eea7c1f253ac7adf4798d6c68e171b273",
+    "registration_upload": "6e0a6082dd29936c44b47ecb8a5fe72e4b321a0ac314b0080ca4c48afdabd2150278b006042d011bdca5d0058a978d2103a6d546de311a2e8cd025fbc67303a4687618b32fe2ec2a5c2b6efecec1e6e535106de80af68733673daf0b644965966fa3f279e532d7ecef363f8d55ff6df4c473cfb1049a73f632972bfcc6744185d13a671dd6678d49fb1629a6fbfbe266937378fd9e772c2dd72692d1a35c020010",
+    "credential_request": "14ba86e53018ce5507d2bfb2d98ad3f60e302d826bff3410a5ec669c8e1ef17d43497a6f86ba31a6a7f399271fb3b4b4f82c4af086bc431ebaeab7d768ff8a640005696e666f315260ad6eb47ac1db44babcce9327327d50e1a0133c0425acca3efcf41b119718",
+    "credential_response": "aee5c937a85acfbdbd71faf1c5519bfe9e44b0b7489dcc663df9f1ca5b520b6ac21a38653eb19437669bfa066a446b6eea7c1f253ac7adf4798d6c68e171b2730278b006042d011bdca5d0058a978d2103a6d546de311a2e8cd025fbc67303a4687618b32fe2ec2a5c2b6efecec1e6e535106de80af68733673daf0b644965966fa3f279e532d7ecef363f8d55ff6df4c473cfb1049a73f632972bfcc6744185d13a671dd6678d49fb1629a6fbfbe266937378fd9e772c2dd72692d1a35c020010680cd27da18bc56d4317e7db61de1726a70ebe4e49aee38a3bdb6787cf85466e125f4a2dd9353c8c37a08527a323908835d3fbc374260d32e829d5c3fa81f32500068a4c321f3c375613862ba83f7e5abb8f1d26dbd8035d39f192eb1324c2214457098054a2cbdf5d4ab2894eaf152af8c4be61d701c5a1ab1ec3e1cee5810898140b81771db0be",
+    "credential_finalization": "330aa8ac01bbc9d9642fe1c286187379efe12da14aceab86b22449d21f242d89adabc0295751b4e007beabc413ae9cbf9979e324749953705fd85b87c9c1b1a2",
+    "client_registration_state": "a32862d66eb57246321fb6b229e83786745c3afdf8957ebe38b01c17571ba10570617373776f7264",
+    "client_login_state": "a32862d66eb57246321fb6b229e83786745c3afdf8957ebe38b01c17571ba105006714ba86e53018ce5507d2bfb2d98ad3f60e302d826bff3410a5ec669c8e1ef17d43497a6f86ba31a6a7f399271fb3b4b4f82c4af086bc431ebaeab7d768ff8a640005696e666f315260ad6eb47ac1db44babcce9327327d50e1a0133c0425acca3efcf41b11971800401526e0bed9af28830da956589d65768ed2a20d9689e82c90b89e4e33904e400943497a6f86ba31a6a7f399271fb3b4b4f82c4af086bc431ebaeab7d768ff8a6470617373776f7264",
+    "server_registration_state": "0851f5ec43e0b702bfcb9d8ec208085b51c0fc5200234901407c176327aa0b02",
+    "server_login_state": "89cd93dce8f59cf7b187736c50cbc3ca2e0bbbad0a0be1ddee180a2d95db60695b384be2dd673434ef94bcdbb1b457f63f41cd79ed2422c021c34ca1433b70576920ebb950ad1c40c8c015ec6832e12427e755ba21d005f0b6d5d66d2368ab5ec6f32151fced5a3aa25472c425912242de3638ef57f28b0dd02a956064e5bb9b8fcd73add52d233a454d6b20125e9506a95aae8772ebbfac4d70efe1fb10078fd40f93d84aa7db53853ca74436c917c427cd5c2e408860937e6f7ab80816ca47",
+    "password_file": "0851f5ec43e0b702bfcb9d8ec208085b51c0fc5200234901407c176327aa0b026e0a6082dd29936c44b47ecb8a5fe72e4b321a0ac314b0080ca4c48afdabd2150278b006042d011bdca5d0058a978d2103a6d546de311a2e8cd025fbc67303a4687618b32fe2ec2a5c2b6efecec1e6e535106de80af68733673daf0b644965966fa3f279e532d7ecef363f8d55ff6df4c473cfb1049a73f632972bfcc6744185d13a671dd6678d49fb1629a6fbfbe266937378fd9e772c2dd72692d1a35c020010",
+    "export_key": "8197f91f0d4de1ab126d8dfd06abd0d5df420ce40a135ef376e4ffe515930f413632390e7dc3dcfd19afff62b9113e10eb6c359fc327df6e9ad4d0f06c242322",
+    "session_key": "8fcd73add52d233a454d6b20125e9506a95aae8772ebbfac4d70efe1fb10078fd40f93d84aa7db53853ca74436c917c427cd5c2e408860937e6f7ab80816ca47"
 }
 "#;
 
diff --git a/src/tests/opaque_test_vectors.rs b/src/tests/opaque_test_vectors.rs
index 85c85dc..dc54c46 100644
--- a/src/tests/opaque_test_vectors.rs
+++ b/src/tests/opaque_test_vectors.rs
@@ -60,6 +60,8 @@ pub struct TestVectorParameters {
     pub session_key: Vec<u8>,
 }
 
+// Pulled from "OPAQUE-3DH Test Vector 1" and "OPAQUE-3DH Test Vector 6"
+// of https://datatracker.ietf.org/doc/draft-irtf-cfrg-opaque/
 static TEST_VECTORS: &[&str] = &[
     r#"
 OPRF: 0001
@@ -71,8 +73,8 @@ Nh: 64
 Npk: 32
 Nsk: 32
 password: 436f7272656374486f72736542617474657279537461706c65
-envelope_nonce: 8dee75c66f14d8b891c6ba66f1ff8d27ab595186789ca5edf46dd
-427b6effb95
+envelope_nonce: cc7abb200199d5071c94efa49fb62435d3e70d03cf9573a95da54
+20d3eebcd2b
 client_private_key: 8bcb0b70dac18de24eef12e737d6b28724d3e37774e0b092f
 9f70b255defaf04
 client_public_key: 360e716c676cfe4d9968d1a352ed3faf17603863e0a7aa1905
@@ -83,10 +85,10 @@ server_public_key: 66e130c6eb5b41f851b235b03a0eafeaa883f64147bc62cb74
 9c22c762389c3c
 client_info: 68656c6c6f20626f62
 server_info: 6772656574696e677320616c696365
-server_nonce: 1b42bc94d7f3844a0a284d377fbbe2bdef574d386c9f8b5ead7b7e1
-5b151b939
-client_nonce: 4b6737c0bb603516ffaad7af55446a4d179187eba9e1b987aabe2be
-05397b701
+server_nonce: 98b8081059f60ffed9336f026fd8e124737205ac73f5348ae5bebdb
+49456c70f
+client_nonce: 58dc21475ff730342f807bf031c7ae47a11f0d4dfaa63a7feb15d7e
+36427ca44
 server_keyshare: 5214e3ddc73db786480b79fa2da787f2080b82cbe922c2a9592b
 44597d9a702e
 client_keyshare: a4084c7296b1a3d5a5e4a24358750489575acfd8fcfa6e787492
@@ -101,61 +103,60 @@ blind_login: c4d5a15f0d5ffc354e340454ec779f575e4573a3886ab5e57e4da298
 4bdd5306
 oprf_key: 080d0a4d352de92672ab709b1ae1888cb48dfabc2d6ca5b914b335512fe
 70508
-auth_key: 89f76086c4a22a1f9d6c0ab4c7f5b2b4602d756267f8ba7a27aaac1c624
-8ec621e16e7935af1b1fa38ca0c389b8e563b8c7e0daa6cfbbc2ad53ea40e006ac243
-prk: 159cb43f6d84d9423771010ff0223015870856ac20601876d6d02a9298bd7ec0
-ef656d6537420e5d26d768454089389618c6f52c5865c855f2b2684c33c2a225
-pseudorandom_pad: dc07da9e15679d4defb299284a029be4878469c905071f2b3d7
-08de16c0b1f6e
-envelope: 018dee75c66f14d8b891c6ba66f1ff8d27ab595186789ca5edf46dd427b
-6effb95002057ccd1eecfa610afa15d8bcf7dd42963a3578abe71e7afb9c48786c431
-e4b06ac6906d20d50ea18fe30a05152ac17f34d49cb00567f1cc37d2c7951e00a6c3b
-dec25eed743d642c859f48425ecfd695ea27ffe9ee7df6232a8e0bf0b30c774bc
-handshake_secret: c7c26c98fe5b164538ce0991e6dc2a3d7e50f78ee4ffac5dc66
-48252fc43e10d3574040202417a2199d20841352ec63a25d22dd4e1f33630f2a02836
-a9c6f0ce
-handshake_encrypt_key: acb381928b2928e92b8780a7ab446e81f1b39545a1a287
-bc33693882c5bb202cca4418aa416d955a2309f7663656c48fe63a261c62afa6fbd76
-90b031e6d6cc5
-server_mac_key: 4f45b1d86815c029d3bca5bf453d693f12bee45a0a71014ab0873
-0939eb529ab2b532275887aaa6853866e1fe8ae67a34d555c94726128beb37f4debd9
-009407
-client_mac_key: ce95ecfcbed2348997e4ef4f232e8448e94f7bfefb9b135a12390
-05963c2b6a415a760cb85b44df0da423e32d110e00c42251cb6e7cb19c512a17e28ad
-bc6fa3
+auth_key: 7bb7f2b831ee30d3e5cc4012c8f721a4d8f9dd494932d53776e043df9bd
+2aa284025b8b006fd8449536446ff50698f46c73fccb53f20d80898f185307d1d39e5
+prk: b0aefddbb21d1b97bc40c07b172e0bf172ec740de4f6274f69d46350a447e9b1
+b3fb1e4cefc7d8e393ff58a5c45c74d0615ee0eecde116f3d4e744142eb2ee89
+pseudorandom_pad: 36a828b3b57bf242c4c47ccd9cb84e5b3cefaffe09629c6b94d
+eba0ccec5fa39
+envelope: 01cc7abb200199d5071c94efa49fb62435d3e70d03cf9573a95da5420d3
+eebcd2bbd6323c36fba7fa08a2b6e2aab6efcdc183c4c897d822cf96d29b129932a55
+3d469ffa9999fcbd37a1e8b6c1e579bcf83fed355c9ff413e6158d72d16f3ccd8699e
+906027842694b6293b6303bbb7f324e0fccb4ae0f01edb60ee1d32992696e
+handshake_secret: 2b041dcf12ac9b75dded88f891c25d76746ce9e2c1a43118ac4
+aa5721cdc1bc2f0691e6c012a1ea9eb95ab4899b3e7058d37fe9546c46b0511877e40
+f55aac6c
+handshake_encrypt_key: ceef10f15d869a4cea8174fa98d0d96c7aaf8602d006fe
+0c5274a40173db76cac820138c5890bb63fb974d1e3e925850cc2464e2c10f0a9a776
+9a45e80889b1e
+server_mac_key: f8fd7fdc349b5ae1339515e05912c89a795f561a117cdc84d8d8b
+5f05b05751abfb87fa01c799c5d367244d1e32eab67ff926833c6025c556acffa4af1
+f3871a
+client_mac_key: 92a30cc82c374c06895aa07e81f0cf5f25309a24b595faefcd225
+1f9219b47e47d17da4fe8b572dedefa350ed365f87b217973e90d0b647a2ccf1d796a
+8970f6
 registration_request: ec9027daa5e9a901d641286a7ded51364142936ac7636e1
 42e3f4368b4bd8124
 registration_response: 8867d7c8c2c576a6322d49d46078ea32f479aed917c70a
 636d3ada4397ea1c0e66e130c6eb5b41f851b235b03a0eafeaa883f64147bc62cb749
 c22c762389c3c
 registration_upload: 360e716c676cfe4d9968d1a352ed3faf17603863e0a7aa19
-05df6ea129343b09018dee75c66f14d8b891c6ba66f1ff8d27ab595186789ca5edf46
-dd427b6effb95002057ccd1eecfa610afa15d8bcf7dd42963a3578abe71e7afb9c487
-86c431e4b06ac6906d20d50ea18fe30a05152ac17f34d49cb00567f1cc37d2c7951e0
-0a6c3bdec25eed743d642c859f48425ecfd695ea27ffe9ee7df6232a8e0bf0b30c774
-bc
+05df6ea129343b0901cc7abb200199d5071c94efa49fb62435d3e70d03cf9573a95da
+5420d3eebcd2bbd6323c36fba7fa08a2b6e2aab6efcdc183c4c897d822cf96d29b129
+932a553d469ffa9999fcbd37a1e8b6c1e579bcf83fed355c9ff413e6158d72d16f3cc
+d8699e906027842694b6293b6303bbb7f324e0fccb4ae0f01edb60ee1d32992696e
 KE1: e06a32011e1b1704eb686b263e5d132fff4e9f6429cd93b98db107485006792c
-4b6737c0bb603516ffaad7af55446a4d179187eba9e1b987aabe2be05397b70100096
+58dc21475ff730342f807bf031c7ae47a11f0d4dfaa63a7feb15d7e36427ca4400096
 8656c6c6f20626f62a4084c7296b1a3d5a5e4a24358750489575acfd8fcfa6e787492
 b98265a5e651
 KE2: 66f6b5fa1a4eb6bd7a0c93ed2639a31cba0d02e2df744003641d5a30a4a12364
-66e130c6eb5b41f851b235b03a0eafeaa883f64147bc62cb749c22c762389c3c018de
-e75c66f14d8b891c6ba66f1ff8d27ab595186789ca5edf46dd427b6effb95002057cc
-d1eecfa610afa15d8bcf7dd42963a3578abe71e7afb9c48786c431e4b06ac6906d20d
-50ea18fe30a05152ac17f34d49cb00567f1cc37d2c7951e00a6c3bdec25eed743d642
-c859f48425ecfd695ea27ffe9ee7df6232a8e0bf0b30c774bc1b42bc94d7f3844a0a2
-84d377fbbe2bdef574d386c9f8b5ead7b7e15b151b9395214e3ddc73db786480b79fa
-2da787f2080b82cbe922c2a9592b44597d9a702e000ff048b3a462ab243936a4ef2de
-87dd0bcd3e7d7f12004b59dc8edeff2885f9dbafa60a55d1d31397b0dd25944ea8b63
-842d77720aec60e0708b24cc9a311d424f3880b3ac84a68adc7b5947d5266ec5
-KE3: 17ace8fa7c3956f1ea6684fae1bae259e0d8d78214b235e8646904576c17fc43
-b7a8eeb6b21b8ee94a31cc075717e8c0b25e8803837238055236ae908010a8e3
-export_key: 13af620bbf9cf45da6d4223500d2a9c79b28478d7548cfd52e3708ffc
-4d9ddffa9c7735e1958751efbd68c79df6c451ccc48b41dda1748b585c2b5fd7d7f82
-64
-session_key: 0b51348833b30bfeceab9d13888111c2fcf9c93b6689e1d6c601a26c
-a29aa25e19949955ec7d056fce67c24d0fb1b53ea47e27e7966fc267379c3d0c9a738
-f54
+66e130c6eb5b41f851b235b03a0eafeaa883f64147bc62cb749c22c762389c3c01cc7
+abb200199d5071c94efa49fb62435d3e70d03cf9573a95da5420d3eebcd2bbd6323c3
+6fba7fa08a2b6e2aab6efcdc183c4c897d822cf96d29b129932a553d469ffa9999fcb
+d37a1e8b6c1e579bcf83fed355c9ff413e6158d72d16f3ccd8699e906027842694b62
+93b6303bbb7f324e0fccb4ae0f01edb60ee1d32992696e98b8081059f60ffed9336f0
+26fd8e124737205ac73f5348ae5bebdb49456c70f5214e3ddc73db786480b79fa2da7
+87f2080b82cbe922c2a9592b44597d9a702e000f72f38a0945819089c44c86820c51d
+89cc35f77df03d330101bbed3b2f69066112f32529bdda0998657350fc9f8da4cde73
+408ad931f4c2ea6237ccae4696483388b174f50cf96d439139b0f8680c3b
+KE3: 9f0e4f73455ca9fe06bb52ad02670b09be5a03db11a73be4422f19963be082b0
+eb55871022e8d1d87adc3ab50de7c738058eb659866d091648f2fed12e23fd53
+export_key: 66c0b72aa829f13a166fb1a1168f1e26023921f0eed1126def4f81ba0
+4924ad6012e42b63656ec199ba27670d1e7f23dc0a927714edc140134dde5a5d2063d
+fc
+session_key: 951c2bb1b876725fa7d3829db791dddd406a688507b47e24101bd0cc
+5d071760b6fba59e8758a6ea6d7e5f51a715b49a47c50fee9a7c8a0451243c3ee837f
+d30
 "#,
     r#"
 OPRF: 0001
@@ -171,8 +172,8 @@ e16a6dde6b05
 server_identity: eae9dfa6b8348d34418c32d385e1eac99efbce1af320901f7c8e
 de8d6d272c65
 password: 436f7272656374486f72736542617474657279537461706c65
-envelope_nonce: 54cd539b090014c3ac095611ba067be43c8592ddcbcf234f36569
-8f964ed836f
+envelope_nonce: f41e8b3c5a999aa946f9b562a150e5c5e36748a31a79feb241809
+0438877888c
 client_private_key: dc70a99bbabf1ebe98b192e93cedceb9c0164e95b891bd8bc
 81721b83d66b00b
 client_public_key: 20fa92f2e4b7ea5b5e677ac4930ff3b93b0043481ab70bc613
@@ -183,10 +184,10 @@ server_public_key: eae9dfa6b8348d34418c32d385e1eac99efbce1af320901f7c
 8ede8d6d272c65
 client_info: 68656c6c6f20626f62
 server_info: 6772656574696e677320616c696365
-server_nonce: 539290dde2ab6046896ff9dfda5d149f5ffbdc7ce165dffaa1c1b03
-4a1af27df
-client_nonce: ef2e5f21761e7c387a770e6ab729fd31203c29acb18b146da3ba2a7
-02cf905ac
+server_nonce: ef49d83cef5f1411ea30abb82b08bd85423aadb86e2c19df5930b3c
+8498b9f97
+client_nonce: 4ab1227db632bc079f79c0f5279df2dfa75cfbd4434ab40dcf844d6
+77165cd3b
 server_keyshare: 96a9587e233e67f2397f10fec6355b68102534f1f1b115b4ddf7
 485840efcd7c
 client_keyshare: 54f35db3a52fb0cf2a97918a6987993231d227e28711eaef19a3
@@ -201,61 +202,60 @@ blind_login: 141e21373228a44b09d4c00da9a6bbaf9a5e54a1687c07f327833643
 4245510b
 oprf_key: b7126967aa0cb69c311b71343843ea041bae30e2bde41b548b8fbd8bced
 97604
-auth_key: 8e7357bf9c0d2a846452cdd3956d454365df0d307d619cc57e0eefa1aef
-31b94e7eaee4402c13f0e508cbcdcc87e9cd1b18e08a258ae185bf74646379468ad0f
-prk: b4d69d383cf93c3ea746a668b55de501a574a0aad0a7062e56d5f9942b5dcdf4
-7109fb186261a209e7bdd20cde44c15a6095afc36f402cf1e2108783f11b8302
-pseudorandom_pad: 1b83a29b29d86d9959b18621522ba3c639cd262236f124d5da5
-75817ade23ffd
-envelope: 0254cd539b090014c3ac095611ba067be43c8592ddcbcf234f365698f96
-4ed836f0020c7f30b0093677327c10014c86ec66d7ff9db68b78e60995e124079af90
-848ff6ef0b9e59e3d41ccbe83e08cfaec1124d3e557b8b7ffe4225e5a1f40bee6c077
-6238028b6ab6c331534b35afde8806e7e4fb73b2eb255aa1484e6b5b608a3c3ac
-handshake_secret: fd4ce6630386646324016ff5e8aff286e8325666ced7df3a39b
-cfa200ec5c0d501505af4150439b14101ed540cc58c15e9ed0c6e8d0ae03c1758727a
-bd2a20cd
-handshake_encrypt_key: 9f13439e483065b0657dd575c30b56382e3fc9adec8e3a
-171e3448ad13cb74be64af7968fb6109a3661124fcef29dd3e29f350f6095cdb97dd3
-df2fda07c5273
-server_mac_key: 70ac95f82f1936b945bd29dcafe19d17e9fd06f27eea1893ed1ad
-af7ec596afe478125413cfd510406a8e93ffba72792c432a7cc93b1176c7ac3326882
-6b5e60
-client_mac_key: c0d5bfd0367a6a09c1b07a61703d2b4cc41e47a2e3a1372472c93
-5a0b531f2f0902a038496768deadf5f8cb867c0b59df48682619f4e9a0c7c909ac0d2
-cce2a4
+auth_key: 9f761a5a56a74269b382403aeba47c1d24b9e200e1839efcb616fb280da
+1b6ba7bd71d6455dd3cd979c545608cfbfc1c4e9ba677e1d40848054a00696c4b2589
+prk: 30bc3f37a757890ac17ce46043f3c5ed30c96fb8743205e77e84dc167d98e114
+6093150ff7b4d002f793bfe717e88d174ed2669abdd9e96af473a7ac82973b0a
+pseudorandom_pad: b909f990c94b9c5949a2b8d0874d602f846b7981b331fd79978
+b530cc46c8670
+envelope: 02f41e8b3c5a999aa946f9b562a150e5c5e36748a31a79feb2418090438
+877888c6579500b73f482e7d1132a39bba0ae96447d37140ba040f25f9c72b4f90a36
+7bdb425fa1dd4c49e17780f33b821e1e019668fe7f45520e26996ac8cb08e3d2566cc
+439c83030464effecb8350e7b1ca31087d87f6a45ed3910c185a24a89d282
+handshake_secret: ff89f264f8c3974238f4c8d736af7b0a55f2e4edc487cbf3e5c
+7b4bbf21acd7c1d28354c2c8555fba57c4d4b1fbb4b772bfdf909881f67dd517cc9f4
+f6ebaeac
+handshake_encrypt_key: 3071b181f639062cf70b74d0ffe5ec8fa695da13cd2f00
+e74b8b7ef348ae7a5df9c3a32c9f7aeaad5a28379712cf849b9707e221dce124abfad
+d0225a8e8e045
+server_mac_key: 7c37b344d189cbbeff80bbb4b78e2703d1a80dc28239923094287
+62f7ce2a93b11f6e85dd45c02809afe8583d4aad6377e72788773af92eef33c690692
+20ae76
+client_mac_key: 2c4aff12ba7aa911a51f9e5b7a7c01439d854c97e4b8ec842a9db
+d78345760328fd5a72424e49e25ec8fe1b6d9d42f774516f400948bd5a105d995d000
+2fc83b
 registration_request: 3c8b89966e261a5aaf7aeb6dcdd94c87ce311bf197221b8
 7ef44632d58f18a05
 registration_response: caf9243d7ef3e267815632bf79c85a27a23f218a438815
 2a523f6a310949807beae9dfa6b8348d34418c32d385e1eac99efbce1af320901f7c8
 ede8d6d272c65
 registration_upload: 20fa92f2e4b7ea5b5e677ac4930ff3b93b0043481ab70bc6
-13b2e16a6dde6b050254cd539b090014c3ac095611ba067be43c8592ddcbcf234f365
-698f964ed836f0020c7f30b0093677327c10014c86ec66d7ff9db68b78e60995e1240
-79af90848ff6ef0b9e59e3d41ccbe83e08cfaec1124d3e557b8b7ffe4225e5a1f40be
-e6c0776238028b6ab6c331534b35afde8806e7e4fb73b2eb255aa1484e6b5b608a3c3
-ac
+13b2e16a6dde6b0502f41e8b3c5a999aa946f9b562a150e5c5e36748a31a79feb2418
+090438877888c6579500b73f482e7d1132a39bba0ae96447d37140ba040f25f9c72b4
+f90a367bdb425fa1dd4c49e17780f33b821e1e019668fe7f45520e26996ac8cb08e3d
+2566cc439c83030464effecb8350e7b1ca31087d87f6a45ed3910c185a24a89d282
 KE1: 8261a1efd78bea73faf256a23c200d729259886530fa43b875c1ca124b09bc7e
-ef2e5f21761e7c387a770e6ab729fd31203c29acb18b146da3ba2a702cf905ac00096
+4ab1227db632bc079f79c0f5279df2dfa75cfbd4434ab40dcf844d677165cd3b00096
 8656c6c6f20626f6254f35db3a52fb0cf2a97918a6987993231d227e28711eaef19a3
 e5033632611a
 KE2: fa1f33a43a03123ebe35345ef93aa23b57ea8bfbee7022b05a179d60768ba02e
-eae9dfa6b8348d34418c32d385e1eac99efbce1af320901f7c8ede8d6d272c650254c
-d539b090014c3ac095611ba067be43c8592ddcbcf234f365698f964ed836f0020c7f3
-0b0093677327c10014c86ec66d7ff9db68b78e60995e124079af90848ff6ef0b9e59e
-3d41ccbe83e08cfaec1124d3e557b8b7ffe4225e5a1f40bee6c0776238028b6ab6c33
-1534b35afde8806e7e4fb73b2eb255aa1484e6b5b608a3c3ac539290dde2ab6046896
-ff9dfda5d149f5ffbdc7ce165dffaa1c1b034a1af27df96a9587e233e67f2397f10fe
-c6355b68102534f1f1b115b4ddf7485840efcd7c000f32cb65026f996c3838716d302
-454eee577a049edb36c5d06f9faf4a2eced065c07f4db4767bf3482bdf4014177b963
-4f5f419bcb0606835bd417de4b4a2425c7f32faa49c4395aab6192d75d34e9fa
-KE3: 734742138587e8553944a16f7e3f12554c54e96d7361e90c909e5de518267c46
-676e3b514c68564c6dd60194860f7f425d816042fcf00c0b15ede703216f5fe4
-export_key: 5e373cf62e2e1ee77b527e514eeb2844d69285401b5a27a7dfe8fb889
-7a56190acfa179f68368ed3bc2068ab05de63670e691a0bbfde9d4bed6e1b57ae008a
-ec
-session_key: fa3156746b8a70e812aeff1dc50e7587dcc31acb0bf1705827918768
-c3e9dbbd893de24e890c341aed9c75a1bef6fbe36f150a2da706ec989013238c3fd94
-2a1
+eae9dfa6b8348d34418c32d385e1eac99efbce1af320901f7c8ede8d6d272c6502f41
+e8b3c5a999aa946f9b562a150e5c5e36748a31a79feb2418090438877888c6579500b
+73f482e7d1132a39bba0ae96447d37140ba040f25f9c72b4f90a367bdb425fa1dd4c4
+9e17780f33b821e1e019668fe7f45520e26996ac8cb08e3d2566cc439c83030464eff
+ecb8350e7b1ca31087d87f6a45ed3910c185a24a89d282ef49d83cef5f1411ea30abb
+82b08bd85423aadb86e2c19df5930b3c8498b9f9796a9587e233e67f2397f10fec635
+5b68102534f1f1b115b4ddf7485840efcd7c000f7ebe71d4ab326006a3aeca802435d
+c995a38ac6662221f974cb920992d82b8ef8d147c77e29b628a82b5ccb01ea2f7bb60
+af94cd1860e1bd974a11a1c9bd827789f663c4758eb71058c244138de0c2
+KE3: d81f93397cdba85a43993d4d9afbdc67f147adfa2b223213b19692cb820eef48
+5073eda4c8236b2f47702404ad60d9a875d189626fc7b7cc861825385470ae54
+export_key: 03192555940b5b42e64e6200bf55cc701f1bace3d402a2f8d83977843
+51a1e3fa1f07a471b783b208acb1d92be47903b6fa3a0df9f4d4b7956ee4f431e2950
+f6
+session_key: 58a7fa98bf3b7b52da21406abfb11d98734354edd47d7b32462c0513
+f0617c89824ea6031d4147a86fc9f6c6837ce640c12fb937d764f296d1a9421ad1b2a
+5d5
 "#,
 ];
 
diff --git a/src/tests/voprf_test_vectors.rs b/src/tests/voprf_test_vectors.rs
index 56f634b..7ad5274 100644
--- a/src/tests/voprf_test_vectors.rs
+++ b/src/tests/voprf_test_vectors.rs
@@ -16,8 +16,6 @@ struct VOPRFTestVectorParameters {
     blind: Vec<u8>,
     blinded_element: Vec<u8>,
     evaluation_element: Vec<u8>,
-    unblinded_element: Vec<u8>,
-    info: Vec<u8>,
     output: Vec<u8>,
 }
 
@@ -26,26 +24,22 @@ struct VOPRFTestVectorParameters {
 static OPRF_RISTRETTO255_SHA512: &'static [&str] = &[
     r#"
     {
-        "sksm": "c604c785ada70d77a5256ae21767de8c3304115237d262134f5e46e512cf8e03",
+        "sksm": "758cbac0e1eb4265d80f6e6489d9a74d788f7ddeda67d7fb3c08b08f44bda30a",
         "input": "00",
-        "blind": "5ed895206bfc53316d307b23e46ecc6623afb3086da74189a416012be037e50b",
-        "blinded_element": "5cccd309ec729aebe398c53e19c0ab09c24a29f01036960bdad109852e7bdb44",
-        "evaluation_element": "86bd5eeabf29a87cb4a5c7207cb3ade5297e65f9b74c979bd3551891f4b21515",
-        "unblinded_element": "3c7f2d901c0d4f245503a186086fbdf5d8b4408432b25c5163e8b5a19c258348",
-        "info": "4f505246207465737420766563746f7273",
-        "output": "0bb570873cc0402ca38f1a2c395301f2a3627616e305f2bc54bb08c3f6ea9871eb71074e52e36b90778ba7c3e3429ef7170245c9e01647f3827fdef84d3ba930"
+        "blind": "c604c785ada70d77a5256ae21767de8c3304115237d262134f5e46e512cf8e03",
+        "blinded_element": "3c7f2d901c0d4f245503a186086fbdf5d8b4408432b25c5163e8b5a19c258348",
+        "evaluation_element": "fc6c2b854553bf1ed6674072ed0bde1a9911e02b4bd64aa02cfb428f30251e77",
+        "output": "d8ed12382086c74564ae19b7a2b5ed9bdc52656d1fc151faaae51aaba86291e8df0b2143a92f24d44d5efd0892e2e26721d27d88745343493634a66d3a925e3a"
     }
     "#,
     r#"
     {
-        "sksm": "c604c785ada70d77a5256ae21767de8c3304115237d262134f5e46e512cf8e03",
+        "sksm": "758cbac0e1eb4265d80f6e6489d9a74d788f7ddeda67d7fb3c08b08f44bda30a",
         "input": "5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a",
-        "blind": "ed8366feb6b1d05d1f46acb727061e43aadfafe9c10e5a64e7518d63e3263503",
-        "blinded_element": "227d63ca69e93bd062193c1e97fff3d5ebf628f646009d77c4e22ba6429be154",
-        "evaluation_element": "063b91a12e7cbb98dfeb75d8a7eeb83aacf9fd6df7e0b4197466fb77a27fa631",
-        "unblinded_element": "804ec6774764ed50a0bbad0a5f477aa04df7323acab8f98ca6e468b7790bca4c",
-        "info": "4f505246207465737420766563746f7273",
-        "output": "af7cc264dbc96a6b898ba0fa33bfa9e1407bf1dcfbf8772204d470d4458b8f047806679dbfa251f656b906edf9fa638e268adf979bd0e2380a092047d61f9db9"
+        "blind": "5ed895206bfc53316d307b23e46ecc6623afb3086da74189a416012be037e50b",
+        "blinded_element": "28a5e797b710f76d20a52507145fbf320a574ec2c8ab0e33e65dd2c277d0ee56",
+        "evaluation_element": "345e140b707257ae83d4911f7ead3177891e7a62c54097732802c4c7a98ab25a",
+        "output": "4d5f4221b5ebfd4d1a9dd54830e1ed0bce5a8f30a792723a6fddfe6cfe9f86bb1d95a3725818aeb725eb0b1b52e01ee9a72f47042372ef66c307770054d674fc"
     }
     "#,
 ];
@@ -63,8 +57,6 @@ fn populate_test_vectors(values: &Value) -> VOPRFTestVectorParameters {
         blind: decode(&values, "blind").unwrap(),
         blinded_element: decode(&values, "blinded_element").unwrap(),
         evaluation_element: decode(&values, "evaluation_element").unwrap(),
-        unblinded_element: decode(&values, "unblinded_element").unwrap(),
-        info: decode(&values, "info").unwrap(),
         output: decode(&values, "output").unwrap(),
     }
 }
@@ -112,34 +104,7 @@ fn test_evaluate() -> Result<(), PakeError> {
     Ok(())
 }
 
-// Tests sksm, evaluation_element -> evaluation_element
-#[test]
-fn test_unblind() -> Result<(), PakeError> {
-    for tv in OPRF_RISTRETTO255_SHA512 {
-        let parameters = populate_test_vectors(&serde_json::from_str(tv).unwrap());
-
-        let token = oprf::Token {
-            data: parameters.input,
-            blind: RistrettoPoint::from_scalar_slice(GenericArray::from_slice(
-                &parameters.blind[..],
-            ))
-            .unwrap(),
-        };
-
-        let unblinded_element = oprf::unblind::<RistrettoPoint>(
-            &token,
-            RistrettoPoint::from_element_slice(GenericArray::from_slice(
-                &parameters.evaluation_element,
-            ))
-            .unwrap(),
-        );
-
-        assert_eq!(&parameters.unblinded_element, &unblinded_element);
-    }
-    Ok(())
-}
-
-// Tests input, unblinded_element, info -> output
+// Tests input, blind, evaluation_element -> output
 #[test]
 fn test_finalize() -> Result<(), PakeError> {
     for tv in OPRF_RISTRETTO255_SHA512 {
@@ -147,8 +112,10 @@ fn test_finalize() -> Result<(), PakeError> {
 
         let output = oprf::finalize::<RistrettoPoint, Sha512>(
             &parameters.input,
-            &parameters.unblinded_element,
-            &parameters.info,
+            &RistrettoPoint::from_scalar_slice(GenericArray::from_slice(&parameters.blind))?,
+            RistrettoPoint::from_element_slice(GenericArray::from_slice(
+                &parameters.evaluation_element,
+            ))?,
         );
 
         assert_eq!(&parameters.output, &output.to_vec());