开发者

RSA Decryption using PrivateKey in pem format

I'm a newbie to this Cryptographic area. Here is my problem:

I need to decrypt a Cipher text(encrpyted by RSA-Public key) using PrivateKey which is in "privatekey.pem" format. I does not know anything about it has been encrypted whether it is password based or anyother methods, but it is RSA based encryption. Is there any way to decrypt the Cipher text? I hope you all understand my query if any doubts pls post me开发者_开发技巧 I will explain clearly. I request you to post any ways possible using Java ...


Assymmetric encryption works on the principle that you need one of the two keys to encrypt data and the other one to decrypt it. In your case this is how it would work:

  • Generate key pair: one private key, one public key
  • Give your public key to someone else, have him/her encrypt a message with it. You will be the only one who can read the message with your private key (no password involved).

So the only thing you need is the private key.

This means that you need to store your private key somewhere. For security reasons, the private key is sometimes encrypted with triple DES (which is symmetric). In that case, you encrypt your private key with a triple DES password. After you have decrypted your private key, you can use it to decrypt the message encoded which was encoded with the public key.password and need that password to decrypt the private key. This is how it works in apache SSL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