This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23655 - Clarification: is BigInteger [] considered zero?
Summary: Clarification: is BigInteger [] considered zero?
Status: RESOLVED FIXED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Mark Watson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-28 19:41 UTC by Eric Roman
Modified: 2014-02-28 00:47 UTC (History)
2 users (show)

See Also:


Attachments

Description Eric Roman 2013-10-28 19:41:25 UTC
BigInteger is a big-endian representation of an unsigned integer.

Numbers can be zero padded and the value remains unchanged:
[0x2], [0x0, 0x2], [0x0, 0x0, 0x2] all represent the same value.

Question: Is the empty input considered invalid, or just another representation of zero?

[0x0, 0x0, 0x0] --> 0
[0x0, 0x0] --> 0
[0x0] --> 0
[] --> ???
Comment 1 Mark Watson 2014-02-26 21:58:03 UTC
I vote for a representation of zero.
Comment 2 Mark Watson 2014-02-28 00:47:08 UTC
Changeset 087c6dafae2b to clarify that the empty array is zero.