diff --git a/yacl/crypto/primitives/dpf/dpf.cc b/yacl/crypto/primitives/dpf/dpf.cc index a8a573e0..a362e0c5 100644 --- a/yacl/crypto/primitives/dpf/dpf.cc +++ b/yacl/crypto/primitives/dpf/dpf.cc @@ -138,7 +138,7 @@ void DpfContext::Gen(DpfKey& first_key, DpfKey& second_key, DpfInStore alpha, DpfOutStore prg0 = DpfPRG(seeds_working[0]); DpfOutStore prg1 = DpfPRG(seeds_working[1]); - // if enable_evalall, we have only one last_cw_vec, otherwise, we + // if !enable_evalall, we have only one last_cw_vec, otherwise, we // have multiple last_cw_vec YACL_ENFORCE(first_key.last_cw_vec.empty()); YACL_ENFORCE(second_key.last_cw_vec.empty()); @@ -180,7 +180,7 @@ void DpfContext::Gen(DpfKey& first_key, DpfKey& second_key, DpfInStore alpha, } } // return {std::move(first_key), std::move(second_key)}; -} // namespace flcrypto +} DpfOutStore DpfContext::Eval(DpfKey& key, DpfInStore x) { YACL_ENFORCE(this->in_bitnum_ > log2(x)); diff --git a/yacl/crypto/primitives/ot/gywz_ote.h b/yacl/crypto/primitives/ot/gywz_ote.h index 566a60b3..24249355 100644 --- a/yacl/crypto/primitives/ot/gywz_ote.h +++ b/yacl/crypto/primitives/ot/gywz_ote.h @@ -24,7 +24,6 @@ /* submodules */ #include "yacl/crypto/base/aes/aes_opt.h" -#include "yacl/crypto/primitives/ot/gywz_ote.h" #include "yacl/crypto/primitives/ot/ot_store.h" #include "yacl/crypto/tools/crhash.h" #include "yacl/crypto/tools/prg.h" diff --git a/yacl/crypto/primitives/ot/ot_store.cc b/yacl/crypto/primitives/ot/ot_store.cc index b5bb9888..52fe066f 100644 --- a/yacl/crypto/primitives/ot/ot_store.cc +++ b/yacl/crypto/primitives/ot/ot_store.cc @@ -40,7 +40,7 @@ void SliceBase::ConsistencyCheck() const { YACL_ENFORCE(internal_buf_size_ >= internal_use_size_, "Buffer size should great or equal to slice size, got {} >= {}", internal_buf_size_, internal_use_size_); - YACL_ENFORCE(internal_buf_size_ > internal_buf_ctr_, "Slice out of range!"); + YACL_ENFORCE(internal_buf_size_ >= internal_buf_ctr_, "Slice out of range!"); } void SliceBase::InitCtrs(uint64_t use_ctr, uint64_t use_size, uint64_t buf_ctr,