E-mail encryption

Julian Field MailScanner at ecs.soton.ac.uk
Sat Oct 22 19:05:15 IST 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

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

Kevin Spicer wrote:

>On Sat, 2005-10-22 at 16:27 +0200, Glenn Steen wrote:
>  
>
>>>>>>But my .cer file looks like this:
>>>>>>-----BEGIN CERTIFICATE-----
>>>>>>MIIFMDCCBBigAwIBAgIEP7wCADANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJESzE
>>>>>>MMAoGA1UE^M
>>>>>>ChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzEyMjcxNjAxMTVaFw0wNTE
>>>>>>yMjcxNjMx^M
>>>>>>MTVaMHMxCzAJBgNVBAYTAkRLMSkwJwYDVQQKEyBJbmdlbiBvcmdhbmlzYXRvcmlzayB
>>>>>>0aWxrbnl0^M
>>>>>>            
>>>>>>
>>>Yes, theres dos line endings there (^M) that shouldn't be.  run the file
>>>through dos2unix, or if you've not got that on your system...
>>>
>>>perl -e 'while (<STDIN>)  { s/\r\n/\n/; print }' < old.cer > new.cer
>>>
>>>      
>>>
>>Only real risk with that on "raw binary data" is of course that you'll
>>sometimes perhaps truncate some CR/LF combinations that shouldn't be
>>truncated. Sigh. If the keys are mangled in some way by MS, it'd be
>>best if Jules took a look at it... Less margin for error (especially
>>compared to me looking, or worse... frobbbing:-)
>>    
>>
>
>but the .cer file (as posted) isn't a binary file, its a text file
>containing a base64 encoded version of the certificate.  And anyway
>you'd of course try it with a copy of the original file anyway.
>  
>
The code just prints a copy of the message part. If it is listed as 
being Base64 encoded, then it will be decoded into binary. Here is an 
example. The >> on the front is to stop your mail client trying to do 
anything clever with it.

The df file containing the body of the message:

 >> This message is in MIME format and has been PGP signed.
 >>
 >> --=_77bb10c7066681b3b5d8b6
 >> Content-Type: text/plain; charset="ISO-8859-1"
 >> Content-Disposition: inline
 >> Content-Transfer-Encoding: quoted-printable
 >>
 >> This test message has been signed with gpg.
 >>
 >> ------------------------------------------------
 >> This email was sent using IMP v4.0-cvs, part of
 >> the Horde suite of information management tools.
 >> http://horde.org/
 >>
 >>
 >> --=_77bb10c7066681b3b5d8b6
 >> Content-Type: application/pgp-signature
 >> Content-Description: PGP Digital Signature
 >> Content-Disposition: inline
 >> Content-Transfer-Encoding: 7bit
 >>
 >> -----BEGIN PGP SIGNATURE-----
 >> Version: GnuPG v1.0.6 (GNU/Linux)
 >> Comment: For info see http://www.gnupg.org
 >>
 >> iQEeBAAUAwAGBQI+c2+CAAoJEAGeOAZvxfKnu8oD/jeYukpT+KNIRjp6BwwSx5AY
 >> BNHgP2PhAMjOgmA+02xFr8VDmckJtkxudQ8d7WunX2cJ4efqusX7IUtrZ455G15V
 >> X9ax3yW6wKtpXSh2OMIp5MA3lbq1EfPRLBPmKEA7W1d8Li7pOmYzX8ibMDiom6aw
 >> LSFGsCDLvfVw47gQtnbOA/95TQdeFL7MfIMmrGnaPyR+8ffbWv3fa+56KWiqYHit
 >> ZtDClTVQfjub/PX6RaDrsUAjDDss/yQUc/LfLqffReKnVfGrfHUTorYdgXWETS+y
 >> stOeXI5m/xH4V6TO70QVM2WRSk+WhMTIyqu6QkSJ6qmzRSPT0S5a2KwAg5X3KzZd
 >> CA==
 >> =Ti9t
 >> -----END PGP SIGNATURE-----
 >>
 >> --=_77bb10c7066681b3b5d8b6--

And here is what it put in the output file:

 >>-----BEGIN PGP SIGNATURE-----
 >>Version: GnuPG v1.0.6 (GNU/Linux)
 >>Comment: For info see http://www.gnupg.org
 >>
 >>iQEeBAAUAwAGBQI+c2+CAAoJEAGeOAZvxfKnu8oD/jeYukpT+KNIRjp6BwwSx5AY
 >>BNHgP2PhAMjOgmA+02xFr8VDmckJtkxudQ8d7WunX2cJ4efqusX7IUtrZ455G15V
 >>X9ax3yW6wKtpXSh2OMIp5MA3lbq1EfPRLBPmKEA7W1d8Li7pOmYzX8ibMDiom6aw
 >>LSFGsCDLvfVw47gQtnbOA/95TQdeFL7MfIMmrGnaPyR+8ffbWv3fa+56KWiqYHit
 >>ZtDClTVQfjub/PX6RaDrsUAjDDss/yQUc/LfLqffReKnVfGrfHUTorYdgXWETS+y
 >>stOeXI5m/xH4V6TO70QVM2WRSk+WhMTIyqu6QkSJ6qmzRSPT0S5a2KwAg5X3KzZd
 >>CA==
 >>=Ti9t
 >> -----END PGP SIGNATURE-----

The rest of it is up to you. The original guy I wrote it for was quite 
happy with this. I would be interested to hear what information you can 
actually extract from this, and how.

- -- 
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Professional Support Services at www.MailScanner.biz
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.2 (Build 2424)

iQA/AwUBQ1p/XBH2WUcUFbZUEQJtKwCgyon8zmBCsWYRvxwyJG52XnZdGG4AoNtD
qODi7YOHeWwtHgcBe8af4Tc9
=X3ga
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list