I was trying to extract an un-exportable key from OS X Keychain. I used this tool to extract the key. The tool gives me a hexdump of the private key. An RSA 2048 bit key came out to be 2441 bits, after extracting through the tool.
The problem is, I can't figure out what format the key is in, to convert it to PEM/DER or any standard format. After extraction, it looks like this:
[+] Private Key Record [-] PrintName: <name> [-] Label <hexdump> [-] Key Class : CSSM_KEYCLASS_PRIVATE_KEY [-] Private : 0 [-] Key Type : CSSM_ALGID_RSA [-] Key Size : 2048 bits [-] Effective Key Size : 2048 bits [-] Extracted : 0 [-] CSSM Type : Core CSP (local space) [-] Key Name <hexdump> [-] Decrypted Private Key <hexdump>
Does anyone know what format this decrypted private key is in? And/or how to convert it to an OpenSSL-supported format?