Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Remove the KeyManager implementation of the Ecies key managers. Inste…
Browse files Browse the repository at this point in the history
…ad, register a LegacyKeyManagerImpl and always use the modern approach.

PiperOrigin-RevId: 600697306
  • Loading branch information
tholenst authored and copybara-github committed Jan 23, 2024
1 parent 3b3f0d2 commit 27a9ee0
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 673 deletions.
86 changes: 32 additions & 54 deletions java_src/src/main/java/com/google/crypto/tink/hybrid/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,6 @@ java_library(
java_library(
name = "ecies_aead_hkdf_public_key_manager",
srcs = ["EciesAeadHkdfPublicKeyManager.java"],
deps = [
":hybrid_util",
":registry_ecies_aead_hkdf_dem_helper",
"//proto:ecies_aead_hkdf_java_proto",
"//proto:tink_java_proto",
"//src/main/java/com/google/crypto/tink:hybrid_encrypt",
"//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
"//src/main/java/com/google/crypto/tink/internal:key_type_manager",
"//src/main/java/com/google/crypto/tink/internal:primitive_factory",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_dem_helper",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_encrypt",
"//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
"//src/main/java/com/google/crypto/tink/subtle:validators",
"@maven//:com_google_protobuf_protobuf_java",
],
)

java_library(
Expand Down Expand Up @@ -121,30 +106,34 @@ java_library(
deps = [
":ecies_aead_hkdf_public_key_manager",
":ecies_parameters",
":ecies_private_key",
":ecies_proto_serialization",
":hybrid_util",
":registry_ecies_aead_hkdf_dem_helper",
"//proto:common_java_proto",
":ecies_public_key",
"//proto:ecies_aead_hkdf_java_proto",
"//proto:tink_java_proto",
"//src/main/java/com/google/crypto/tink:accesses_partial_key",
"//src/main/java/com/google/crypto/tink:hybrid_decrypt",
"//src/main/java/com/google/crypto/tink:hybrid_encrypt",
"//src/main/java/com/google/crypto/tink:insecure_secret_key_access",
"//src/main/java/com/google/crypto/tink:key_manager",
"//src/main/java/com/google/crypto/tink:key_template",
"//src/main/java/com/google/crypto/tink:parameters",
"//src/main/java/com/google/crypto/tink:registry",
"//src/main/java/com/google/crypto/tink:private_key_manager",
"//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters",
"//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters",
"//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util",
"//src/main/java/com/google/crypto/tink/internal:key_template_proto_converter",
"//src/main/java/com/google/crypto/tink/internal:key_type_manager",
"//src/main/java/com/google/crypto/tink/internal:elliptic_curves_util",
"//src/main/java/com/google/crypto/tink/internal:key_manager_registry",
"//src/main/java/com/google/crypto/tink/internal:legacy_key_manager_impl",
"//src/main/java/com/google/crypto/tink/internal:mutable_key_creation_registry",
"//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry",
"//src/main/java/com/google/crypto/tink/internal:primitive_factory",
"//src/main/java/com/google/crypto/tink/internal:private_key_type_manager",
"//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry",
"//src/main/java/com/google/crypto/tink/internal:primitive_constructor",
"//src/main/java/com/google/crypto/tink/internal:tink_bug_exception",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_dem_helper",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_decrypt",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_encrypt",
"//src/main/java/com/google/crypto/tink/subtle:elliptic_curves",
"//src/main/java/com/google/crypto/tink/subtle:validators",
"@maven//:com_google_protobuf_protobuf_java",
"//src/main/java/com/google/crypto/tink/util:secret_big_integer",
"@maven//:com_google_code_findbugs_jsr305",
],
)

Expand Down Expand Up @@ -430,21 +419,6 @@ android_library(
android_library(
name = "ecies_aead_hkdf_public_key_manager-android",
srcs = ["EciesAeadHkdfPublicKeyManager.java"],
deps = [
":hybrid_util-android",
":registry_ecies_aead_hkdf_dem_helper-android",
"//proto:ecies_aead_hkdf_java_proto_lite",
"//proto:tink_java_proto_lite",
"//src/main/java/com/google/crypto/tink:hybrid_encrypt-android",
"//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
"//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
"//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_dem_helper-android",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_encrypt-android",
"//src/main/java/com/google/crypto/tink/subtle:elliptic_curves-android",
"//src/main/java/com/google/crypto/tink/subtle:validators-android",
"@maven//:com_google_protobuf_protobuf_javalite",
],
)

android_library(
Expand Down Expand Up @@ -503,30 +477,34 @@ android_library(
deps = [
":ecies_aead_hkdf_public_key_manager-android",
":ecies_parameters-android",
":ecies_private_key-android",
":ecies_proto_serialization-android",
":hybrid_util-android",
":registry_ecies_aead_hkdf_dem_helper-android",
"//proto:common_java_proto_lite",
":ecies_public_key-android",
"//proto:ecies_aead_hkdf_java_proto_lite",
"//proto:tink_java_proto_lite",
"//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
"//src/main/java/com/google/crypto/tink:hybrid_decrypt-android",
"//src/main/java/com/google/crypto/tink:hybrid_encrypt-android",
"//src/main/java/com/google/crypto/tink:insecure_secret_key_access-android",
"//src/main/java/com/google/crypto/tink:key_manager-android",
"//src/main/java/com/google/crypto/tink:key_template-android",
"//src/main/java/com/google/crypto/tink:parameters-android",
"//src/main/java/com/google/crypto/tink:registry-android",
"//src/main/java/com/google/crypto/tink:private_key_manager-android",
"//src/main/java/com/google/crypto/tink/aead:aes_ctr_hmac_aead_parameters-android",
"//src/main/java/com/google/crypto/tink/aead:aes_gcm_parameters-android",
"//src/main/java/com/google/crypto/tink/config/internal:tink_fips_util-android",
"//src/main/java/com/google/crypto/tink/internal:key_template_proto_converter-android",
"//src/main/java/com/google/crypto/tink/internal:key_type_manager-android",
"//src/main/java/com/google/crypto/tink/internal:elliptic_curves_util-android",
"//src/main/java/com/google/crypto/tink/internal:key_manager_registry-android",
"//src/main/java/com/google/crypto/tink/internal:legacy_key_manager_impl-android",
"//src/main/java/com/google/crypto/tink/internal:mutable_key_creation_registry-android",
"//src/main/java/com/google/crypto/tink/internal:mutable_parameters_registry-android",
"//src/main/java/com/google/crypto/tink/internal:primitive_factory-android",
"//src/main/java/com/google/crypto/tink/internal:private_key_type_manager-android",
"//src/main/java/com/google/crypto/tink/internal:mutable_primitive_registry-android",
"//src/main/java/com/google/crypto/tink/internal:primitive_constructor-android",
"//src/main/java/com/google/crypto/tink/internal:tink_bug_exception-android",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_dem_helper-android",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_decrypt-android",
"//src/main/java/com/google/crypto/tink/subtle:ecies_aead_hkdf_hybrid_encrypt-android",
"//src/main/java/com/google/crypto/tink/subtle:elliptic_curves-android",
"//src/main/java/com/google/crypto/tink/subtle:validators-android",
"@maven//:com_google_protobuf_protobuf_javalite",
"//src/main/java/com/google/crypto/tink/util:secret_big_integer-android",
"@maven//:com_google_code_findbugs_jsr305",
],
)

Expand Down
Loading

0 comments on commit 27a9ee0

Please sign in to comment.