how to detect whether a file is a real pgp file or not? - PGP

This is a discussion on how to detect whether a file is a real pgp file or not? - PGP ; hi, can i detect with a hexeditor or such a thing, wheter a file is a real pgp file and not only a file with the suffix ".pgp". for example: somebody can take a ".txt" file and change the suffix ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: how to detect whether a file is a real pgp file or not?

  1. how to detect whether a file is a real pgp file or not?

    hi,

    can i detect with a hexeditor or such a thing,
    wheter a file is a real pgp file and not only a file with the suffix ".pgp".

    for example: somebody can take a ".txt" file and change the suffix to
    ".pgp".

    exist a method/program to detect such manipulation???

    thx.



  2. Re: how to detect whether a file is a real pgp file or not?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    bigm1980 wrote:

    > hi,
    >
    > can i detect with a hexeditor or such a thing,
    > wheter a file is a real pgp file and not only a file with the suffix
    > ".pgp".
    >
    > for example: somebody can take a ".txt" file and change the suffix to
    > ".pgp".
    >
    > exist a method/program to detect such manipulation???


    IIRC if it's a real pgp file it will start with a -----BEGIN PGP *------
    line, where * could be message, signature, multipart message part x of y,
    and probably a few others.


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)

    iD8DBQFAgB7kseVxKm0DPWERAmKeAKDMCaUaAYSlJ4EnkAfNMF 9wnDM+pACg87IO
    /3HuEXK1EqrqhAUp5gi6dHg=
    =YP/3
    -----END PGP SIGNATURE-----

  3. Re: how to detect whether a file is a real pgp file or not?

    bigm1980 wrote:

    > hi,
    >
    > can i detect with a hexeditor or such a thing,
    > wheter a file is a real pgp file and not only a file with the suffix ".pgp".
    >
    > for example: somebody can take a ".txt" file and change the suffix to
    > ".pgp".
    >
    > exist a method/program to detect such manipulation???
    >
    > thx.
    >
    >

    Look at the first few bytes of the file to see if bytes 3-5 are "PGP".
    If you want more, then get the record format info from www.pgp.com via
    the SDK, or any of the sites that offer detailed record layout information

    --

    Martin

    Email address is ROT13 encoded to slow down spammers

  4. Re: how to detect whether a file is a real pgp file or not?

    On Fri, 16 Apr 2004 15:10:44 +0200, "bigm1980" wrote:

    > hi,
    >
    > can i detect with a hexeditor or such a thing,
    > wheter a file is a real pgp file and not only a file with the suffix ".pgp".
    >
    > for example: somebody can take a ".txt" file and change the suffix to
    > ".pgp".
    >
    > exist a method/program to detect such manipulation???


    Sure: PGP resp. GnuPG validate them, of course.


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail:

  5. Re: how to detect whether a file is a real pgp file or not?

    On Fri, 16 Apr 2004 17:58:57 +0000, MikeyD
    wrote:

    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > bigm1980 wrote:
    >
    > > hi,
    > >
    > > can i detect with a hexeditor or such a thing,
    > > wheter a file is a real pgp file and not only a file with the suffix
    > > ".pgp".
    > >
    > > for example: somebody can take a ".txt" file and change the suffix to
    > > ".pgp".
    > >
    > > exist a method/program to detect such manipulation???

    >
    > IIRC if it's a real pgp file it will start with a -----BEGIN PGP *------
    > line, where * could be message, signature, multipart message part x of y,
    > and probably a few others.


    Only if tha data are armored.


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail:

  6. Re: how to detect whether a file is a real pgp file or not?

    On Fri, 16 Apr 2004 15:08:10 -0600, Martin Ireland
    wrote:

    > bigm1980 wrote:
    >
    > > hi,
    > >
    > > can i detect with a hexeditor or such a thing,
    > > wheter a file is a real pgp file and not only a file with the suffix ".pgp".
    > >
    > > for example: somebody can take a ".txt" file and change the suffix to
    > > ".pgp".
    > >
    > > exist a method/program to detect such manipulation???
    > >
    > > thx.
    > >
    > >

    > Look at the first few bytes of the file to see if bytes 3-5 are "PGP".
    > If you want more, then get the record format info from www.pgp.com via
    > the SDK, or any of the sites that offer detailed record layout information


    It depends on what method (public key vs. conventional) and which
    algorithms are used.


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail:

  7. Re: how to detect whether a file is a real pgp file or not?

    bigm1980 wrote:
    >
    > hi,
    >
    > can i detect with a hexeditor or such a thing,
    > wheter a file is a real pgp file and not only a file with the suffix ".pgp".
    >
    > for example: somebody can take a ".txt" file and change the suffix to
    > ".pgp".
    >
    > exist a method/program to detect such manipulation???
    >
    > thx.


    If the file is ASCII and not binary, go to
    . Open the file in a text viewer (e.g.,
    Wordpad or Notepad on Windows). Copy the contents and paste into
    the input window on the Web page. Select the Show Packets button
    on the Web page. If it's really a PGP file, the tool will parse
    it.

    --

    David E. Ross


    I use Mozilla as my Web browser because I want a browser that
    complies with Web standards. See .

  8. Re: how to detect whether a file is a real pgp file or not?

    In article ,
    Martin Ireland wrote:
    >bigm1980 wrote:
    >
    >> hi,
    >>
    >> can i detect with a hexeditor or such a thing,
    >> wheter a file is a real pgp file and not only a file with the suffix ".pgp".
    >>
    >> for example: somebody can take a ".txt" file and change the suffix to
    >> ".pgp".
    >>
    >> exist a method/program to detect such manipulation???
    >>
    >> thx.
    >>
    >>

    >Look at the first few bytes of the file to see if bytes 3-5 are "PGP".
    >If you want more, then get the record format info from www.pgp.com via
    >the SDK, or any of the sites that offer detailed record layout information


    What would be really useful would be some magic lines (for /etc/magic,
    used by file(1)) that could do this. One could write them from the
    aforementioned docs, but I haven't seen any samples out in the wild.

    --
    Gregory Pratt usenet@gp.users.panix.com
    East Rutherford, NJ, USA (E-mail forwarded to /dev/null)
    "The only good spammer is a dead spammer."
    PGP Key Fingerprint: DC60 FCDE 91E2 3D41 91A3 45DB B474 3D3A 3621 AAFE

+ Reply to Thread