blob: d60ae9b1b1ebb8eb6dca42d601d3769c632e4ece [file] [log] [blame]
package(default_visibility = ["//tools/build_defs:internal_pkg"])
licenses(["notice"])
PUBLIC_APIS = [
"common_enums.h",
"aes_gcm_boringssl.h",
"encrypt_then_authenticate.h",
"hmac_boringssl.h",
"hkdf.h",
"ind_cpa_cipher.h",
"random.h",
]
cc_library(
name = "subtle",
hdrs = PUBLIC_APIS,
include_prefix = "tink",
strip_include_prefix = "/cc",
visibility = ["//visibility:public"],
deps = [
":aes_gcm_boringssl",
":common_enums",
":encrypt_then_authenticate",
":hkdf",
":hmac_boringssl",
":random",
"//cc:aead",
"//cc:hybrid_decrypt",
"//cc:hybrid_encrypt",
"//cc:mac",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ind_cpa_cipher",
hdrs = ["ind_cpa_cipher.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc/util:statusor",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ecies_hkdf_recipient_kem_boringssl",
srcs = ["ecies_hkdf_recipient_kem_boringssl.cc"],
hdrs = ["ecies_hkdf_recipient_kem_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":hkdf",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ecies_hkdf_sender_kem_boringssl",
srcs = ["ecies_hkdf_sender_kem_boringssl.cc"],
hdrs = ["ecies_hkdf_sender_kem_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":hkdf",
":subtle_util_boringssl",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ec_util",
srcs = ["ec_util.cc"],
hdrs = ["ec_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ed25519_sign_boringssl",
srcs = ["ed25519_sign_boringssl.cc"],
hdrs = ["ed25519_sign_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":subtle_util_boringssl",
"//cc:public_key_sign",
"//cc/util:errors",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
)
cc_library(
name = "ed25519_verify_boringssl",
srcs = ["ed25519_verify_boringssl.cc"],
hdrs = ["ed25519_verify_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":subtle_util_boringssl",
"//cc:public_key_verify",
"//cc/util:errors",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
],
)
cc_library(
name = "hkdf",
srcs = ["hkdf.cc"],
hdrs = ["hkdf.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_cmac_boringssl",
srcs = ["aes_cmac_boringssl.cc"],
hdrs = ["aes_cmac_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:mac",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "hmac_boringssl",
srcs = ["hmac_boringssl.cc"],
hdrs = ["hmac_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:mac",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ecdsa_sign_boringssl",
srcs = ["ecdsa_sign_boringssl.cc"],
hdrs = ["ecdsa_sign_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_sign",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "ecdsa_verify_boringssl",
srcs = ["ecdsa_verify_boringssl.cc"],
hdrs = ["ecdsa_verify_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_verify",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "rsa_ssa_pss_verify_boringssl",
srcs = ["rsa_ssa_pss_verify_boringssl.cc"],
hdrs = ["rsa_ssa_pss_verify_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_verify",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "rsa_ssa_pss_sign_boringssl",
srcs = ["rsa_ssa_pss_sign_boringssl.cc"],
hdrs = ["rsa_ssa_pss_sign_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_sign",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "rsa_ssa_pkcs1_verify_boringssl",
srcs = ["rsa_ssa_pkcs1_verify_boringssl.cc"],
hdrs = ["rsa_ssa_pkcs1_verify_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_verify",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "rsa_ssa_pkcs1_sign_boringssl",
srcs = ["rsa_ssa_pkcs1_sign_boringssl.cc"],
hdrs = ["rsa_ssa_pkcs1_sign_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":subtle_util_boringssl",
"//cc:public_key_sign",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_boringssl",
srcs = ["aes_gcm_boringssl.cc"],
hdrs = ["aes_gcm_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":random",
":subtle_util",
":subtle_util_boringssl",
"//cc:aead",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_hkdf_stream_segment_decrypter",
srcs = ["aes_gcm_hkdf_stream_segment_decrypter.cc"],
hdrs = ["aes_gcm_hkdf_stream_segment_decrypter.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":aes_gcm_hkdf_stream_segment_encrypter",
":common_enums",
":hkdf",
":random",
":stream_segment_decrypter",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_hkdf_stream_segment_encrypter",
srcs = ["aes_gcm_hkdf_stream_segment_encrypter.cc"],
hdrs = ["aes_gcm_hkdf_stream_segment_encrypter.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":random",
":stream_segment_encrypter",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_hkdf_streaming",
srcs = ["aes_gcm_hkdf_streaming.cc"],
hdrs = ["aes_gcm_hkdf_streaming.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":aes_gcm_hkdf_stream_segment_decrypter",
":aes_gcm_hkdf_stream_segment_encrypter",
":common_enums",
":hkdf",
":nonce_based_streaming_aead",
":random",
":stream_segment_decrypter",
":stream_segment_encrypter",
":subtle_util_boringssl",
"//cc:input_stream",
"//cc:output_stream",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_ctr_hmac_streaming",
srcs = ["aes_ctr_hmac_streaming.cc"],
hdrs = ["aes_ctr_hmac_streaming.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":hkdf",
":hmac_boringssl",
":nonce_based_streaming_aead",
":random",
":stream_segment_decrypter",
":stream_segment_encrypter",
":subtle_util",
":subtle_util_boringssl",
"//cc:mac",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_eax_boringssl",
srcs = ["aes_eax_boringssl.cc"],
hdrs = ["aes_eax_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":random",
":subtle_util_boringssl",
"//cc:aead",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "encrypt_then_authenticate",
srcs = ["encrypt_then_authenticate.cc"],
hdrs = ["encrypt_then_authenticate.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":aes_ctr_boringssl",
":ind_cpa_cipher",
":subtle_util_boringssl",
"//cc:aead",
"//cc:mac",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_ctr_boringssl",
srcs = ["aes_ctr_boringssl.cc"],
hdrs = ["aes_ctr_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":ind_cpa_cipher",
":random",
":subtle_util",
":subtle_util_boringssl",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "random",
srcs = ["random.cc"],
hdrs = ["random.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"@boringssl//:crypto",
],
)
cc_library(
name = "xchacha20_poly1305_boringssl",
srcs = ["xchacha20_poly1305_boringssl.cc"],
hdrs = ["xchacha20_poly1305_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
":random",
":subtle_util_boringssl",
"//cc:aead",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_siv_boringssl",
srcs = [
"aes_siv_boringssl.cc",
],
hdrs = ["aes_siv_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":random",
":subtle_util_boringssl",
"//cc:deterministic_aead",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aes_gcm_siv_boringssl",
srcs = ["aes_gcm_siv_boringssl.cc"],
hdrs = ["aes_gcm_siv_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":random",
":subtle_util",
"//cc:aead",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "common_enums",
srcs = ["common_enums.cc"],
hdrs = ["common_enums.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = ["@com_google_absl//absl/strings"],
)
cc_library(
name = "subtle_util",
srcs = ["subtle_util.cc"],
hdrs = ["subtle_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
)
cc_library(
name = "subtle_util_boringssl",
srcs = ["subtle_util_boringssl.cc"],
hdrs = ["subtle_util_boringssl.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@boringssl//:crypto",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "wycheproof_util",
srcs = ["wycheproof_util.cc"],
hdrs = ["wycheproof_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":common_enums",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/strings",
"@rapidjson",
],
)
cc_library(
name = "stream_segment_decrypter",
hdrs = ["stream_segment_decrypter.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc/util:status",
],
)
cc_library(
name = "stream_segment_encrypter",
hdrs = ["stream_segment_encrypter.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc/util:status",
],
)
cc_library(
name = "streaming_aead_decrypting_stream",
srcs = ["streaming_aead_decrypting_stream.cc"],
hdrs = ["streaming_aead_decrypting_stream.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":stream_segment_decrypter",
"//cc:input_stream",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/memory",
],
)
cc_library(
name = "streaming_aead_encrypting_stream",
srcs = ["streaming_aead_encrypting_stream.cc"],
hdrs = ["streaming_aead_encrypting_stream.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":stream_segment_encrypter",
"//cc:output_stream",
"//cc/util:statusor",
"@com_google_absl//absl/memory",
],
)
cc_library(
name = "nonce_based_streaming_aead",
srcs = ["nonce_based_streaming_aead.cc"],
hdrs = ["nonce_based_streaming_aead.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":decrypting_random_access_stream",
":stream_segment_decrypter",
":stream_segment_encrypter",
":streaming_aead_decrypting_stream",
":streaming_aead_encrypting_stream",
"//cc:input_stream",
"//cc:output_stream",
"//cc:random_access_stream",
"//cc:streaming_aead",
"//cc/util:statusor",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "test_util",
testonly = 1,
srcs = ["test_util.cc"],
hdrs = ["test_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":nonce_based_streaming_aead",
":stream_segment_decrypter",
":stream_segment_encrypter",
"//cc:input_stream",
"//cc:output_stream",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "aead_test_util",
testonly = 1,
srcs = ["aead_test_util.cc"],
hdrs = ["aead_test_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":test_util",
"//cc:aead",
"//cc/util:status",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "streaming_aead_test_util",
testonly = 1,
srcs = ["streaming_aead_test_util.cc"],
hdrs = ["streaming_aead_test_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":test_util",
"//cc:random_access_stream",
"//cc:streaming_aead",
"//cc/util:buffer",
"//cc/util:file_random_access_stream",
"//cc/util:istream_input_stream",
"//cc/util:ostream_output_stream",
"//cc/util:status",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "hybrid_test_util",
testonly = 1,
srcs = ["hybrid_test_util.cc"],
hdrs = ["hybrid_test_util.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
"//cc:hybrid_decrypt",
"//cc:hybrid_encrypt",
"//cc/util:status",
],
)
cc_library(
name = "decrypting_random_access_stream",
srcs = ["decrypting_random_access_stream.cc"],
hdrs = ["decrypting_random_access_stream.h"],
include_prefix = "tink",
strip_include_prefix = "/cc",
deps = [
":stream_segment_decrypter",
"//cc:random_access_stream",
"//cc/util:buffer",
"//cc/util:errors",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/synchronization",
],
)
# tests
cc_test(
name = "ecies_hkdf_recipient_kem_boringssl_test",
size = "small",
srcs = ["ecies_hkdf_recipient_kem_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":common_enums",
":ecies_hkdf_recipient_kem_boringssl",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "ecies_hkdf_sender_kem_boringssl_test",
size = "small",
srcs = ["ecies_hkdf_sender_kem_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":common_enums",
":ecies_hkdf_recipient_kem_boringssl",
":ecies_hkdf_sender_kem_boringssl",
":subtle_util_boringssl",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "ec_util_test",
size = "small",
srcs = ["ec_util_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":ec_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "hkdf_test",
size = "small",
srcs = ["hkdf_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":common_enums",
":hkdf",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_cmac_boringssl_test",
size = "small",
srcs = ["aes_cmac_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_cmac_boringssl",
":common_enums",
"//cc:mac",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "hmac_boringssl_test",
size = "small",
srcs = ["hmac_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":common_enums",
":hmac_boringssl",
"//cc:mac",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_boringssl_test",
size = "small",
srcs = ["aes_gcm_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:aes_gcm",
],
deps = [
":aes_gcm_boringssl",
":wycheproof_util",
"//cc:aead",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "aes_gcm_hkdf_stream_segment_decrypter_test",
size = "small",
srcs = ["aes_gcm_hkdf_stream_segment_decrypter_test.cc"],
deps = [
":aes_gcm_hkdf_stream_segment_decrypter",
":aes_gcm_hkdf_stream_segment_encrypter",
":common_enums",
":hkdf",
":random",
":stream_segment_decrypter",
":stream_segment_encrypter",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_hkdf_stream_segment_encrypter_test",
size = "small",
srcs = ["aes_gcm_hkdf_stream_segment_encrypter_test.cc"],
deps = [
":aes_gcm_hkdf_stream_segment_encrypter",
":random",
":stream_segment_encrypter",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_hkdf_streaming_test",
size = "small",
srcs = ["aes_gcm_hkdf_streaming_test.cc"],
deps = [
":aes_gcm_hkdf_streaming",
":common_enums",
":random",
":streaming_aead_test_util",
":test_util",
"//cc:output_stream",
"//cc/util:istream_input_stream",
"//cc/util:ostream_output_stream",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_ctr_hmac_streaming_test",
size = "small",
srcs = ["aes_ctr_hmac_streaming_test.cc"],
deps = [
":aes_ctr_hmac_streaming",
":common_enums",
":random",
":stream_segment_decrypter",
":stream_segment_encrypter",
":streaming_aead_test_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_eax_boringssl_test",
size = "small",
srcs = ["aes_eax_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:aes_eax",
],
deps = [
":aes_eax_boringssl",
":common_enums",
":wycheproof_util",
"//cc:aead",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "encrypt_then_authenticate_test",
size = "small",
srcs = ["encrypt_then_authenticate_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_ctr_boringssl",
":common_enums",
":encrypt_then_authenticate",
":hmac_boringssl",
":random",
"//cc:aead",
"//cc:mac",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_ctr_boringssl_test",
size = "small",
srcs = ["aes_ctr_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":aes_ctr_boringssl",
":random",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_siv_boringssl_test",
size = "small",
srcs = ["aes_siv_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:aes_siv_cmac",
],
deps = [
":aes_siv_boringssl",
":common_enums",
":wycheproof_util",
"//cc:deterministic_aead",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "ecdsa_sign_boringssl_test",
size = "small",
srcs = ["ecdsa_sign_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":common_enums",
":ec_util",
":ecdsa_sign_boringssl",
":ecdsa_verify_boringssl",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "ecdsa_verify_boringssl_test",
size = "small",
srcs = ["ecdsa_verify_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:all",
],
deps = [
":common_enums",
":ecdsa_sign_boringssl",
":ecdsa_verify_boringssl",
":wycheproof_util",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "ed25519_sign_boringssl_test",
size = "small",
srcs = ["ed25519_sign_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":ed25519_sign_boringssl",
":ed25519_verify_boringssl",
":random",
":subtle_util_boringssl",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "ed25519_verify_boringssl_test",
size = "small",
srcs = ["ed25519_verify_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:all",
],
deps = [
":ed25519_sign_boringssl",
":ed25519_verify_boringssl",
":subtle_util_boringssl",
":wycheproof_util",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "rsa_ssa_pss_verify_boringssl_test",
size = "small",
srcs = ["rsa_ssa_pss_verify_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:all",
],
deps = [
":common_enums",
":rsa_ssa_pss_verify_boringssl",
":wycheproof_util",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "rsa_ssa_pss_sign_boringssl_test",
size = "small",
srcs = ["rsa_ssa_pss_sign_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":rsa_ssa_pss_sign_boringssl",
":rsa_ssa_pss_verify_boringssl",
":subtle_util_boringssl",
"//cc/util:test_matchers",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "rsa_ssa_pkcs1_verify_boringssl_test",
size = "small",
srcs = ["rsa_ssa_pkcs1_verify_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:all",
],
deps = [
":common_enums",
":rsa_ssa_pkcs1_verify_boringssl",
":wycheproof_util",
"//cc:public_key_sign",
"//cc:public_key_verify",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "rsa_ssa_pkcs1_sign_boringssl_test",
size = "small",
srcs = ["rsa_ssa_pkcs1_sign_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":rsa_ssa_pkcs1_sign_boringssl",
":rsa_ssa_pkcs1_verify_boringssl",
":subtle_util_boringssl",
"//cc/util:test_matchers",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aes_gcm_siv_boringssl_test",
size = "small",
srcs = ["aes_gcm_siv_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:aes_gcm_siv",
],
deps = [
":aes_gcm_siv_boringssl",
":common_enums",
":wycheproof_util",
"//cc:aead",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "random_test",
size = "small",
srcs = ["random_test.cc"],
copts = ["-Iexternal/gtest/include"],
linkopts = ["-pthread"],
deps = [
":random",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "common_enums_test",
size = "small",
srcs = ["common_enums_test.cc"],
copts = ["-Iexternal/gtest/include"],
linkopts = ["-pthread"],
deps = [
":common_enums",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "subtle_util_test",
size = "small",
srcs = ["subtle_util_test.cc"],
deps = [
":subtle_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "subtle_util_boringssl_test",
size = "small",
srcs = ["subtle_util_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
data = [
"@wycheproof//testvectors:ecdh",
],
linkopts = ["-pthread"],
deps = [
":ec_util",
":subtle_util_boringssl",
":wycheproof_util",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@rapidjson",
],
)
cc_test(
name = "xchacha20_poly1305_boringssl_test",
size = "small",
srcs = ["xchacha20_poly1305_boringssl_test.cc"],
copts = ["-Iexternal/gtest/include"],
deps = [
":xchacha20_poly1305_boringssl",
"//cc:aead",
"//cc/util:status",
"//cc/util:statusor",
"//cc/util:test_util",
"@boringssl//:crypto",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "streaming_aead_decrypting_stream_test",
size = "medium",
srcs = ["streaming_aead_decrypting_stream_test.cc"],
copts = ["-Iexternal/gtest/include"],
linkopts = ["-lpthread"],
deps = [
":random",
":stream_segment_decrypter",
":streaming_aead_decrypting_stream",
":test_util",
"//cc:input_stream",
"//cc/util:istream_input_stream",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "streaming_aead_encrypting_stream_test",
size = "medium",
srcs = ["streaming_aead_encrypting_stream_test.cc"],
copts = ["-Iexternal/gtest/include"],
linkopts = ["-lpthread"],
deps = [
":random",
":stream_segment_encrypter",
":streaming_aead_encrypting_stream",
":test_util",
"//cc:output_stream",
"//cc/util:ostream_output_stream",
"//cc/util:status",
"//cc/util:statusor",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "aead_test_util_test",
srcs = ["aead_test_util_test.cc"],
deps = [
":aead_test_util",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "streaming_aead_test_util_test",
srcs = ["streaming_aead_test_util_test.cc"],
deps = [
":streaming_aead_test_util",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "hybrid_test_util_test",
srcs = ["hybrid_test_util_test.cc"],
deps = [
":hybrid_test_util",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_googletest//:gtest_main",
],
)
cc_test(
name = "decrypting_random_access_stream_test",
srcs = ["decrypting_random_access_stream_test.cc"],
deps = [
":decrypting_random_access_stream",
"//cc:output_stream",
"//cc:random_access_stream",
"//cc:streaming_aead",
"//cc/subtle:random",
"//cc/subtle:test_util",
"//cc/util:file_random_access_stream",
"//cc/util:ostream_output_stream",
"//cc/util:status",
"//cc/util:test_matchers",
"//cc/util:test_util",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
],
)