bouncycastle in libraries

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bouncycastle in libraries

Michał Zegan
Hello.

What would be the best practice for using bouncycastle in a library?
I mean cryptographic algorithms with jca. Because it is a library, I do
not want to force anyone to register bc as their provider to use the
library, but on the other hand I need bc's other functionality like asn,
and sometimes may need specific features of bc's jca provider maybe.
What should be done?


signature.asc (537 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bouncycastle in libraries

David Hook-3

It's like a regular jar, there's just one thing you might want to watch
for - if the JCE provider is getting used, it needs to be loaded by a
class loader that's trusted by the system class loader or it will fail
to validate. If you can rely on no user trying to install or use the
provider, you needn't worry about this, if your user base is mixed, you
need to be careful about where you place the jar.

Regards,

David

On 17/12/17 05:27, Michał Zegan wrote:
> Hello.
>
> What would be the best practice for using bouncycastle in a library?
> I mean cryptographic algorithms with jca. Because it is a library, I do
> not want to force anyone to register bc as their provider to use the
> library, but on the other hand I need bc's other functionality like asn,
> and sometimes may need specific features of bc's jca provider maybe.
> What should be done?
>