From 5c78b2f9f7ba4712027e429ecebe83548286a2b0 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 11 Nov 2024 15:24:32 +0800 Subject: [PATCH] fix: ci build error --- README.md | 14 +++----------- SECURITY.md | 31 ------------------------------- cmake/AddCompilerFlags.cmake | 1 + cmake/ExternalOpenSSL.cmake | 18 ++++++++++-------- yacl/base/int128.h | 4 ++-- 5 files changed, 16 insertions(+), 52 deletions(-) delete mode 100644 SECURITY.md diff --git a/README.md b/README.md index 4525af5..98ce2af 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,7 @@ -# YACL (Yet Another Common crypto Library) +# YACL-r (Yet Another Common crypto Library for cryptographic Research) -[![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/yacl/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/secretflow/yacl/tree/main) - -Yacl is a C++ library that contains common cryptgraphy, network and io modules which other SecretFlow code depends on. The crypto modules in Yacl implement many state-of-art secure computation protocols, including primitives like OT, VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's supported algorithms in [ALGORITHMS.md](ALGORITHMS.md). - -Supported platforms: -| Linux x86_64 | Linux aarch64 | macOS x86_64 | macOS Apple Silicon | Windows x86_64 | Windows WSL2 x86_64 | -|--------------|---------------|----------------|---------------------|----------------|---------------------| -| yes | yes | yes1| yes | no | yes1 | - -1. Yacl has not been thoroughly tested on these platforms. +Yacl-r is a fork and extension of the C++ crypto library [secretflow/yacl](https://github.com/secretflow/yacl). +The crypto modules in Yacl implement many state-of-art secure computation protocols, including primitives like OT, VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's supported algorithms in [ALGORITHMS.md](ALGORITHMS.md). ## Repo Layout diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 8b25c54..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,31 +0,0 @@ -# Security - -If you believe you have found a security vulnerability in any SecretFlow repository that meets -[SecretFlow's definition of a security vulnerability](https://security.alipay.com/announcement.htm?id=1), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the ANT GROUP SECURITY Response Center at [https://security.alipay.com/](https://security.alipay.com/). - -If you prefer to submit without logging in, send email to [antsrc@alipay.com](mailto:antsrc@alipay.com). - -You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message. -Additional information can be found at [https://security.alipay.com/](https://security.alipay.com/). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - -* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -## Preferred Languages - -We prefer all communications to be in Chinese or English. diff --git a/cmake/AddCompilerFlags.cmake b/cmake/AddCompilerFlags.cmake index 94f6072..4dd0903 100644 --- a/cmake/AddCompilerFlags.cmake +++ b/cmake/AddCompilerFlags.cmake @@ -35,6 +35,7 @@ add_compiler_flags("-Werror") # FIXME remove this flag add_compiler_flags("-Wno-unused-function") +add_compiler_flags("-Wno-vla") # no variable length error warning # For cryptos add_compiler_flags("-maes") diff --git a/cmake/ExternalOpenSSL.cmake b/cmake/ExternalOpenSSL.cmake index d327458..14f47be 100644 --- a/cmake/ExternalOpenSSL.cmake +++ b/cmake/ExternalOpenSSL.cmake @@ -23,14 +23,16 @@ set(YACL_WITH_EXT_OPENSSL TRUE) # https://cmake.org/cmake/help/v3.4/module/FindOpenSSL.html find_package(OpenSSL QUIET) -if(${OPENSSL_FOUND} AND ${OPENSSL_VERSION} VERSION_GREATER "5.0.0") - message(STATUS "Found system OpenSSL (${OPENSSL_VERSION})") - set(YACL_WITH_EXT_OPENSSL FALSE) -else() - message(STATUS "OpenSSL not found, or its version is incompatiable") - message(STATUS "Use downloaded OpenSSL (${YACL_EXT_OPENSSL_VERSION}) instead") - set(YACL_WITH_EXT_OPENSSL TRUE) -endif() +set(YACL_WITH_EXT_OPENSSL TRUE) + +# if(${OPENSSL_FOUND} AND ${OPENSSL_VERSION} VERSION_GREATER "5.0.0") +# message(STATUS "Found system OpenSSL (${OPENSSL_VERSION})") +# set(YACL_WITH_EXT_OPENSSL FALSE) +# else() +# message(STATUS "OpenSSL not found, or its version is incompatiable") +# message(STATUS "Use downloaded OpenSSL (${YACL_EXT_OPENSSL_VERSION}) instead") +# set(YACL_WITH_EXT_OPENSSL TRUE) +# endif() if(YACL_WITH_EXT_OPENSSL) ExternalProject_Add( diff --git a/yacl/base/int128.h b/yacl/base/int128.h index 3e69d69..f94942e 100644 --- a/yacl/base/int128.h +++ b/yacl/base/int128.h @@ -117,7 +117,7 @@ inline int CountBitWidth(uint128_t v) { namespace std { -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L || defined(__GLIBCXX__) #else constexpr int128_t abs(int128_t x) { return x >= 0 ? x : -x; } #endif @@ -134,7 +134,7 @@ struct is_scalar : public true_type {}; template <> struct is_scalar : public true_type {}; -#if __cplusplus >= 202002L +#if __cplusplus >= 202002L || defined(__GLIBCXX__) //-std=gnu++20 pass, -std=c++20 failed static_assert(is_integral::value == true); static_assert(is_integral::value == true);