load("@npm//@bazel/typescript:index.bzl", "ts_library") package(default_visibility = ["//:__subpackages__"]) ts_library( name = "aes_ctr", srcs = [ "aes_ctr.ts", ], deps = [ ":bytes", ":ind_cpa_cipher", ":random", ":validators", "//exception", ], ) ts_library( name = "aes_gcm", srcs = [ "aes_gcm.ts", ], deps = [ ":random", ":validators", "//aead/internal", ], ) ts_library( name = "bytes", srcs = [ "bytes.ts", ], deps = [ "//exception", ], ) ts_library( name = "ecdsa", srcs = [ "ecdsa_sign.ts", "ecdsa_verify.ts", ], deps = [ ":elliptic_curves", ":validators", "//exception", "//signature/internal", ], ) ts_library( name = "ecies", srcs = [ "ecies_aead_hkdf_dem_helper.ts", "ecies_aead_hkdf_hybrid_decrypt.ts", "ecies_aead_hkdf_hybrid_encrypt.ts", "ecies_hkdf_kem_recipient.ts", "ecies_hkdf_kem_sender.ts", ], deps = [ ":bytes", ":elliptic_curves", ":hkdf", "//aead/internal", "//exception", "//hybrid/internal", ], ) ts_library( name = "elliptic_curves", srcs = [ "elliptic_curves.ts", ], deps = [ ":bytes", "//exception", ], ) ts_library( name = "encrypt_then_authenticate", srcs = [ "encrypt_then_authenticate.ts", ], deps = [ ":aes_ctr", ":bytes", ":hmac", ":ind_cpa_cipher", ":validators", "//aead/internal", "//exception", "//mac/internal", ], ) ts_library( name = "hkdf", srcs = [ "hkdf.ts", ], deps = [ ":hmac", ":validators", "//exception", ], ) ts_library( name = "hmac", srcs = [ "hmac.ts", ], deps = [ ":bytes", ":validators", "//exception", "//mac/internal", ], ) ts_library( name = "ind_cpa_cipher", srcs = [ "ind_cpa_cipher.ts", ], ) ts_library( name = "random", srcs = [ "random.ts", ], deps = ["//exception"], ) ts_library( name = "validators", srcs = [ "validators.ts", ], deps = ["//exception"], ) ts_library( name = "subtle_tests", testonly = True, srcs = [ "aes_ctr_test.ts", "aes_gcm_test.ts", "bytes_test.ts", "ecdsa_sign_test.ts", "ecdsa_verify_test.ts", "ecies_aead_hkdf_hybrid_decrypt_test.ts", "ecies_aead_hkdf_hybrid_encrypt_test.ts", "ecies_hkdf_kem_recipient_test.ts", "ecies_hkdf_kem_sender_test.ts", "elliptic_curves_test.ts", "encrypt_then_authenticate_test.ts", "hkdf_test.ts", "hmac_test.ts", ":wycheproof_ecdh_test_vectors", ":wycheproof_ecdsa_test_vectors", ], deps = [ ":aes_ctr", ":aes_gcm", ":bytes", ":ecdsa", ":ecies", ":elliptic_curves", ":encrypt_then_authenticate", ":hkdf", ":hmac", ":random", ":validators", "//aead", "//aead:aead_config", "//aead:aead_key_templates", "//exception", "//hybrid", "//hybrid:registry_ecies_aead_hkdf_dem_helper", "//internal:registry", "//signature/internal", "//testing/internal", "@npm//@types/jasmine", ], ) genrule( name = "wycheproof_ecdh_test_vectors", testonly = True, srcs = ["@wycheproof//testvectors:ecdh_webcrypto"], outs = [":wycheproof_ecdh_test_vectors.ts"], cmd = 'cat - $< <<<"export const WYCHEPROOF_ECDH_TEST_VECTORS =" >$@', ) genrule( name = "wycheproof_ecdsa_test_vectors", testonly = True, srcs = ["@wycheproof//testvectors:ecdsa_webcrypto"], outs = [":wycheproof_ecdsa_test_vectors.ts"], cmd = 'cat - $< <<<"export const WYCHEPROOF_ECDSA_TEST_VECTORS =" >$@', )