Skip to content

Commit

Permalink
repo-sync-2024-03-29T13:49:53+0800 (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
6fj authored Mar 29, 2024
1 parent 04ddcd6 commit 91fce60
Show file tree
Hide file tree
Showing 74 changed files with 119 additions and 117 deletions.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
> - `[API]` prefix for API changes.
> - `[Improvement]` prefix for implementation improvement.
## v0.4.0.dev240329
- [Improvement] upgrade yacl to 0.4.4b3.

## v0.3.0beta
- [Improvement] add uuid in system temp folder.
- [Improvement] use arrow csv reader in pir.
Expand Down
6 changes: 3 additions & 3 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def _yacl():
http_archive,
name = "yacl",
urls = [
"https://github.com/secretflow/yacl/archive/refs/tags/0.4.3b0.tar.gz",
"https://github.com/secretflow/yacl/archive/refs/tags/0.4.4b3.tar.gz",
],
strip_prefix = "yacl-0.4.3b0",
sha256 = "76f40897a360c9f8cce25840d6a068144cc703c630e0a23679f7d2aae3a015d1",
strip_prefix = "yacl-0.4.4b3",
sha256 = "c6b5f32e92d2e31c1c5d7176792965fcf332d1ae892ab8b049d2e66f6f47e4f2",
)

def _bazel_platform():
Expand Down
2 changes: 1 addition & 1 deletion examples/pir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ psi_cc_binary(
deps = [
"@com_github_gflags_gflags//:gflags",
"@com_google_absl//absl/strings",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/crypto/rand",
],
)
2 changes: 1 addition & 1 deletion examples/pir/generate_pir_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "fmt/format.h"
#include "gflags/gflags.h"
#include "spdlog/spdlog.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"

DEFINE_int32(data_count, 100000, "example data count");

Expand Down
1 change: 0 additions & 1 deletion examples/psi/generate_psi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def write_table(
table = create_table(id_cnt, label_cnt)

with csv.CSVWriter(output_path, table.schema) as table_writer:

cnt = 0
while cnt < intersection_cnt:
table_row = min(batch_size, intersection_cnt - cnt)
Expand Down
2 changes: 1 addition & 1 deletion psi/apsi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ psi_cc_library(
"//psi/proto:pir_cc_proto",
"//psi/utils:serialize",
"//psi/utils:sync",
"@yacl//yacl/crypto/base/block_cipher:symmetric_crypto",
"@yacl//yacl/crypto/block_cipher:symmetric_crypto",
],
)

Expand Down
4 changes: 2 additions & 2 deletions psi/apsi/pir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <utility>
#include <vector>

#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/io/kv/leveldb_kvstore.h"
#include "yacl/io/rw/csv_writer.h"

Expand Down
2 changes: 1 addition & 1 deletion psi/apsi/pir_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "gtest/gtest.h"
#include "spdlog/spdlog.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/crypto/tools/prg.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/link/test_util.h"
#include "yacl/utils/scope_guard.h"

Expand Down
2 changes: 1 addition & 1 deletion psi/apsi/sender_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "seal/util/streambuf.h"
#include "spdlog/spdlog.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/utils/parallel.h"

#include "psi/apsi/serialize.h"
Expand Down
2 changes: 1 addition & 1 deletion psi/apsi/sender_kvdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "absl/strings/escaping.h"
#include "seal/util/common.h"
#include "seal/util/streambuf.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/utils/parallel.h"

namespace psi::apsi {
Expand Down
8 changes: 4 additions & 4 deletions psi/bc22/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ psi_cc_library(
"@com_google_absl//absl/strings",
"@yacl//yacl/base:exception",
"@yacl//yacl/base:int128",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/link",
"@yacl//yacl/utils:parallel",
],
Expand All @@ -58,7 +58,7 @@ psi_cc_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@yacl//yacl/base:exception",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/link",
],
)
Expand All @@ -84,9 +84,9 @@ psi_cc_library(
"@yacl//yacl/base:byte_container_view",
"@yacl//yacl/base:exception",
"@yacl//yacl/base:int128",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/crypto/tools:prg",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/link",
"@yacl//yacl/utils:parallel",
],
Expand Down
2 changes: 1 addition & 1 deletion psi/bc22/bc22_psi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "absl/strings/escaping.h"
#include "openssl/rand.h"
#include "spdlog/spdlog.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/utils/parallel.h"

