|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: iSCSI base64 and 12-92On Thu, 23 May 2002, Julian Satran wrote: > If base 64 is neede for large integers there is no good reason to test > that it is not used for short integers. I respectfully disagree. base64 is awkward for numbers, as it is not a numerical encoding. At least if the length of the number (in octets) is variable. 1, 2, 4, and 8 octet numbers are fine. But 3, 5, 6, and 7 are just plain gross. We have to load them into a correspondingly larger data type (32 or 64-bit unsigned int as appropriate), and then mask off unsent bytes. Oh, and if we're on an LE box, we then have to byte-swap the thing. Julo, have you actually coded a base64 decoder for the small (less than 2^64) ints we use in the protocol and verified its correctness? I will admit I haven't but that's because as I worked on it, it got very gross. And for no discernalbe benefit. Yes, we can do it. But I'd rather put the effort verifying this would take into making some other part of the code work well. I think what would be much easier for us is to just say that base64 is only usable for binary strings. Period. If there is a authentication protocol that needs to exchange large numbers that does not also specify the wire-format for said numbers, I suggest that for iSCSI we specify that the authentication protocol must provide the iSCSI negotiation code with a binary string representing/containing the number. The iSCSI negotiation code then passes said string to the authentication code on the other side. The code on the other side then interprets the string as a number. Yes, this is a semantics step. But it means that we can get rid of exchanging numbers so large that we would really like base64 - from iscsi's point of view they are binary strings. The iscsi infrastructure doesn't need to bother with trying to think of them as numbers. Take care, Bill
Home Last updated: Thu May 23 21:18:30 2002 10281 messages in chronological order |