load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//:__subpackages__"])  # keep

go_library(
    name = "subtle",
    srcs = [
        "ecies_aead_hkdf_dem_helper.go",
        "ecies_aead_hkdf_hybrid_decrypt.go",
        "ecies_aead_hkdf_hybrid_encrypt.go",
        "ecies_hkdf_recipient_kem.go",
        "ecies_hkdf_sender_kem.go",
        "elliptic_curves.go",
        "public_key.go",
        "subtle.go",
    ],
    importpath = "github.com/google/tink/go/hybrid/subtle",
    visibility = ["//visibility:public"],  # keep; used by non-Tink library
    deps = [
        "//keyset",
        "//proto/hpke_go_proto",
        "//proto/tink_go_proto",
        "//subtle",
        "//tink",
        "@org_golang_google_protobuf//proto",
    ],
)

go_test(
    name = "subtle_test",
    srcs = [
        "elliptic_curves_test.go",
        "public_key_test.go",
        "subtle_test.go",
    ],
    data = ["@wycheproof//testvectors:all"],
    deps = [
        ":subtle",
        "//hybrid",
        "//keyset",
        "//proto/hpke_go_proto",
        "//proto/tink_go_proto",
        "//subtle/random",
        "//testutil",
        "@org_golang_google_protobuf//proto",
    ],
)

alias(
    name = "go_default_library",
    actual = ":subtle",
    visibility = ["//visibility:public"],  # keep; used by non-Tink library
)
