not-yet-commons-ssl



Decrypting RSA Private Keys in Java

Don't forget to install your JVM's Unlimited Strength Jurisdiction Policy Files if you want the AES-192 and AES-256 tests to pass.

java -showversion -cp build/not-yet-commons-ssl-0.3.7.jar  org.apache.commons.ssl.PKCS8Key samples/rsa/*.*

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	128	samples/rsa/openssl_rsa_aes128_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	128	samples/rsa/openssl_rsa_aes128_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	128	samples/rsa/openssl_rsa_aes128_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	128	samples/rsa/openssl_rsa_aes128_ofb.pem
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	192	samples/rsa/openssl_rsa_aes192_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	192	samples/rsa/openssl_rsa_aes192_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	192	samples/rsa/openssl_rsa_aes192_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	192	samples/rsa/openssl_rsa_aes192_ofb.pem
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	256	samples/rsa/openssl_rsa_aes256_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	256	samples/rsa/openssl_rsa_aes256_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	256	samples/rsa/openssl_rsa_aes256_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	256	samples/rsa/openssl_rsa_aes256_ofb.pem
   SUCCESS    	RSA	Blowfish/CBC/PKCS5Padding	128	samples/rsa/openssl_rsa_blowfish_cbc.pem
   SUCCESS    	RSA	Blowfish/CFB/NoPadding   	128	samples/rsa/openssl_rsa_blowfish_cfb.pem
   SUCCESS    	RSA	Blowfish/ECB/PKCS5Padding	128	samples/rsa/openssl_rsa_blowfish_ecb.pem
   SUCCESS    	RSA	Blowfish/OFB/NoPadding   	128	samples/rsa/openssl_rsa_blowfish_ofb.pem
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/openssl_rsa_des1_cbc.pem
   SUCCESS    	RSA	DES/CFB/NoPadding        	 64	samples/rsa/openssl_rsa_des1_cfb.pem
   SUCCESS    	RSA	DES/ECB/PKCS5Padding     	 64	samples/rsa/openssl_rsa_des1_ecb.pem
   SUCCESS    	RSA	DES/OFB/NoPadding        	 64	samples/rsa/openssl_rsa_des1_ofb.pem
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/openssl_rsa_des2_cbc.pem
   SUCCESS    	RSA	DESede/CFB/NoPadding     	192	samples/rsa/openssl_rsa_des2_cfb.pem
   SUCCESS    	RSA	DESede/ECB/PKCS5Padding  	192	samples/rsa/openssl_rsa_des2_ecb.pem
   SUCCESS    	RSA	DESede/OFB/NoPadding     	192	samples/rsa/openssl_rsa_des2_ofb.pem
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/openssl_rsa_des3_cbc.pem
   SUCCESS    	RSA	DESede/CFB/NoPadding     	192	samples/rsa/openssl_rsa_des3_cfb.pem
   SUCCESS    	RSA	DESede/ECB/PKCS5Padding  	192	samples/rsa/openssl_rsa_des3_ecb.pem
   SUCCESS    	RSA	DESede/OFB/NoPadding     	192	samples/rsa/openssl_rsa_des3_ofb.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	128	samples/rsa/openssl_rsa_rc2_128_cbc.pem
   SUCCESS    	RSA	RC2/CFB/NoPadding        	128	samples/rsa/openssl_rsa_rc2_128_cfb.pem
   SUCCESS    	RSA	RC2/ECB/PKCS5Padding     	128	samples/rsa/openssl_rsa_rc2_128_ecb.pem
   SUCCESS    	RSA	RC2/OFB/NoPadding        	128	samples/rsa/openssl_rsa_rc2_128_ofb.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 40	samples/rsa/openssl_rsa_rc2_40.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/openssl_rsa_rc2_64.pem
   SUCCESS    	RSA	UNENCRYPTED              	  0	samples/rsa/openssl_rsa_unencrypted.der
   SUCCESS    	RSA	UNENCRYPTED              	  0	samples/rsa/openssl_rsa_unencrypted.pem
   SUCCESS    	RSA	UNENCRYPTED              	  0	samples/rsa/pkcs8_rsa_unencrypted.der
   SUCCESS    	RSA	UNENCRYPTED              	  0	samples/rsa/pkcs8_rsa_unencrypted.pem
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md2_des1.der
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md2_des1.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md2_rc2_64.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md2_rc2_64.pem
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md5_des1.der
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md5_des1.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md5_rc2_64.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_md5_rc2_64.pem
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_sha1_des1.der
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_sha1_des1.pem
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v1_rsa_sha1_des2.der
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v1_rsa_sha1_des2.pem
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v1_rsa_sha1_des3.der
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v1_rsa_sha1_des3.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v1_rsa_sha1_rc2_128.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v1_rsa_sha1_rc2_128.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 40	samples/rsa/pkcs8v1_rsa_sha1_rc2_40.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 40	samples/rsa/pkcs8v1_rsa_sha1_rc2_40.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_sha1_rc2_64.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v1_rsa_sha1_rc2_64.pem
   SUCCESS    	RSA	RC4                      	128	samples/rsa/pkcs8v1_rsa_sha1_rc4_128.der
   SUCCESS    	RSA	RC4                      	128	samples/rsa/pkcs8v1_rsa_sha1_rc4_128.pem
   SUCCESS    	RSA	RC4                      	 40	samples/rsa/pkcs8v1_rsa_sha1_rc4_40.der
   SUCCESS    	RSA	RC4                      	 40	samples/rsa/pkcs8v1_rsa_sha1_rc4_40.pem
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_aes128_cbc.der
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_aes128_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	128	samples/rsa/pkcs8v2_rsa_aes128_cfb.der
   SUCCESS    	RSA	AES/CFB/NoPadding        	128	samples/rsa/pkcs8v2_rsa_aes128_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_aes128_ecb.der
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_aes128_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	128	samples/rsa/pkcs8v2_rsa_aes128_ofb.der
   SUCCESS    	RSA	AES/OFB/NoPadding        	128	samples/rsa/pkcs8v2_rsa_aes128_ofb.pem
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	192	samples/rsa/pkcs8v2_rsa_aes192_cbc.der
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	192	samples/rsa/pkcs8v2_rsa_aes192_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	192	samples/rsa/pkcs8v2_rsa_aes192_cfb.der
   SUCCESS    	RSA	AES/CFB/NoPadding        	192	samples/rsa/pkcs8v2_rsa_aes192_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	192	samples/rsa/pkcs8v2_rsa_aes192_ecb.der
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	192	samples/rsa/pkcs8v2_rsa_aes192_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	192	samples/rsa/pkcs8v2_rsa_aes192_ofb.der
   SUCCESS    	RSA	AES/OFB/NoPadding        	192	samples/rsa/pkcs8v2_rsa_aes192_ofb.pem
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	256	samples/rsa/pkcs8v2_rsa_aes256_cbc.der
   SUCCESS    	RSA	AES/CBC/PKCS5Padding     	256	samples/rsa/pkcs8v2_rsa_aes256_cbc.pem
   SUCCESS    	RSA	AES/CFB/NoPadding        	256	samples/rsa/pkcs8v2_rsa_aes256_cfb.der
   SUCCESS    	RSA	AES/CFB/NoPadding        	256	samples/rsa/pkcs8v2_rsa_aes256_cfb.pem
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	256	samples/rsa/pkcs8v2_rsa_aes256_ecb.der
   SUCCESS    	RSA	AES/ECB/PKCS5Padding     	256	samples/rsa/pkcs8v2_rsa_aes256_ecb.pem
   SUCCESS    	RSA	AES/OFB/NoPadding        	256	samples/rsa/pkcs8v2_rsa_aes256_ofb.der
   SUCCESS    	RSA	AES/OFB/NoPadding        	256	samples/rsa/pkcs8v2_rsa_aes256_ofb.pem
   SUCCESS    	RSA	Blowfish/CBC/PKCS5Padding	128	samples/rsa/pkcs8v2_rsa_blowfish_cbc.der
   SUCCESS    	RSA	Blowfish/CBC/PKCS5Padding	128	samples/rsa/pkcs8v2_rsa_blowfish_cbc.pem
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_des1_cbc.der
   SUCCESS    	RSA	DES/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_des1_cbc.pem
   SUCCESS    	RSA	DES/CFB/NoPadding        	 64	samples/rsa/pkcs8v2_rsa_des1_cfb.der
   SUCCESS    	RSA	DES/CFB/NoPadding        	 64	samples/rsa/pkcs8v2_rsa_des1_cfb.pem
   SUCCESS    	RSA	DES/ECB/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_des1_ecb.der
   SUCCESS    	RSA	DES/ECB/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_des1_ecb.pem
   SUCCESS    	RSA	DES/OFB/NoPadding        	 64	samples/rsa/pkcs8v2_rsa_des1_ofb.der
   SUCCESS    	RSA	DES/OFB/NoPadding        	 64	samples/rsa/pkcs8v2_rsa_des1_ofb.pem
   SUCCESS    	RSA	DESede/ECB/PKCS5Padding  	192	samples/rsa/pkcs8v2_rsa_des2_ecb_SEEMS_WRONG.der
   SUCCESS    	RSA	DESede/ECB/PKCS5Padding  	192	samples/rsa/pkcs8v2_rsa_des2_ecb_SEEMS_WRONG.pem
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v2_rsa_des3.der
   SUCCESS    	RSA	DESede/CBC/PKCS5Padding  	192	samples/rsa/pkcs8v2_rsa_des3.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_rc2_128.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	128	samples/rsa/pkcs8v2_rsa_rc2_128.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 40	samples/rsa/pkcs8v2_rsa_rc2_40.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 40	samples/rsa/pkcs8v2_rsa_rc2_40.pem
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_rc2_64.der
   SUCCESS    	RSA	RC2/CBC/PKCS5Padding     	 64	samples/rsa/pkcs8v2_rsa_rc2_64.pem