package(default_visibility = ["//visibility:public"]) licenses(["notice"]) filegroup( name = "hpke_boringssl", testonly = 1, srcs = ["hpke_boringssl.json"], ) # Below we define a set of genrules to copy test vectors from Wycheproof. # This is needed to assist the transition to using Bazel Modules, in that Bazel # Modules packages use a different folder naming for dependencies compared to # WORKSPACE-based packages. genrule( name = "aes_cmac", testonly = 1, srcs = ["@wycheproof//testvectors:aes_cmac"], outs = ["aes_cmac_test.json"], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "aes_gcm", testonly = 1, srcs = ["@wycheproof//testvectors:aes_gcm"], outs = ["aes_gcm_test.json"], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "aes_gcm_siv", testonly = 1, srcs = ["@wycheproof//testvectors:aes_gcm_siv"], outs = ["aes_gcm_siv_test.json"], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "aes_eax", testonly = 1, srcs = ["@wycheproof//testvectors:aes_eax"], outs = ["aes_eax_test.json"], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "aes_siv_cmac", testonly = 1, srcs = ["@wycheproof//testvectors:aes_siv_cmac"], outs = [ "aead_aes_siv_cmac_test.json", "aes_siv_cmac_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "chacha20_poly1305", testonly = 1, srcs = ["@wycheproof//testvectors:chacha20_poly1305"], outs = [ "chacha20_poly1305_test.json", "xchacha20_poly1305_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "hmac", testonly = 1, srcs = ["@wycheproof//testvectors:hmac"], outs = [ "hmac_sha1_test.json", "hmac_sha224_test.json", "hmac_sha256_test.json", "hmac_sha384_test.json", "hmac_sha3_224_test.json", "hmac_sha3_256_test.json", "hmac_sha3_384_test.json", "hmac_sha3_512_test.json", "hmac_sha512_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "rsa_pss", testonly = 1, srcs = ["@wycheproof//testvectors:all"], outs = [ "rsa_pss_2048_sha1_mgf1_20_test.json", "rsa_pss_2048_sha256_mgf1_0_test.json", "rsa_pss_2048_sha256_mgf1_32_test.json", "rsa_pss_2048_sha512_256_mgf1_28_test.json", "rsa_pss_2048_sha512_256_mgf1_32_test.json", "rsa_pss_3072_sha256_mgf1_32_test.json", "rsa_pss_4096_sha256_mgf1_32_test.json", "rsa_pss_4096_sha512_mgf1_32_test.json", "rsa_pss_misc_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "rsa_signature", testonly = 1, srcs = ["@wycheproof//testvectors:rsa_signature"], outs = [ # Signature verification "rsa_signature_2048_sha224_test.json", "rsa_signature_2048_sha256_test.json", "rsa_signature_2048_sha512_test.json", "rsa_signature_3072_sha256_test.json", "rsa_signature_3072_sha384_test.json", "rsa_signature_3072_sha512_test.json", "rsa_signature_4096_sha384_test.json", "rsa_signature_4096_sha512_test.json", "rsa_signature_2048_sha3_224_test.json", "rsa_signature_2048_sha3_256_test.json", "rsa_signature_2048_sha3_384_test.json", "rsa_signature_2048_sha3_512_test.json", "rsa_signature_3072_sha3_256_test.json", "rsa_signature_3072_sha3_384_test.json", "rsa_signature_3072_sha3_512_test.json", "rsa_signature_test.json", # Signature generation "rsa_sig_gen_misc_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "ecdsa_webcrypto", testonly = 1, srcs = ["@wycheproof//testvectors:ecdsa_webcrypto"], outs = ["ecdsa_webcrypto_test.json"], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "ecdsa", testonly = 1, srcs = ["@wycheproof//testvectors:all"], outs = [ "ecdsa_brainpoolP224r1_sha224_test.json", "ecdsa_brainpoolP256r1_sha256_test.json", "ecdsa_brainpoolP320r1_sha384_test.json", "ecdsa_brainpoolP384r1_sha384_test.json", "ecdsa_brainpoolP512r1_sha512_test.json", "ecdsa_secp224r1_sha224_test.json", "ecdsa_secp224r1_sha256_test.json", "ecdsa_secp224r1_sha3_224_test.json", "ecdsa_secp224r1_sha3_256_test.json", "ecdsa_secp224r1_sha3_512_test.json", "ecdsa_secp224r1_sha512_test.json", "ecdsa_secp256k1_sha256_test.json", "ecdsa_secp256k1_sha3_256_test.json", "ecdsa_secp256k1_sha3_512_test.json", "ecdsa_secp256k1_sha512_test.json", "ecdsa_secp256r1_sha256_test.json", "ecdsa_secp256r1_sha3_256_test.json", "ecdsa_secp256r1_sha3_512_test.json", "ecdsa_secp256r1_sha512_test.json", "ecdsa_secp384r1_sha384_test.json", "ecdsa_secp384r1_sha3_384_test.json", "ecdsa_secp384r1_sha3_512_test.json", "ecdsa_secp384r1_sha512_test.json", "ecdsa_secp521r1_sha3_512_test.json", "ecdsa_secp521r1_sha512_test.json", "ecdsa_secp256r1_sha256_p1363_test.json", "ecdsa_secp384r1_sha512_p1363_test.json", "ecdsa_secp521r1_sha512_p1363_test.json", "ecdsa_test.json", # deprecated: use the files above ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "eddsa", testonly = 1, srcs = ["@wycheproof//testvectors:eddsa"], outs = [ "ed448_test.json", "eddsa_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "ecdh", testonly = 1, srcs = ["@wycheproof//testvectors:ecdh"], outs = [ "ecdh_brainpoolP224r1_test.json", "ecdh_brainpoolP256r1_test.json", "ecdh_brainpoolP320r1_test.json", "ecdh_brainpoolP384r1_test.json", "ecdh_brainpoolP512r1_test.json", "ecdh_secp224r1_test.json", "ecdh_secp256k1_test.json", "ecdh_secp256r1_test.json", "ecdh_secp384r1_test.json", "ecdh_secp521r1_test.json", "ecdh_test.json", # deprecated use the files above ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "ecdh_ecpoint", testonly = 1, srcs = ["@wycheproof//testvectors:ecdh_ecpoint"], outs = [ "ecdh_secp224r1_ecpoint_test.json", "ecdh_secp256r1_ecpoint_test.json", "ecdh_secp384r1_ecpoint_test.json", "ecdh_secp521r1_ecpoint_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "keywrap", testonly = 1, srcs = ["@wycheproof//testvectors:keywrap"], outs = [ "kw_test.json", "kwp_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "kdf", testonly = 1, srcs = ["@wycheproof//testvectors:kdf"], outs = [ "hkdf_sha1_test.json", "hkdf_sha256_test.json", "hkdf_sha384_test.json", "hkdf_sha512_test.json", ], cmd = "cp $(SRCS) $(@D)/", ) genrule( name = "xdh", testonly = 1, srcs = ["@wycheproof//testvectors:xdh"], outs = [ "x25519_asn_test.json", "x25519_jwk_test.json", "x25519_pem_test.json", "x25519_test.json", "x448_asn_test.json", "x448_jwk_test.json", "x448_pem_test.json", "x448_test.json", ], cmd = "cp $(SRCS) $(@D)/", )