Subject: [Cbor] FW: Equivalence of integers and floating point numbers

From: Jim Schaad <[email-masked]>
Date: Sun, 4 Mar 2018 18:32:50 -0800

I guess I should have finished reading the section before sending the mail.

The type of the keys should be required to be equivalent in order for the
keys to be equivalent as a general rule.  This is because that is what the
data model has stated.   I believe that key equivalence should be stated in
terms of data model having the same value.  Otherwise you end up with a
situation where the data model means one thing for values and a different
thing for keys.  This seems to me to be a bad idea.

I have no real issue with the question of things like equivalence of
definite length items vs non-definite length items, but depending on what
you use as the key value, i.e. use a canonical encoding as the key, then
these types of things fall out.  

I have no real issue with the idea of ignoring tags.  This seems to me to be
something that is bad practice and should be avoided anyway.

Ignoring tags would seem to potentially be an issue, if you do not do data
model comparisons.  Based on the current text I would have 1 and
BigNumber(1) being the same key as they have the same value once the tag is
removed.  

Jim

-----Original Message-----
From: Jim Schaad [mailto:[email-masked]] 
Sent: Sunday, March 4, 2018 6:23 PM
To: [email-masked]' <[email-masked]>
Cc: [email-masked]' <[email-masked]>
Subject: Equivalence of integers and floating point numbers

I applaud the fact that the data model states that floating point numbers
and integer numbers are not equivalent.    I believe that this is the
correct statement for a number of reasons.

I do not understand why when comparing keys the same statement of
equivalence is not being used.  It says that 

	An integer value encoded as a floating point data item is
equivalent to the same value encoded as an integer

I believe that this statement needs to be reversed so that they are not
equivalent.

Jim

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 5 Mar 2018 08:31:11 +0400

"Ignoring tags" means different things to different people. The way this phrase has mostly been used, it would mean interpreting a bignum 1 as a byte string. Fully interpreting bignum value in a decoder is to be encouraged.  There probably needs to be done security considerations about toctou. 

Sent from mobile

> On 5. Mar 2018, at 06:32, Jim Schaad <[email-masked]> wrote:
>

---

From: Jim Schaad <[email-masked]>
Date: Sun, 4 Mar 2018 20:49:01 -0800

If “ignoring tags” means different things to different people, then it needs to be clarified so that everybody has the same interpretation where ever it occurs in this document

Jim

From: Carsten Bormann [mailto:[email-masked]] 
Sent: Sunday, March 4, 2018 8:31 PM
To: Jim Schaad <[email-masked]>
Cc: [email-masked]; [email-masked]
Subject: Re: Equivalence of integers and floating point numbers

Sent from mobile

On 5. Mar 2018, at 06:32, Jim Schaad <[email-masked] <mailto:[email-masked]> > wrote:

Jim

-----Original Message-----
From: Jim Schaad [mailto:[email-masked]] 
Sent: Sunday, March 4, 2018 6:23 PM
To: [email-masked] <mailto:[email-masked]> ' <[email-masked] <mailto:[email-masked]> >
Cc: [email-masked] <mailto:[email-masked]> ' <[email-masked] <mailto:[email-masked]> >
Subject: Equivalence of integers and floating point numbers

Jim