Update to draft 19 (#101)

This commit is contained in:
daxpedda
2023-02-08 00:18:04 -08:00
committed by GitHub
parent 40d81294db
commit 5badeff8d2
15 changed files with 1022 additions and 984 deletions
+884 -887
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -14,7 +14,7 @@ pub(crate) fn rfc_to_json(input: &str) -> String {
}
fn parse_ciphersuites(input: &str) -> String {
let re = regex::Regex::new(r"## OPRF\((?P<ciphersuite>.+?)\)").unwrap();
let re = regex::Regex::new(r"\n## (?P<ciphersuite>.+?)\n").unwrap();
let mut ciphersuites = vec![];
let chunks: Vec<&str> = re.split(input).collect();
+6 -6
View File
@@ -97,7 +97,7 @@ fn test_vectors() -> Result<()> {
let ristretto_oprf_tvs = json_to_test_vectors!(
rfc,
String::from("ristretto255, SHA-512"),
String::from("ristretto255-SHA512"),
String::from("OPRF")
);
assert_ne!(ristretto_oprf_tvs.len(), 0);
@@ -109,7 +109,7 @@ fn test_vectors() -> Result<()> {
let ristretto_voprf_tvs = json_to_test_vectors!(
rfc,
String::from("ristretto255, SHA-512"),
String::from("ristretto255-SHA512"),
String::from("VOPRF")
);
assert_ne!(ristretto_voprf_tvs.len(), 0);
@@ -121,7 +121,7 @@ fn test_vectors() -> Result<()> {
let ristretto_poprf_tvs = json_to_test_vectors!(
rfc,
String::from("ristretto255, SHA-512"),
String::from("ristretto255-SHA512"),
String::from("POPRF")
);
assert_ne!(ristretto_poprf_tvs.len(), 0);
@@ -133,7 +133,7 @@ fn test_vectors() -> Result<()> {
}
let p256_oprf_tvs =
json_to_test_vectors!(rfc, String::from("P-256, SHA-256"), String::from("OPRF"));
json_to_test_vectors!(rfc, String::from("P256-SHA256"), String::from("OPRF"));
assert_ne!(p256_oprf_tvs.len(), 0);
test_oprf_seed_to_key::<NistP256>(&p256_oprf_tvs)?;
test_oprf_blind::<NistP256>(&p256_oprf_tvs)?;
@@ -142,7 +142,7 @@ fn test_vectors() -> Result<()> {
test_oprf_evaluate::<NistP256>(&p256_oprf_tvs)?;
let p256_voprf_tvs =
json_to_test_vectors!(rfc, String::from("P-256, SHA-256"), String::from("VOPRF"));
json_to_test_vectors!(rfc, String::from("P256-SHA256"), String::from("VOPRF"));
assert_ne!(p256_voprf_tvs.len(), 0);
test_voprf_seed_to_key::<NistP256>(&p256_voprf_tvs)?;
test_voprf_blind::<NistP256>(&p256_voprf_tvs)?;
@@ -151,7 +151,7 @@ fn test_vectors() -> Result<()> {
test_voprf_evaluate::<NistP256>(&p256_voprf_tvs)?;
let p256_poprf_tvs =
json_to_test_vectors!(rfc, String::from("P-256, SHA-256"), String::from("POPRF"));
json_to_test_vectors!(rfc, String::from("P256-SHA256"), String::from("POPRF"));
assert_ne!(p256_poprf_tvs.len(), 0);
test_poprf_seed_to_key::<NistP256>(&p256_poprf_tvs)?;
test_poprf_blind::<NistP256>(&p256_poprf_tvs)?;