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

Re: [idn] ACE16x (An enhanced version of DUDE)



Edmon <edmon@neteka.com> wrote:

>    - ACE16x does NOT need character mapping.  Instead it uses a       
>    shifting mechanism that is calculable:                             
>
>           16x = Original hex + 0x67 (or +0x47 for uppercase)

That is a little simpler, yes, but base32 is not very complex.  Here's
the C code:

const char base32[] = {
  97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,     /* a-k */
  109, 110,                                               /* m-n */
  112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,  /* p-z */
  50, 51, 52, 53, 54, 55, 56, 57                          /* 2-9 */
};

unsigned int base32_decode(char c)
{
  if (c < 50) return base32_invalid;
  if (c <= 57) return c - 26;
  if (c < 97) c += 32;
  if (c < 97 || c == 108 || c == 111 || c > 122) return base32_invalid;
  return c - 97 - (c > 108) - (c > 111);
}

I proposed this map because I thought the slight increase in complexity
was well worth reducing user frustration caused by transcription errors
between 0/O and 1/l.

>    - ACE16x does not employ a 5bit mechanism, therefore increases     
>    efficiency                                                         

I don't buy this at all.  The only difference between 16x and base32 is
that 16x omits wxyz while base32 omits 01lo, otherwise they are exactly
the same.  Whatever method you use for 16x encoding/decoding, you can do
the same thing with base32 just by changing the mapping.  You might want
to take a look at the example C code for DUDE; it doesn't store quintets
anywhere.

>    - The initial value is set to 0x30 so that all domains beginning   
>    with a digit will be shorter when encoded                          

That's a judgement call.  0x30 and 0x60 are both reasonable.  I chose
0x60 because it was my hunch that it would be useful more often.

>    - ACE16x simply hex dumps most quartets improving process time     
>    both in encoding and decoding.                                     

Doing mapping using a small table is pretty quick, and besides, the
process time of ACE is small compared to nameprep.

AMC