瀏覽代碼

dpf: "optimize" DummySpDpf::evaluate_domain

Lennart Braun 2 年之前
父節點
當前提交
85d390e3e8
共有 1 個文件被更改,包括 8 次插入0 次删除
  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)