Key Length from Certificate
843810Oct 28 2004 — edited Nov 1 2004Given an X509 certificate with public key, is it possible to derive the Key Length ?
Example: ( from Bouncy Castle libs )
// Generate key pair
KeyPairGenerator keyGen = KeyPairGenerator.getInstance(
ecnryptionType,providerID );
keyGen.initialize(keyLen, new SecureRandom());
KeyPair keypair = keyGen.generateKeyPair();
keyLen in this example, is the Key length chosen for initialization ...when the public key is subsequently saved in the certificate, I would like to be able, later, to derive the key length used ?
Ideas ?