Subject: Re: iSCSI base64 and 12-92

From: "Julian Satran" <[email-masked]>
Date: Fri, 24 May 2002 06:59:44 +0300

I've lokked again at one of the most popular bignum packages - the one 
from MIT - and it seems to me that 
we are talking about two different things.

conversion from b64 to a binary number - and checking that it fits in the 
integer length you prealllocated
using a large integer

1 is a trivial operation in b64 and is unrelated to the package you are 
using (if you are using one) and you will want to do it with the same code 
for large or small integer. At the end of this phase you should know if 
the number the size required by the protocol or not and you will have to 
do this test in any case 
And the conversion is not part of any packege i.e. if you decide not to 
use bignum arithmetic - and you are not mandated to implement it - 
the the conversion is just placing 6 bit values in predefined positions in 
an integer.

2 Use of the large integer is an implementer choice - and if does not use 
bignum it does not have to fit in.

In any case if we mandate b64 as being valid only for big numbers we have 
to check this and this is wasteful 

In summary - conversion must be done (for large numbers - as you don't 
know ahead of time how large the number used is going to be) and it is 
practically the same for small numbers. Then why check?

And the bignum-packge itself you don't have to include it if don't 
implement large-number cryptography.

Julo

Paul Koning <[email-masked]>
05/23/2002 11:05 PM
Please respond to Paul Koning

        To:     Julian Satran/Haifa/IBM@IBMIL
        cc:     [email-masked], [email-masked]
        Subject:        Re: iSCSI base64 and  12-92

Excerpt of message (sent 23 May 2002) by Julian Satran:
> If base 64 is neede for large integers there is no good reason to test 
> that it is not used for short integers.

Not true.  They are fundamentally different datatypes.  "short"
integers are int, or long, or something like that.  Large integers are
a software-defined datatype, typically an octetstring perhaps with
additional control variables.  See any bignum package for the
details. 

The conversion routines used for these two are completely different
and quite unrelated.

    paul

---

From: Paul Koning <[email-masked]>
Date: Fri, 24 May 2002 13:26:54 -0400

Let me rephrase what I'm looking for, because the picture seems to be
getting muddled.

I would like to see Base64 permitted ONLY for those parameters that
are long octetstrings.  Basically, that's only the crypto parameters.

For all other integer parameters -- which are 64 bit or smaller
integers -- permit only hex and decimal.

The reason is that these are different datatypes internally, so you
will be using different conversion routines.  Conversion from Base64
to int is an "unnatural act" and I would prefer not to have to
add that code.

    paul

---

From: Bill Studenmund <[email-masked]>
Date: Fri, 24 May 2002 10:43:01 -0700 (PDT)

On Fri, 24 May 2002, Paul Koning wrote:

Wow. I feel like I'm on one of those talkshows or AOL.

<AOL>Me too!!!!!</AOL>

> are long octetstrings.  Basically, that's only the crypto parameters.

I *strongly* agree. Especially since if we have a crypto method that wants
to excahnge long numbers, we can define the exchange to be of formated
binary strings; we move the hard stuff to the crypto system that wants it.

> integers -- permit only hex and decimal.

I'd make that decimal & hex for small numbers (64 bit or less), and hex
for larger ones (not sure if we have any).

> to int is an "unnatural act" and I would prefer not to have to

Agreed!

Take care,

Bill