tink-java icon indicating copy to clipboard operation
tink-java copied to clipboard

No PrimitiveConstructor for LegacyProtoKey with primitive type: Aead available

Open ber4444 opened this issue 2 months ago • 0 comments

Describe the bug:

Encrypt-decrypt no longer works

What was the expected behavior?

BAU

How can we reproduce the bug?

Migrate from deprecated val aead = handle.getPrimitive(Aead::class.java) to the new val aead = handle.getPrimitive(ConfigurationV0.get(), Aead::class.java)

Do you have any debugging information?

java.security.GeneralSecurityException: No PrimitiveConstructor for LegacyProtoKey with primitive type: Aead available, see https://developers.google.com/tink/faq/registration_errors
  at com.google.crypto.tink.internal.PrimitiveRegistry.getPrimitive(PrimitiveRegistry.java:136)
  at com.google.crypto.tink.internal.PrimitiveRegistry.lambda$wrapWithPrimitiveWrapper$0$com-google-crypto-tink-internal-PrimitiveRegistry(PrimitiveRegistry.java:155)
  at com.google.crypto.tink.internal.PrimitiveRegistry$$ExternalSyntheticLambda0.create(D8$$SyntheticClass:0)
  at com.google.crypto.tink.aead.AeadWrapper.wrap(AeadWrapper.java:136)

What version of Tink are you using?

All newest versions repro this

Can you tell us more about your development environment?

Android 15, Samsung Android 16, Pixel

Is there anything else you'd like to add?

ber4444 avatar Oct 31 '25 17:10 ber4444