Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

PGP message integrity: Basically, only private key can decrypt message encrypted with public key. But in the message integrity service in PGP does the reverse, where the Hash of the message if encrypted with private key and then the receiver decrypts it with public key! I need clarification.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This procedure, also called signing a message, does not encrypt the message itself, thus does not ensure it cannot be read by others. Instead, a hash sum of the message is encrypted using the private key.

For verifying, the recipient again calculates the hash sum of the message, and decrypts the hash sum calculated by the sender using the sender's public key. If this operation is successful, the recipient knows the the sender must be the owner of the private key, as nobody else could have used this for encrypting the hash message.

This requires that both keys (private and public) can be used to encrypt for each other, which is given for RSA. The procedure might be different for other encryption algorithms.

share|improve this answer
    
so with RSA, encryption and decryption can be done with both public and private key? –  Balu Jul 21 at 17:40
    
Yes, for RSA any of the two keys can be used for encrypting, and the respective other key for decrypting. –  Jens Erat Jul 21 at 17:46
    
that made it clear for me :) I was confused with the older version of public key crypto, until i knew about RSA. –  Balu Jul 21 at 17:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.