1# Copyright 2019 Google LLC. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("@rules_cc//cc:defs.bzl", "cc_library") 16load("@rules_proto//proto:defs.bzl", "proto_library") 17 18package( 19 default_visibility = ["//visibility:public"], 20) 21 22proto_library( 23 name = "big_num_proto", 24 srcs = ["big_num.proto"], 25) 26 27cc_proto_library( 28 name = "big_num_cc_proto", 29 deps = [":big_num_proto"], 30) 31 32proto_library( 33 name = "ec_point_proto", 34 srcs = ["ec_point.proto"], 35) 36 37cc_proto_library( 38 name = "ec_point_cc_proto", 39 deps = [":ec_point_proto"], 40) 41 42proto_library( 43 name = "pedersen_proto", 44 srcs = ["pedersen.proto"], 45 deps = [":big_num_proto"], 46) 47 48cc_proto_library( 49 name = "pedersen_cc_proto", 50 deps = [":pedersen_proto"], 51) 52 53proto_library( 54 name = "camenisch_shoup_proto", 55 srcs = ["camenisch_shoup.proto"], 56 deps = [":big_num_proto"], 57) 58 59cc_proto_library( 60 name = "camenisch_shoup_cc_proto", 61 deps = [":camenisch_shoup_proto"], 62) 63 64cc_library( 65 name = "proto_util", 66 srcs = ["proto_util.cc"], 67 hdrs = ["proto_util.h"], 68 deps = [ 69 ":big_num_cc_proto", 70 ":ec_point_cc_proto", 71 "//private_join_and_compute/crypto:bn_util", 72 "//private_join_and_compute/crypto:ec_util", 73 "//private_join_and_compute/util:status_includes", 74 "@com_google_protobuf//:protobuf", 75 ], 76) 77 78cc_test( 79 name = "proto_util_test", 80 srcs = ["proto_util_test.cc"], 81 deps = [ 82 ":big_num_cc_proto", 83 ":ec_point_cc_proto", 84 ":pedersen_cc_proto", 85 ":proto_util", 86 "//private_join_and_compute/crypto:bn_util", 87 "//private_join_and_compute/crypto:ec_util", 88 "//private_join_and_compute/crypto:openssl_includes", 89 "//private_join_and_compute/crypto:pedersen_over_zn", 90 "//private_join_and_compute/util:status_includes", 91 "//private_join_and_compute/util:status_testing_includes", 92 "@com_github_google_googletest//:gtest_main", 93 ], 94) 95