Dan M wrote:
Re-read my initial post, and I asked the wrong question. It was written in haste, my apologies. Let me clarify...

We're actually not looking to replace the SSL engine in Firefox, but just use a different crypto provider (I was thinking OpenSSL crypto "engine" when I wrote the message). We're developing a hardware device similar to a crypto accelerator and, when it is installed on the local machine, we would like all SSL-related crypto routines in Firefox to be redirected to our device.
There are existence proofs that this is doable with NSS on servers, it should also work to do on clients. The trick is you need to implement all the SSL mechanisms in your token. The first one you don't do will cause NSS to find a token that will (usually the internal token). You also need to set your token as the default implementation for most of the required algorithms (RSA, SHA1, MD5, etc). Again, if you don't implement the algorithm then the operation will likely move to the softoken.

To set your token as the default token, you can use modutil. Note that any private keys that are part of the protocol should be stored in your token (this is a bigger issue for servers, since client side private keys are usually only used in client auth operations, which are optional).
My hardware developers tell me this could be quite cumbersome if we're not implementing the full PKCS#11 interface. I'm just looking to find out whether it can be done without implementing all the authentication features of PKCS#11.
If you really want to replace the NSS crypto engine, you pretty much need to do everything, or at some point NSS will take the operation away from your hardware. If you hit a situation where NSS has to move the keys around a lot, you may find it works, but much more slowly then expected.

When vendors talk about only partially implementing the interface, I have to ask myself 'Why do you want to do this?'. If all you are doing is replacing NSS's internal implementation, then you aren't adding any new functionality. So far I've only seen a couple of valid reasons for doing the replace:

1) Your crypto engine is an accelerator. In which case you usually don't want to move keys around anyway, and therefore you must implement everything. 2) Your token is a hardware FIPS engine, in which case you can't move keys around and you must implement everything.

What you can't do is 'add functionality', since the in order to interoperate you will have to return the same data that softoken would have returned.

bob
Thanks,
Dan
LDE Global Innovations, Inc.


_______________________________________________
dev-tech-crypto mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to