Skip to content

Conversation

@preuss-adam
Copy link
Contributor

The motivation here is to be able to use a more performant crypto provider (e.g. https://github.com/corretto/amazon-corretto-crypto-provider) for biscuits. But... it's complicated and we can't just use this out of the bag.

A bit of background that I'll try to summarize as succinctly as possible:

Presently, biscuit-java uses bouncycastle for its crypto. In some places, it does this through JCE, in others it calls the bouncycastle code directly. It would be nice if we could standardize everything and just use JCE; however, JCE doesn't support all of the options needed by biscuits. Specifically for secp256r1, these are (1) compression/decompression of the public key, and (2) curve multiplication to generate the public key from the private key.

So with this in mind, I propose to have support for injecting our own crypto provider. By default, we will have a default implementation that calls bouncycastle directly (not using JCE at all so as to avoid polluting the set of registered crypto providers). Optionally, users of this library can inject their own crypto code and depend on whatever crypto implementations they wish.

@preuss-adam
Copy link
Contributor Author

@Korbik Can you have a look at this one? thx

Copy link
Contributor

@Korbik Korbik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Korbik Korbik merged commit f43938f into eclipse-biscuit:main Aug 6, 2025
2 checks passed
@preuss-adam preuss-adam deleted the apreuss/crypto-providers branch August 6, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants