Przeglądaj źródła

dpf: "optimize" DummySpDpf::evaluate_domain

Lennart Braun 2 lat temu
rodzic
commit
85d390e3e8
1 zmienionych plików z 8 dodań i 0 usunięć
  1. 8 0
      dpf/src/spdpf.rs

+ 8 - 0
dpf/src/spdpf.rs

@@ -85,6 +85,14 @@ where
             V::zero()
         }
     }
+
+    fn evaluate_domain(key: &Self::Key) -> Vec<Self::Value> {
+        let mut output = vec![V::zero(); key.domain_size];
+        if key.get_party_id() == 0 {
+            output[key.alpha as usize] = key.beta;
+        }
+        output
+    }
 }
 
 /// Implementation of the Half-Tree DPF scheme from Guo et al. (ePrint 2022/1431, Figure 8)