Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the difference between Pubkey and Cipher?

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran command line- gpg --version

it displays following information-

Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
CAMELLIA192, CAMELLIA256

Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB

I know Pubkey(RSA) and Cipher(CAST5) are both algorithms. Both are used to encrypt the data. So what is the difference between them?

Is it RSA provides assymetric vs symmertic algorithm and also provides key-pairs. Cipher would be another algorithm to encrypt the data using key pairs generated by RSA? Am I correct in my thinking?
 
John Gerso
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cipher algorithms use the same key for both encryption and decryption (or one is easily derivable from the other). This requires both parties to agree on the secret key prior to sending the message, or for the encryption key to be sent (and be susceptible to be intercepted).

Pubkey algorithms use different keys for encryption and decryption, and allow free transfer of the public key to anyone that asks for it(no prior agreement needed).
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

Doesn't sounds perfect to me. Then how would you explain a scenario where combination of RSA/CAST5 is used?
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amandeep Singh wrote:Thanks.

Doesn't sounds perfect to me. Then how would you explain a scenario where combination of RSA/CAST5 is used?


Looks like you have not read what I wrote in your other thread with regards to how PGP encryption is done.

You need to spend more time reading and less time coding.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right, I have to read more to get the concept. Currently I am more inclined to deliver the code.

Do you recommend any book or just reading the documentation is sufficient?

BTW the other user just confused me. Do you agree with my understanding, the one posted in starting of thread?
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amandeep Singh wrote:you are right, I have to read more to get the concept. Currently I am more inclined to deliver the code.


Make sure that your public liability insurance is fully paid up.


Do you recommend any book or just reading the documentation is sufficient?


The documentation most definitely not sufficient. A forum is most definitely not the place to start your education. If you are serious about using cryptography in Java then a good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox BUT BUT BUT it does not cover PGP. For PGP start with http://en.wikipedia.org/wiki/Pretty_Good_Privacy and follow your nose from there.


BTW the other user just confused me. Do you agree with my understanding, the one posted in starting of thread?


The other poster looks in essence to be right but his use of 'cipher' in his first sentence is misapplied and confusing. I think he meant to start with "Symmetric Cipher algorithms" but I can't read his mind.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic