Quite simply, can one instance of
Cipher.getInstance("RSA")) be used from multiple threads, or do I need to stick multiple of them in a
ThreadLocal (in my case)?
Practice As Follows
No, it isn’t. The instance is stateful. So you need to store it threadlocal, or to obtain a new instance on every encrypt/decrypt call, or to wrap it in a