We should add standard APIs for the key generation and key derivation steps that need to be performed during the SSL/TLS handshake. Currently, no such APIs exist and SSL implementations (such as SunJSSE) perform the necessary hashing and other steps individually using crypto primitives. This is an issue because all the session secrets are stored in the Java heap even if secure crypto hardware is available. This applies to the premaster secret, master secret, cipher keys and ivs, and mac keys.
PKCS#11 defines the following mechanisms for these purposes:
. RSA premaster secret key generation:
CKM_TLS_PRE_MASTER_KEY_GEN
CKM_SSL3_PRE_MASTER_KEY_GEN
. master secret derivation:
CKM_TLS_MASTER_KEY_DERIVE
CKM_TLS_MASTER_KEY_DERIVE_DH
CKM_SSL3_MASTER_KEY_DERIVE
CKM_SSL3_MASTER_KEY_DERIVE_DH
. derivation of cipher ivs and cipher and mac keys:
CKM_TLS_KEY_AND_MAC_DERIVE
CKM_SSL3_MASTER_KEY_DERIVE_DH
We should define APIs that can map to these PKCS#11 algorithms so that all cryptographic secrets can be stored on secure hardware crypto tokens.
###@###.### 2005-04-18 22:57:33 GMT