tink-crypto / tink-crypto/tink-java

Support registering custom key managers for user-defined primitives (or provide a migration path)

Open
#67 5 comments 0 reactions 1 assignee View on GitHub

@tholenst is already working on this.

Since Feb 23, 2026.

Dominant language
Java
Stars
305
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem?

We use Tink as a key management framework for RSA encryption and decryption. We define two custom primitive interfaces with their corresponding custom KeyManager and PrimitiveWrapper implementations. The actual cryptography is standard RSA JCE.

We are currently pinned to an older version of Tink because upgrading to the latest is blocked by a series of breaking changes that removed support for custom primitive registration:

  • PrimitiveSet and PrimitiveWrapper removed from public API
  • Registry.registerKeyManager() rejects custom primitives not in ALLOWED_PRIMITIVES

We had to implement these because Tink doesn't seem to offer a built-in primitive for direct RSA encryption.

What sort of feature would you like to see?

I think any of the following would unblock us:

  1. A supported mechanism for registering custom primitives - Issue https://github.com/tink-crypto/tink-java/issues/56 seems to mention this was on the radar, but it looks like it has no timeline?
  2. A stable internal API surface for custom primitive registration - if full public support isn't planned, documenting which internal APIs are safe for external use would help us plan upgrades.
  3. A built-in RSA encryption primitive - RSA-OAEP or RSA-PKCS1 encryption (not signing) for small payloads.

Have you considered any alternative solutions?

We can potentially use Tink's internal API. This may work but it is obviously fragile - future internal API changes will require further adaptation.

Thanks in advance for any feedback!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.