#include "psi/bc22/emp_vole.h"
Expand Down
2 changes: 1 addition & 1 deletion psi/bc22/emp_vole.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <utility>

#include "spdlog/spdlog.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"

namespace psi::bc22 {

Expand Down
2 changes: 1 addition & 1 deletion psi/bc22/emp_vole_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "absl/strings/escaping.h"
#include "gtest/gtest.h"
#include "spdlog/spdlog.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/link/test_util.h"

#include "psi/utils/serialize.h"
Expand Down
2 changes: 1 addition & 1 deletion psi/bc22/generalized_cuckoo_hash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "absl/strings/escaping.h"
#include "spdlog/spdlog.h"
#include "yacl/base/int128.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/utils/parallel.h"

namespace psi::bc22 {
Expand Down
2 changes: 1 addition & 1 deletion psi/bc22/generalized_cuckoo_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "yacl/base/byte_container_view.h"
#include "yacl/base/exception.h"
#include "yacl/base/int128.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"

#include "psi/utils/cuckoo_index.h"

Expand Down
12 changes: 6 additions & 6 deletions psi/cryptor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ psi_cc_library(
"//psi/proto:psi_cc_proto",
"@com_google_absl//absl/types:span",
"@yacl//yacl/base:exception",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/utils:parallel",
],
)
Expand All @@ -39,7 +39,7 @@ psi_cc_library(
"@com_github_libsodium//:libsodium",
"@com_github_openssl_openssl//:openssl",
"@yacl//yacl/base:exception",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/link",
"@yacl//yacl/utils:parallel",
],
Expand Down Expand Up @@ -97,8 +97,8 @@ psi_cc_library(
":fourq_cryptor",
":sm2_cryptor",
":sodium_curve25519_cryptor",
"//psi/proto:psi_v2_cc_proto",
"//psi:prelude",
"//psi/proto:psi_v2_cc_proto",
"@yacl//yacl/utils:platform_utils",
] + select({
"@platforms//cpu:x86_64": [
Expand All @@ -116,7 +116,7 @@ psi_cc_library(
deps = [
"@com_github_openssl_openssl//:openssl",
"@yacl//yacl/base:exception",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/utils:parallel",
],
)
Expand Down Expand Up @@ -148,7 +148,7 @@ psi_cc_test(
srcs = ["sm2_cryptor_test.cc"],
deps = [
":sm2_cryptor",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/crypto/tools:prg",
],
)
Expand All @@ -159,7 +159,7 @@ psi_cc_library(
hdrs = ["hash_to_curve_elligator2.h"],
deps = [
"@yacl//yacl/base:byte_container_view",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/math/mpint",
],
)
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/ecc_cryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <vector>

#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/ecc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "openssl/bn.h"
#include "openssl/ec.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/fourq_cryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "apsi/fourq/FourQ_api.h"
#include "apsi/fourq/FourQ_internal.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/hash_to_curve_elligator2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "absl/strings/escaping.h"
#include "spdlog/spdlog.h"
#include "yacl/crypto/base/hash/ssl_hash.h"
#include "yacl/crypto/hash/ssl_hash.h"
#include "yacl/math/mpint/mp_int.h"

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/sm2_cryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "absl/types/span.h"
#include "openssl/bn.h"
#include "openssl/ec.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"

#include "psi/cryptor/ecc_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/sm2_cryptor_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "absl/strings/escaping.h"
#include "gtest/gtest.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/crypto/tools/prg.h"

namespace psi {
Expand Down
2 changes: 1 addition & 1 deletion psi/cryptor/sodium_curve25519_cryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern "C" {

#include <iostream>

#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"

#include "psi/cryptor/hash_to_curve_elligator2.h"
Expand Down
8 changes: 4 additions & 4 deletions psi/ecdh/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ psi_cc_library(
"@com_github_microsoft_apsi//:apsi",
"@com_google_absl//absl/types:span",
"@yacl//yacl/base:exception",
"@yacl//yacl/crypto/base/hash:blake3",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:blake3",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/utils:parallel",
],
)
Expand All @@ -78,8 +78,8 @@ psi_cc_test(
srcs = ["basic_ecdh_oprf_test.cc"],
deps = [
":ecdh_oprf_selector",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/crypto/tools:prg",
"@yacl//yacl/crypto/utils:rand",
],
)

Expand Down Expand Up @@ -171,8 +171,8 @@ psi_cc_test(
"//psi/utils:test_utils",
"@boost//:uuid",
"@com_google_absl//absl/time",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/crypto/tools:prg",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/utils:scope_guard",
],
)
Expand Down
4 changes: 2 additions & 2 deletions psi/ecdh/basic_ecdh_oprf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "absl/strings/escaping.h"
#include "apsi/fourq/FourQ_api.h"
#include "apsi/fourq/FourQ_internal.h"
#include "yacl/crypto/base/hash/blake3.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/blake3.h"
#include "yacl/crypto/hash/hash_utils.h"

#include "psi/cryptor/ecc_utils.h"

Expand Down
2 changes: 1 addition & 1 deletion psi/ecdh/basic_ecdh_oprf.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "openssl/rand.h"
#include "spdlog/spdlog.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/base/hash/hash_interface.h"
#include "yacl/crypto/hash/hash_interface.h"

#include "psi/cryptor/ecc_cryptor.h"
#include "psi/cryptor/sm2_cryptor.h"
Expand Down
2 changes: 1 addition & 1 deletion psi/ecdh/basic_ecdh_oprf_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "gtest/gtest.h"
#include "spdlog/spdlog.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/crypto/tools/prg.h"
#include "yacl/crypto/utils/rand.h"

#include "psi/ecdh/ecdh_oprf_selector.h"

Expand Down
2 changes: 1 addition & 1 deletion psi/ecdh/ecdh_oprf_psi_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "gtest/gtest.h"
#include "spdlog/spdlog.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/rand/rand.h"
#include "yacl/crypto/tools/prg.h"
#include "yacl/crypto/utils/rand.h"
#include "yacl/link/test_util.h"
#include "yacl/utils/scope_guard.h"

Expand Down
2 changes: 1 addition & 1 deletion psi/ecdh/ecdh_psi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "spdlog/spdlog.h"
#include "yacl/base/exception.h"
#include "yacl/crypto/base/hash/hash_utils.h"
#include "yacl/crypto/hash/hash_utils.h"
#include "yacl/utils/parallel.h"
#include "yacl/utils/serialize.h"

Expand Down
12 changes: 6 additions & 6 deletions psi/kkrt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ psi_cc_library(
"//psi/utils:cuckoo_index",
"//psi/utils:serialize",
"@com_google_absl//absl/strings",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/primitives/ot:base_ot",
"@yacl//yacl/crypto/primitives/ot:iknp_ote",
"@yacl//yacl/crypto/primitives/ot:kkrt_ote",
"@yacl//yacl/crypto/utils:rand",
"@yacl//yacl/crypto/hash:hash_utils",
"@yacl//yacl/crypto/rand",
"@yacl//yacl/kernels/algorithms:base_ot",
"@yacl//yacl/kernels/algorithms:iknp_ote",
"@yacl//yacl/kernels/algorithms:kkrt_ote",
"@yacl//yacl/link",
],
)
Expand All @@ -39,7 +39,7 @@ psi_cc_test(
srcs = ["kkrt_psi_test.cc"],
deps = [
":kkrt_psi",
"@yacl//yacl/crypto/base/hash:hash_utils",
"@yacl//yacl/crypto/hash:hash_utils",
],
)

Expand Down
Loading

0 comments on commit 91fce60

Please sign in to comment.