[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[idn] LACE Algorithm Comments



A few comments on the compression algorithm described in
draft-ietf-idn-lace-00.txt:

Comment 1: I'd like to suggest a minor change to step 1 of section 2.4.1.
The existing text reads as follows:

"1) If the length of the input is not even, or is less than 2, stop with an
error."

to this (with new words in upper case):

"1) If the length of the input IN OCTETS is not even, or is less than 2,
stop with an error."

This should avoid any confusion with someone interpreting "length of the
input" to mean "length of the input in code points".

Comment 2: I believe the formula for calculating the next location of the IP
input pointer described in compression step 5 is incorrect.  Instead of "IP
= IP+(2*(COUNT+1))", I believe it should be "IP = IP+(2*COUNT)".  Here's
why:

Assume an input name string with three code points with the first two code
points from the same row of the Unicode table, and the third code point from
a different row.  Example: U+0AC0 U+0AC1 U+1AC0.

Now following the steps in section 2.4.1 starting with step 2: IP points to
the first octet with value "0A"

Step 3: HIGH is set to 0x0A

Step 4: COUNT is set to 2.

Step 5: Output buffer gets "0x02 0x0A 0xC0 0xC1".  Using the current formula
the IP offset is 6 (2*(COUNT+1), or 2*3), when it should be 4 (2*COUNT, or
2*2) to point to the first octet of the third code point.  Incrementing the
pointer by 6 octets pushes it past the third code point, which causes it to
be ignored.

Scott Hollenbeck
VeriSign Global Registry Services