losing meaningful whitespaces in an encrypted file

vedaal at hush.com vedaal at hush.com
Mon Sep 17 15:57:46 CEST 2007

Paladino, Vanda K  ( vbushfield at purdue.edu )
wrote on Tue Sep 11 13:20:12 CEST 2007 

>As clarification on the original issue, we weren't sending it as 
>we were sending it as a binary file

>However, we did finally at least partially identify our problem

>Version 1.2.6 for Linux strips our end of line white spaces.
>Version 1.2 for Unix does not

while this may be a possible source of the problem,
it sounds unlikely

try this workaround:

armor the file
(add '-a' before the '-r' if you are encrypting,
or before the '-u' if you are just signing

armoring the file preserves the plaintext and all trailing 
(i don't know why this should be, but in my repeated testing with  
earlier versions of both gnupg and pgp, have found it to be so,
i don't like or use pgp9.x, so i can't vouch for that version, 
but usually,
pgp gets 'more accepting' with every version, not less,
so i would expect it to work there too)

if this workaround 'does work'
then try it again with the linux and unix versions you used

a simple test would be to use a textfile of one line:
12345 followed by 5 blank spaces

check the size of the original textfile, and then
the size of 'saved form' of the armored signed text once it is 
and saved as plaintext

if the sizes are the same, the blank spaces have been kept
(this can then be confirmed by copying test line and pasting it 
into a new textfile consisting of only one character, making sure 
to paste it 'in front' of the character,
the resulting line will have the same number of blank spaces in 
front of the single character, as in the original file)


Click for a credit repair consultation, raise your FICO score.

More information about the Gnupg-users mailing list