Hi!

I stumbled across another inconvenience in the Jingle File Transfer XEP:

The session-initiate MIGHT contain a hash-element which contains the
checksum of the file. Alternatively the hash-element can also be sent at
a later point to prevent the sender from having to read the file
multiple times (one time to calculate the hash and a second time to
actually send the file).

Unfortunately this means, that in case of a session-initiate WITHOUT
hash-element, the receiver is forced to read the data twice. Once to
receive it and a second time to calculate the hash, once the postponed
hash-element arrived. This is due to hash-agility of XEP-0300. When
receiving the file, the recipient sometimes doesn't not know, which hash
algorithm the sender uses to calculate the checksum.

So to comply with the XEP, the receiver currently has two options. He
might either calculate the hash with every supported hash function at
once (which might be one or two, but can also be ~15, note that XEP-0300
recommends 9 different functions), or just process the data twice.

I propose the following change: The session-initiate MUST contain a
reference to the hash algorithm used to calculate the checksum. The
actual hash-value can still be send afterwards, but now the receiver can
calculate the hash on the fly.

What do you think?

Greetings vv


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to