From 4004172111dfb9592a15f1c22f96bc9cfcb939f7 Mon Sep 17 00:00:00 2001 From: Jamie Cui Date: Fri, 22 Nov 2024 19:40:16 +0800 Subject: [PATCH] fix(ci): cleanup format and license --- .licenserc.yaml | 3 +++ yacl/crypto/aead/BUILD.bazel | 2 +- yacl/crypto/block_cipher/BUILD.bazel | 2 +- yacl/crypto/hash/BUILD.bazel | 2 +- yacl/crypto/pke/BUILD.bazel | 4 ++-- yacl/crypto/rand/BUILD.bazel | 2 +- yacl/crypto/rand/drbg/BUILD.bazel | 6 +++--- yacl/crypto/tools/BUILD.bazel | 2 +- yacl/engine/plaintext/BUILD.bazel | 2 +- yacl/engine/plaintext/executor.cc | 2 +- yacl/engine/plaintext/executor.h | 14 +++++++++++++- yacl/engine/plaintext/executor_test.cc | 3 +-- yacl/kernel/algorithms/BUILD.bazel | 22 +++++++++++----------- 13 files changed, 40 insertions(+), 26 deletions(-) diff --git a/.licenserc.yaml b/.licenserc.yaml index 84362c9..01db3a1 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -46,6 +46,9 @@ header: # <1> - 'yacl/crypto/aes/aes_opt.h' - 'yacl/io/circuit/data/**.txt' - 'docs/requirements.txt' + - '.whitesource' + - 'MODULE.bazel' + - 'MODULE.bazel.lock' comment: never # <9> diff --git a/yacl/crypto/aead/BUILD.bazel b/yacl/crypto/aead/BUILD.bazel index 6a27d9d..55ed906 100644 --- a/yacl/crypto/aead/BUILD.bazel +++ b/yacl/crypto/aead/BUILD.bazel @@ -21,8 +21,8 @@ yacl_cc_library( srcs = ["all_gcm.cc"], hdrs = ["all_gcm.h"], deps = [ - "//yacl/base:secparam", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto:key_utils", ], ) diff --git a/yacl/crypto/block_cipher/BUILD.bazel b/yacl/crypto/block_cipher/BUILD.bazel index e370029..35f9752 100644 --- a/yacl/crypto/block_cipher/BUILD.bazel +++ b/yacl/crypto/block_cipher/BUILD.bazel @@ -26,8 +26,8 @@ yacl_cc_library( ], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto:ossl_wrappers", ], ) diff --git a/yacl/crypto/hash/BUILD.bazel b/yacl/crypto/hash/BUILD.bazel index 9ee3f42..7b071da 100644 --- a/yacl/crypto/hash/BUILD.bazel +++ b/yacl/crypto/hash/BUILD.bazel @@ -69,8 +69,8 @@ yacl_cc_library( name = "hash_interface", srcs = ["hash_interface.h"], deps = [ - "//yacl/base:secparam", "//yacl/base:byte_container_view", + "//yacl/base:secparam", "//yacl/crypto:ossl_wrappers", ], ) diff --git a/yacl/crypto/pke/BUILD.bazel b/yacl/crypto/pke/BUILD.bazel index ab831a1..bb41e8e 100644 --- a/yacl/crypto/pke/BUILD.bazel +++ b/yacl/crypto/pke/BUILD.bazel @@ -30,8 +30,8 @@ yacl_cc_library( hdrs = ["sm2_enc.h"], deps = [ ":pke_interface", - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/crypto:key_utils", ], ) @@ -50,8 +50,8 @@ yacl_cc_library( hdrs = ["rsa_enc.h"], deps = [ ":pke_interface", - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/crypto:key_utils", ], ) diff --git a/yacl/crypto/rand/BUILD.bazel b/yacl/crypto/rand/BUILD.bazel index 005ad00..6d9dbcb 100644 --- a/yacl/crypto/rand/BUILD.bazel +++ b/yacl/crypto/rand/BUILD.bazel @@ -21,10 +21,10 @@ yacl_cc_library( srcs = ["rand.cc"], hdrs = ["rand.h"], deps = [ - "//yacl/base:secparam", "//yacl/base:dynamic_bitset", "//yacl/base:exception", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/rand/drbg", "//yacl/crypto/tools:prg", "//yacl/math/mpint", diff --git a/yacl/crypto/rand/drbg/BUILD.bazel b/yacl/crypto/rand/drbg/BUILD.bazel index e657e5a..39fc203 100644 --- a/yacl/crypto/rand/drbg/BUILD.bazel +++ b/yacl/crypto/rand/drbg/BUILD.bazel @@ -32,9 +32,9 @@ yacl_cc_library( ], visibility = ["//visibility:private"], deps = [ - "//yacl/base:secparam", "//yacl/base:byte_container_view", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/rand/entropy_source", "//yacl/utils/spi", ], @@ -56,8 +56,8 @@ yacl_cc_library( deps = [ ":spi", "//yacl/crypto:ossl_wrappers", - "//yacl/ossl_provider:helper", # helper "//yacl/crypto/rand/entropy_source", + "//yacl/ossl_provider:helper", # helper ], alwayslink = 1, ) @@ -80,8 +80,8 @@ yacl_cc_library( "//yacl/crypto:ossl_wrappers", "//yacl/crypto/block_cipher:symmetric_crypto", "//yacl/crypto/hash:hash_utils", - "//yacl/ossl_provider:helper", # helper "//yacl/crypto/rand/entropy_source", + "//yacl/ossl_provider:helper", # helper ], alwayslink = 1, ) diff --git a/yacl/crypto/tools/BUILD.bazel b/yacl/crypto/tools/BUILD.bazel index ff7bfa5..86d8a02 100644 --- a/yacl/crypto/tools/BUILD.bazel +++ b/yacl/crypto/tools/BUILD.bazel @@ -31,8 +31,8 @@ yacl_cc_library( srcs = ["prg.cc"], hdrs = ["prg.h"], deps = [ - "//yacl/base:secparam", "//yacl/base:dynamic_bitset", + "//yacl/base:secparam", "//yacl/crypto/block_cipher:symmetric_crypto", "//yacl/math/mpint", ], diff --git a/yacl/engine/plaintext/BUILD.bazel b/yacl/engine/plaintext/BUILD.bazel index 30d371b..17a3527 100644 --- a/yacl/engine/plaintext/BUILD.bazel +++ b/yacl/engine/plaintext/BUILD.bazel @@ -1,4 +1,4 @@ -# Copyright 2022 Ant Group Co., Ltd. +# Copyright 2024 Jamie Cui and 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. diff --git a/yacl/engine/plaintext/executor.cc b/yacl/engine/plaintext/executor.cc index 1abf29e..eb9959d 100644 --- a/yacl/engine/plaintext/executor.cc +++ b/yacl/engine/plaintext/executor.cc @@ -1,4 +1,4 @@ -// Copyright 2024 Ant Group Co., Ltd. +// Copyright 2024 Jamie Cui and 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. diff --git a/yacl/engine/plaintext/executor.h b/yacl/engine/plaintext/executor.h index 3e4aae8..5250f05 100644 --- a/yacl/engine/plaintext/executor.h +++ b/yacl/engine/plaintext/executor.h @@ -1,4 +1,16 @@ -// Copyright 2024 Ant Group Co., Ltd. +// Copyright 2024 Jamie Cui and 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. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/yacl/engine/plaintext/executor_test.cc b/yacl/engine/plaintext/executor_test.cc index 72ed0c0..42e1e1b 100644 --- a/yacl/engine/plaintext/executor_test.cc +++ b/yacl/engine/plaintext/executor_test.cc @@ -1,5 +1,4 @@ - -// Copyright 2024 Ant Group Co., Ltd. +// Copyright 2024 Jamie Cui and 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. diff --git a/yacl/kernel/algorithms/BUILD.bazel b/yacl/kernel/algorithms/BUILD.bazel index e649582..531bd11 100644 --- a/yacl/kernel/algorithms/BUILD.bazel +++ b/yacl/kernel/algorithms/BUILD.bazel @@ -28,8 +28,8 @@ yacl_cc_library( hdrs = ["portable_ot_interface.h"], deps = [ ":base_ot_interface", - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/crypto/tools:ro", "//yacl/link", "@simplest_ot//:simplest_ot_portable", @@ -46,8 +46,8 @@ yacl_cc_library( ], deps = [ ":base_ot_interface", - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/crypto/tools:ro", "//yacl/link", "//yacl/math:gadget", @@ -61,8 +61,8 @@ yacl_cc_library( srcs = ["base_ot.cc"], hdrs = ["base_ot.h"], deps = [ - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/kernel/type:ot_store_utils", "//yacl/link", "@com_google_absl//absl/types:span", @@ -117,9 +117,9 @@ yacl_cc_library( hdrs = ["kkrt_ote.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:exception", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/aes:aes_opt", "//yacl/crypto/hash:hash_utils", "//yacl/crypto/rand", @@ -178,8 +178,8 @@ yacl_cc_library( hdrs = ["gywz_ote.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:aligned_vector", + "//yacl/base:secparam", "//yacl/crypto/aes:aes_opt", "//yacl/crypto/rand", "//yacl/crypto/tools:crhash", @@ -214,8 +214,8 @@ yacl_cc_library( ], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:exception", + "//yacl/base:secparam", "//yacl/crypto/hash:hash_utils", "//yacl/crypto/rand", "//yacl/crypto/tools:common", @@ -248,10 +248,10 @@ yacl_cc_library( hdrs = ["kos_ote.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:dynamic_bitset", "//yacl/base:exception", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/rand", "//yacl/crypto/tools:common", "//yacl/crypto/tools:crhash", @@ -316,10 +316,10 @@ yacl_cc_library( hdrs = ["mpfss.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:aligned_vector", "//yacl/base:dynamic_bitset", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/rand", "//yacl/crypto/tools:crhash", "//yacl/kernel/algorithms:gywz_ote", @@ -348,10 +348,10 @@ yacl_cc_library( hdrs = ["base_vole.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:aligned_vector", "//yacl/base:dynamic_bitset", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/rand", "//yacl/kernel/algorithms:softspoken_ote", "//yacl/kernel/type:ot_store_utils", @@ -379,10 +379,10 @@ yacl_cc_library( hdrs = ["mp_vole.h"], copts = AES_COPT_FLAGS, deps = [ - "//yacl/base:secparam", "//yacl/base:aligned_vector", "//yacl/base:dynamic_bitset", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/crypto/hash:hash_utils", "//yacl/crypto/rand", "//yacl/crypto/tools:common", @@ -415,10 +415,10 @@ yacl_cc_library( deps = [ ":base_vole", ":mp_vole", - "//yacl/base:secparam", "//yacl/base:aligned_vector", "//yacl/base:dynamic_bitset", "//yacl/base:int128", + "//yacl/base:secparam", "//yacl/kernel/algorithms:softspoken_ote", "//yacl/kernel/code:code_interface", "//yacl/kernel/code:ea_code",