Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinxc committed Sep 21, 2024
1 parent bf889e2 commit c89983e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions libspu/mpc/semi2k/beaver/beaver_impl/ttp_server/beaver_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "spdlog/spdlog.h"
#include "yacl/base/byte_container_view.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/pke/asymmetric_sm2_crypto.h"
#include "yacl/crypto/pke/sm2_enc.h"

#include "libspu/core/ndarray_ref.h"
#include "libspu/mpc/common/prg_tensor.h"
Expand Down Expand Up @@ -49,9 +49,8 @@ class DecryptError : public yacl::Exception {
template <class AdjustRequest>
std::tuple<std::vector<TrustedParty::Operand>,
std::vector<std::vector<PrgSeed>>, size_t>
BuildOperand(
const AdjustRequest& req, uint32_t field_size,
const std::unique_ptr<yacl::crypto::AsymmetricDecryptor>& decryptor) {
BuildOperand(const AdjustRequest& req, uint32_t field_size,
const std::unique_ptr<yacl::crypto::PkeDecryptor>& decryptor) {
std::vector<TrustedParty::Operand> ops;
std::vector<std::vector<PrgSeed>> seeds;
size_t pad_length = 0;
Expand Down Expand Up @@ -177,7 +176,7 @@ struct dependent_false : std::false_type {};
template <class AdjustRequest>
std::vector<yacl::Buffer> AdjustImpl(
const AdjustRequest& req,
const std::unique_ptr<yacl::crypto::AsymmetricDecryptor>& decryptor) {
const std::unique_ptr<yacl::crypto::PkeDecryptor>& decryptor) {
std::vector<NdArrayRef> ret;
size_t field_size;
if constexpr (std::is_same_v<AdjustRequest, AdjustAndRequest>) {
Expand Down Expand Up @@ -228,7 +227,7 @@ std::vector<yacl::Buffer> AdjustImpl(

class ServiceImpl final : public BeaverService {
private:
std::unique_ptr<yacl::crypto::AsymmetricDecryptor> decryptor_;
std::unique_ptr<yacl::crypto::PkeDecryptor> decryptor_;

public:
ServiceImpl(const std::string& asym_crypto_schema,
Expand Down

0 comments on commit c89983e

Please sign in to comment.