blob: 57853a8023abe0214f5a42fb7ad44a15bf09b0af [file] [log] [blame]
package(default_visibility = ["//tools/build_defs:internal_pkg"])
licenses(["notice"])
cc_library(
name = "aead_wrapper",
srcs = ["aead_wrapper.cc"],
hdrs = ["aead_wrapper.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:crypto_format",
"//cc:primitive_set",
"//cc:primitive_wrapper",
"//cc:registry",
"//cc/subtle:subtle_util_boringssl",
"//cc/util:status",
"//cc/util:statusor",
"//proto:tink_cc_proto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aead_config",
srcs = ["aead_config.cc"],
hdrs = ["aead_config.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
visibility = ["//visibility:public"],
deps = [
":aead_wrapper",
":aes_ctr_hmac_aead_key_manager",
":aes_eax_key_manager",
":aes_gcm_key_manager",
":aes_gcm_siv_key_manager",
":kms_aead_key_manager",
":kms_envelope_aead_key_manager",
":xchacha20_poly1305_key_manager",
"//cc/config:config_util",
"//cc/mac:mac_config",
"//cc/util:status",
"//proto:config_cc_proto",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/memory",
],
)
cc_library(
name = "aead_factory",
srcs = ["aead_factory.cc"],
hdrs = ["aead_factory.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":aead_wrapper",
"//cc:aead",
"//cc:key_manager",
"//cc:keyset_handle",
"//cc:primitive_set",
"//cc:registry",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/base:core_headers",
],
)
cc_library(
name = "aead_key_templates",
srcs = ["aead_key_templates.cc"],
hdrs = ["aead_key_templates.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
visibility = ["//visibility:public"],
deps = [
"//proto:aes_ctr_hmac_aead_cc_proto",
"//proto:aes_eax_cc_proto",
"//proto:aes_gcm_cc_proto",
"//proto:aes_gcm_siv_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"//proto:xchacha20_poly1305_cc_proto",
],
)
cc_library(
name = "aes_eax_key_manager",
hdrs = ["aes_eax_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc/subtle:aes_eax_boringssl",
"//cc/subtle:random",
"//cc/util:constants",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:aes_eax_cc_proto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_key_manager",
hdrs = ["aes_gcm_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc:key_manager",
"//cc/subtle:aes_gcm_boringssl",
"//cc/subtle:random",
"//cc/util:constants",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:aes_gcm_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_absl//absl/base",
],
)
cc_library(
name = "aes_gcm_siv_key_manager",
hdrs = ["aes_gcm_siv_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc/subtle:aes_gcm_siv_boringssl",
"//cc/subtle:random",
"//cc/util:constants",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:aes_gcm_siv_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_absl//absl/base",
],
)
cc_library(
name = "aes_ctr_hmac_aead_key_manager",
srcs = ["aes_ctr_hmac_aead_key_manager.cc"],
hdrs = ["aes_ctr_hmac_aead_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc:mac",
"//cc:registry",
"//cc/mac:hmac_key_manager",
"//cc/subtle:aes_ctr_boringssl",
"//cc/subtle:encrypt_then_authenticate",
"//cc/subtle:hmac_boringssl",
"//cc/subtle:random",
"//cc/util:constants",
"//cc/util:enums",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:aes_ctr_hmac_aead_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_absl//absl/base",
],
)
cc_library(
name = "xchacha20_poly1305_key_manager",
hdrs = ["xchacha20_poly1305_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc/subtle:random",
"//cc/subtle:xchacha20_poly1305_boringssl",
"//cc/util:constants",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:xchacha20_poly1305_cc_proto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "kms_aead_key_manager",
hdrs = ["kms_aead_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:core/key_type_manager",
"//cc:kms_clients",
"//cc/util:constants",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:kms_aead_cc_proto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "kms_envelope_aead",
srcs = ["kms_envelope_aead.cc"],
hdrs = ["kms_envelope_aead.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:aead",
"//cc:registry",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//proto:tink_cc_proto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "kms_envelope_aead_key_manager",
srcs = ["kms_envelope_aead_key_manager.cc"],
hdrs = ["kms_envelope_aead_key_manager.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":kms_envelope_aead",
"//cc:aead",
"//cc:core/key_type_manager",
"//cc:kms_client",
"//cc:kms_clients",
"//cc/util:constants",
"//cc/util:errors",
"//cc/util:protobuf_helper",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:validation",
"//proto:kms_envelope_cc_proto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
# tests
cc_test(
name = "aead_wrapper_test",
size = "small",
srcs = ["aead_wrapper_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_wrapper",
"//cc:aead",
"//cc:primitive_set",
"//cc/util:status",
"//cc/util:test_matchers",
"//cc/util:test_util",
"//proto:tink_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aead_config_test",
size = "small",
srcs = ["aead_config_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_config",
":aead_key_templates",
":aes_gcm_key_manager",
"//cc:aead",
"//cc:config",
"//cc:keyset_handle",
"//cc:registry",
"//cc/util:status",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aead_factory_test",
size = "small",
srcs = ["aead_factory_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_config",
":aead_factory",
":aes_gcm_key_manager",
"//cc:aead",
"//cc:crypto_format",
"//cc:keyset_handle",
"//cc/util:status",
"//cc/util:test_keyset_handle",
"//cc/util:test_util",
"//proto:aes_gcm_cc_proto",
"//proto:tink_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aead_key_templates_test",
size = "small",
srcs = ["aead_key_templates_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_key_templates",
":aes_ctr_hmac_aead_key_manager",
":aes_eax_key_manager",
":aes_gcm_key_manager",
":aes_gcm_siv_key_manager",
":xchacha20_poly1305_key_manager",
"//cc:core/key_manager_impl",
"//cc/util:test_matchers",
"//proto:aes_ctr_hmac_aead_cc_proto",
"//proto:aes_eax_cc_proto",
"//proto:aes_gcm_cc_proto",
"//proto:aes_gcm_siv_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"//proto:xchacha20_poly1305_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_eax_key_manager_test",
size = "small",
srcs = ["aes_eax_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_eax_key_manager",
"//cc:aead",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//proto:aes_eax_cc_proto",
"//proto:aes_gcm_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_key_manager_test",
size = "small",
srcs = ["aes_gcm_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_gcm_key_manager",
"//cc:aead",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//proto:aes_eax_cc_proto",
"//proto:aes_gcm_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_siv_key_manager_test",
size = "small",
srcs = ["aes_gcm_siv_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_gcm_siv_key_manager",
"//cc:aead",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//proto:aes_gcm_siv_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_ctr_hmac_aead_key_manager_test",
size = "small",
srcs = ["aes_ctr_hmac_aead_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_ctr_hmac_aead_key_manager",
"//cc:config",
"//cc/mac:mac_config",
"//cc/subtle",
"//cc/subtle:aead_test_util",
"//cc/subtle:aes_ctr_boringssl",
"//cc/util:enums",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//proto:aes_ctr_hmac_aead_cc_proto",
"//proto:aes_gcm_cc_proto",
"//proto:common_cc_proto",
"//proto:tink_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "xchacha20_poly1305_key_manager_test",
size = "small",
srcs = ["xchacha20_poly1305_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":xchacha20_poly1305_key_manager",
"//cc:aead",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//proto:xchacha20_poly1305_cc_proto",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "kms_aead_key_manager_test",
size = "small",
srcs = ["kms_aead_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":kms_aead_key_manager",
"//cc:aead",
"//cc:kms_client",
"//cc:kms_clients",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"//proto:kms_aead_cc_proto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "kms_envelope_aead_test",
size = "small",
srcs = ["kms_envelope_aead_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_config",
":aead_key_templates",
":kms_envelope_aead",
"//cc:aead",
"//cc:registry",
"//cc/mac:mac_key_templates",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"//proto:tink_cc_proto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "kms_envelope_aead_key_manager_test",
size = "small",
srcs = ["kms_envelope_aead_key_manager_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aead_config",
":aead_key_templates",
":aes_eax_key_manager",
":kms_envelope_aead",
":kms_envelope_aead_key_manager",
"//cc:aead",
"//cc:kms_client",
"//cc:kms_clients",
"//cc:registry",
"//cc/subtle:aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"//proto:aes_eax_cc_proto",
"//proto:kms_envelope_cc_proto",
"//proto:tink_cc_proto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)