Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly Sync #18

Merged
merged 1 commit into from
Nov 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IncludeCategories:
Priority: 2
- Regex: '.*\.pb\.h"$'
Priority: 5
- Regex: '^"yasl.*'
- Regex: '^"yacl.*'
Priority: 4
- Regex: '^".*'
Priority: 3
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# YASL: Yet Another Simple library
# YACL: Yet Another Crypto library

YASL (Yet Another Simple library) is a C++ library that contains modules and utilities which other SecretFlow code depends on.
YACL (Yet Another Crypto library) is a C++ library that contains modules and utilities which other SecretFlow code depends on.

## Build

Expand Down
19 changes: 11 additions & 8 deletions REPO_LAYOUT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Repository layout

YASL is a fundamental library used in the SecretFlow stack. The major components are listed here:
YACL is a fundamental library used in the SecretFlow stack. The major components are listed here:

- [base/](yasl/base/): Basic types and utils in yasl.
- [crypto/](yasl/crypto/): Crypto related utilities, say symmetric and asymmetric crypto, PRNG, hashing etc.
- [mpctools/](yasl/mpctools/): Common security building blocks in MPC world.
- [dpf/](yasl/mpctools/dpf/): Distributed Point Function (DPF).
- [ot/](yasl/mpctools/ot/): Various oblivious transfer primitives.
- [io/](yasl/io/): A simple streaming based io library.
- [link/](yasl/link/): A simple rpc based MPI framework. It provides the [SPMD](https://en.wikipedia.org/wiki/SPMD) parallel programming capability.
- [base/](yacl/base/): Basic types and utils in yacl.
- [crypto/](yacl/crypto/): Crypto tools, primitives, utilities.
- [core/](yacl/crypto/base): Standarized crypto functions, i.e. symmetric and asymmetric crypto, PRNG, hashing.
- [primitives/](yacl/crypto/primitives/): Cryptographic Primitives used by protocols
- [dpf/](yacl/crypto/primitives/dpf/): Distributed Point Function (DPF).
- [ot/](yacl/crypto/primitives/ot/): Oblivious transfer and oblivious transfer extensions.
- [tools/](yacl/crypto/tools/): Theoretical cryptographic tools such as Random Oracle (RO), Pseudorandom Generator (PRG).
- [utils/](yacl/crypto/utils/): Easy-to-use cryptographic utilities, designed with succinctness in mind.
- [io/](yacl/io/): A simple streaming based io library.
- [link/](yacl/link/): A simple rpc based MPI framework. It provides the [SPMD](https://en.wikipedia.org/wiki/SPMD) parallel programming capability.
2 changes: 1 addition & 1 deletion STYLE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# C++ coding style

Yasl follows the [Envoy C++ style guidelines](https://github.com/envoyproxy/envoy/blob/main/STYLE.md), i.e. we also encourage appropriate exception uses.
Yacl follows the [Envoy C++ style guidelines](https://github.com/envoyproxy/envoy/blob/main/STYLE.md), i.e. we also encourage appropriate exception uses.
7 changes: 3 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
workspace(name = "yasl")
workspace(name = "yacl")

load("//bazel:repositories.bzl", "yasl_deps")
load("//bazel:repositories.bzl", "yacl_deps")

yasl_deps()
yacl_deps()

load(
"@rules_foreign_cc//foreign_cc:repositories.bzl",
Expand All @@ -14,4 +14,3 @@ rules_foreign_cc_dependencies(
register_default_tools = False,
register_preinstalled_tools = True,
)

6 changes: 3 additions & 3 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
package(default_visibility = ["//visibility:public"])

config_setting(
name = "yasl_build_as_release",
name = "yacl_build_as_release",
values = {"compilation_mode": "opt"},
)

config_setting(
name = "yasl_build_as_debug",
name = "yacl_build_as_debug",
values = {"compilation_mode": "dbg"},
)

config_setting(
name = "yasl_build_as_fast",
name = "yacl_build_as_fast",
values = {"compilation_mode": "fastbuild"},
)
14 changes: 14 additions & 0 deletions bazel/blake3.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
Expand Down
18 changes: 16 additions & 2 deletions bazel/cpu_features.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
load("@yasl//bazel:yasl.bzl", "yasl_cmake_external")
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cmake_external")

package(default_visibility = ["//visibility:public"])

Expand All @@ -7,7 +21,7 @@ filegroup(
srcs = glob(["**"]),
)

yasl_cmake_external(
yacl_cmake_external(
name = "cpu_features",
cache_entries = {
"CMAKE_INSTALL_LIBDIR": "lib",
Expand Down
14 changes: 14 additions & 0 deletions bazel/curve25519-donna.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
Expand Down
18 changes: 16 additions & 2 deletions bazel/emp-tool.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
load("@yasl//bazel:yasl.bzl", "yasl_cmake_external")
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cmake_external")

package(default_visibility = ["//visibility:public"])

Expand All @@ -7,7 +21,7 @@ filegroup(
srcs = glob(["**"]),
)

yasl_cmake_external(
yacl_cmake_external(
name = "emp-tool",
cache_entries = {
"OPENSSL_ROOT_DIR": "$EXT_BUILD_DEPS/openssl",
Expand Down
18 changes: 16 additions & 2 deletions bazel/fmtlib.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
load("@yasl//bazel:yasl.bzl", "yasl_cmake_external")
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cmake_external")

package(default_visibility = ["//visibility:public"])

Expand All @@ -7,7 +21,7 @@ filegroup(
srcs = glob(["**"]),
)

yasl_cmake_external(
yacl_cmake_external(
name = "fmtlib",
cache_entries = {
"FMT_TEST": "OFF",
Expand Down
14 changes: 14 additions & 0 deletions bazel/gperftools.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")
load("@rules_cc//cc:defs.bzl", "cc_library")

Expand Down
18 changes: 16 additions & 2 deletions bazel/ipp.BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
load("@yasl//bazel:yasl.bzl", "yasl_cmake_external")
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@yacl//bazel:yacl.bzl", "yacl_cmake_external")

package(default_visibility = ["//visibility:public"])

Expand All @@ -7,7 +21,7 @@ filegroup(
srcs = glob(["**"]),
)

yasl_cmake_external(
yacl_cmake_external(
name = "ipp",
cache_entries = {
"ARCH": "intel64",
Expand Down
14 changes: 14 additions & 0 deletions bazel/leveldb.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//visibility:public"])
Expand Down
14 changes: 14 additions & 0 deletions bazel/libsodium.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_cc//cc:defs.bzl", "cc_library")

genrule(
Expand Down
14 changes: 14 additions & 0 deletions bazel/openssl.BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2022 Ant Group Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")

package(default_visibility = ["//visibility:public"])
Expand Down
Loading