Where to ask this question?

If this is wrong place to ask, please direct me to the right spot.
I have a random number generator that I’d like to package as a PKCS11 module and have Firefox/TB use it as a source for generating cryptographic keys. (a) Is this feasible? and (b) can someone point me to some help about how to write the PKCS11 module (e.g. in C or C++ for Windows)?