浏览代码

Move depth() from DPF to RDPF

Ian Goldberg 1 年之前
父节点
当前提交
64fa2cbc67
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 1 5
      dpf.hpp
  2. 3 0
      rdpf.hpp

+ 1 - 5
dpf.hpp

@@ -42,15 +42,11 @@ struct DPF {
     DPFnode seed;
     // Which half of the DPF are we?
     bit_t whichhalf;
-    // correction words; the depth of the DPF is the length of this
-    // vector
+    // correction words
     std::vector<DPFnode> cw;
     // correction flag bits: the one for level i is bit i of this word
     value_t cfbits;
 
-    // The depth
-    inline nbits_t depth() const { return cw.size(); }
-
     // The seed
     inline node get_seed() const { return seed; }
 

+ 3 - 0
rdpf.hpp

@@ -52,6 +52,9 @@ struct RDPF : public DPF {
         return expansion[index];
     }
 
+    // The depth
+    inline nbits_t depth() const { return cw.size(); }
+
     // Get the leaf node for the given input
     //
     // Cost: depth AES operations