W3C home > Mailing lists > Public > public-webpayments@w3.org > April 2014

Re: Range of Security : Nonce

From: Herbert Snorrason <odin@anarchism.is>
Date: Tue, 15 Apr 2014 01:33:59 +0000
Message-ID: <534C8C87.4000106@anarchism.is>
To: public-webpayments@w3.org
On 14/04/14 11:49, Melvin Carvalho wrote:
> The use case I'm interested is to mark up a nonce in the bitcoin block
> chain header.  In the case of bitcion it's a 4 byte integer starting at 0.
> ( ie xsd:unsignedInt )

These types don't specify encoding. xsd:unsignedInt doesn't mean it's
laid out as four bytes, just that it's possible to do so. Any
xsd:unsignedByte is also an xsd:unsignedShort is also an
xsd:unsignedInt. This means that translating from integers to nonces
requires you to be absolutely certain that endianness issues and
possible changes of declared type through reasoning of some sort haven't
mucked up your integer.

Or you could store the four byte sequence as an xsd:hexBinary or
xsd:base64Binary and making sure that RDF stuff preserves both the
encoding and length.

Or is there a downside to those types that I'm just completely blind to?

With greetings,
  Herbert Snorrason

Received on Tuesday, 15 April 2014 01:34:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:36 UTC