We're using a rather low-level PKCS#11 interface and are trying to generate a key-pair for RSA with it. We're using the mechanism RSA_PKCS_KEY_PAIR_GEN
(0x00). Among others we have copied the following two attributes from one of the interface's code samples:
MODULUS_BITS (0x0121) = 1024
PUBLIC_EXPONENT (0x0122) = { 0x01, 0x00, 0x01 }
We're pretty sure that the used values are demo values only and we need to use different ones in our production code.
Two questions actually:
- Is MODULUS_BITS the length of the generated key? I.e., is 4096 a good value nowadays?
- Is PUBLIC_EXPONENT really required? What is it?