Re: Compression used in an encrypted message

2011-03-11 Thread Avi
Thank you for the explanations, everone.

--Avi

On 3/11/11, David Shaw  wrote:
> On Mar 11, 2011, at 2:01 PM, Avi wrote:
>
>> Thanks, everyone.
>>
>> So we can see the algorithm, but can not be able to see the compression
>> level used, correct?
>
> Not directly, no.  OpenPGP just encapsulates the compressed stream, so you'd
> have to extract the compressed data and examine it.  I'm not sure if a
> single-number answer is available even then.  Basically, if you can get the
> level from a regular compressed .gz or .bz2 file, then you can get it here,
> but either way, GPG does not have visibility into that.
>
> David
>
>

-- 
Sent from my mobile device


User:Avraham

pub 3072D/F80E29F9 1/30/2009 Avi (Wikimedia-related key) 
   Primary key fingerprint: 167C 063F 7981 A1F6 71EC  ABAA 0D62 B019 F80E 29F9

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Compression used in an encrypted message

2011-03-11 Thread David Shaw
On Mar 11, 2011, at 2:01 PM, Avi wrote:

> Thanks, everyone.
> 
> So we can see the algorithm, but can not be able to see the compression level 
> used, correct?

Not directly, no.  OpenPGP just encapsulates the compressed stream, so you'd 
have to extract the compressed data and examine it.  I'm not sure if a 
single-number answer is available even then.  Basically, if you can get the 
level from a regular compressed .gz or .bz2 file, then you can get it here, but 
either way, GPG does not have visibility into that.

David


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Compression used in an encrypted message

2011-03-11 Thread Avi
Thanks, everyone.

So we can see the algorithm, but can not be able to see the compression
level used, correct?

Thanks,

--Avi


User:Avraham

pub 3072D/F80E29F9 1/30/2009 Avi (Wikimedia-related key) 
   Primary key fingerprint: 167C 063F 7981 A1F6 71EC  ABAA 0D62 B019 F80E
29F9


On Fri, Mar 11, 2011 at 1:35 PM, David Shaw  wrote:

> On Mar 11, 2011, at 12:50 PM, Avi wrote:
>
> > Forgive my ignorance, but is there a way to take a given
> > encrypted message/file and determine which compression algorithm
> > was used (and which level)? I know how to set compression
> > algorithm and level prefs, but I'm curious to see what others
> > use, if possible.
>
> You can't tell which compression is used in any arbitrary message since you
> need to be able to decrypt it first.  If the message is to you, however, you
> can run 'gpg --list-packets' on it.
>
> When running list-packets, you should see a line like this:
>
>   :compressed packet: algo=2
>
> Algo 1 == ZIP
> Algo 2 == ZLIB
> Algo 3 == BZIP2
>
> If there is no "compressed packet" line at all, then the message is
> uncompressed.
>
> David
>
>
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Compression used in an encrypted message

2011-03-11 Thread David Shaw
On Mar 11, 2011, at 12:50 PM, Avi wrote:

> Forgive my ignorance, but is there a way to take a given
> encrypted message/file and determine which compression algorithm
> was used (and which level)? I know how to set compression
> algorithm and level prefs, but I'm curious to see what others
> use, if possible.

You can't tell which compression is used in any arbitrary message since you 
need to be able to decrypt it first.  If the message is to you, however, you 
can run 'gpg --list-packets' on it.

When running list-packets, you should see a line like this:

   :compressed packet: algo=2

Algo 1 == ZIP
Algo 2 == ZLIB
Algo 3 == BZIP2

If there is no "compressed packet" line at all, then the message is 
uncompressed.

David


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Compression used in an encrypted message

2011-03-11 Thread Peter Pentchev
On Fri, Mar 11, 2011 at 12:50:26PM -0500, Avi wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Forgive my ignorance, but is there a way to take a given
> encrypted message/file and determine which compression algorithm
> was used (and which level)? I know how to set compression
> algorithm and level prefs, but I'm curious to see what others
> use, if possible.

If the file has been encrypted to you (or, more specifically, to
one of the secret keys currently accessible to you), then, yes, you
most probably can - "gpg --list-packets filename" should tell you
what compression algorithm has been used, then it's just a matter of
looking it up in RFC 4880 :)

If the message has been encrypted to someone else's key, then you
most probably won't be able to examine it - at least GnuPG does
the compression before the encryption, so that the information about
the compression algorithm used is contained within the encrypted data.
You may still give it a shot with --list-packets, but don't expect
too much :)

Hope that helps.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org pe...@packetscale.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
This sentence contains exactly threee erors.


signature.asc
Description: Digital signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Compression used in an encrypted message

2011-03-11 Thread Avi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Forgive my ignorance, but is there a way to take a given
encrypted message/file and determine which compression algorithm
was used (and which level)? I know how to set compression
algorithm and level prefs, but I'm curious to see what others
use, if possible.

Thanks,

Avi
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32) - GPGshell v3.77
Comment: Most recent key: Click show in box @ http://is.gd/4xJrs

iJgEAREKAEAFAk16YNE5GGh0dHA6Ly9wZ3AubmljLmFkLmpwL3Brcy9sb29rdXA/
b3A9Z2V0JnNlYXJjaD0weEY4MEUyOUY5AAoJEA1isBn4Din5uvUA/2qqX7JAcw1C
36V3m9rSWMTt96xQeK6l+/abhwgb7Z6kAQCK0kPjBRiFromrcBueppwKKcvA6Rmw
gO/pjOJhkKxMWQ==
=kVV4
-END PGP SIGNATURE-


User:Avraham

pub 3072D/F80E29F9 1/30/2009 Avi (Wikimedia-related key) 
   Primary key fingerprint: 167C 063F 7981 A1F6 71EC  ABAA 0D62 B019 F80E
29F9
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users