NODE e7ea0a85Signing ascii text
karn@qualcomm.com (Phil Karn)Tue, 22 Dec 92 20:07:09 PST
I see some potential problems here as people start signing ASCII text
(e.g., email messages, etc). Is there a convention for the end of line
sequence that is to be used for the copy of the file that is run through
the hash function? If there isn't, then the file hash will depend on the
local end-of-line convention, which is bad.
I'm facing this problem right now in an experimental "XMD5" command that
I've added to my FTP server. The idea is to let you compute a hash on
a remote file so you can compare it with a local file without actually
having to send it. It works great in binary mode, but ascii mode is
problematic.
Phil
NODE 1cc717baRe: Signing ascii text
yanek@novavax.nova.edu (Yanek Martinson)Tue, 22 Dec 92 20:32:03 PST
> (e.g., email messages, etc). Is there a convention for the end of line
> sequence that is to be used for the copy of the file that is run through
> the hash function? If there isn't, then the file hash will depend on the
Canonical Text has a CR and LF at the end of each line. This is
documented in some RFC. All (most?) protocols used on internet such
as smtp, finger, etc, use this format. The possible justification
is that an extra linefeed or a carriage return is not as bad as a missing
one.
For e-mail you may have other problems, if the messages go through
gateways that like to munge messages. For example your tabs could
be expanded into spaces, or the other way around. Some character
set conversions may be done.
Blank lines may be removed or added.
--
Yanek Martinson mthvax.cs.miami.edu!safe0!yanek uunet!medexam!yanek
this address preferred -->> yanek@novavax.nova.edu <<-- this address preferred
Phone (305) 765-6300 daytime FAX: (305) 765-6708 1321 N 65 Way/Hollywood
(305) 963-1931 evenings (305) 981-9812 Florida, 33024-5819