Christopher Black cblack at securecrossing.com
Wed Jun 15 14:08:10 GMT 2005

On Tue, 2005-06-14 at 16:52 -0500, Brian Henning wrote:
> Greetings:
> When I run gnupg using the same rsa key on the same input file I
> noticed that it returns different cipher text files as resuts. Both
> the cipher files decrypt to the same plain text file just fine. Can
> someone explain to my why that is the cipher text is different?
> Thanks,
> Brian

The way GnuPG works in public key mode (ie: RSA) is by encrypting the
data with a random symmetric session key, then encrypting that session
key with the public key you choose.

The reason for this is that symmetric encryption is much easier to do,
and far more secure than asymmetric (public-key) encryption for any
given key-size.  Also, if you're encrypting a file to 10 different
people, this way you can just encrypt the symmetric keys with 10
separate public keys, and attach them to the actual encrypted file,
instead of having 10 seperate encrypted files.  When the file could be
hundreds of megabytes, this is a huge resource saver.

Christopher Black
Chief Security Engineer
Secure Crossing
22750 Woodward Suite 304 - Ferndale, MI 48220
Tel (800) 761-4299 | Direct (248) 658-6120
cblack at securecrossing.com | www.securecrossing.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050615/e6ed219e/attachment.bin

More information about the freebsd-questions mailing list