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 24430 - Make BigInteger signed or rename it
Summary: Make BigInteger signed or rename it
Status: RESOLVED WONTFIX
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ryan Sleevi
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 18:43 UTC by Franz Antesberger
Modified: 2014-01-28 20:24 UTC (History)
1 user (show)

See Also:


Attachments

Description Franz Antesberger 2014-01-28 18:43:38 UTC
All the Typed Arrays use a "U", when dealing with unsigned integers.
So please make "BigInteger" signed or rename it to "BigUInteger",
some day we might need signed BigIntegers
Comment 1 Ryan Sleevi 2014-01-28 19:07:42 UTC
BigInteger is not a Typed Array of Big Integers. It is a single Big Integer.

The Typed Arrays spec you referenced is for dealing with _arrays_ of integers of a particular type. That is, UInt8_Array_
Comment 2 Mark Watson 2014-01-28 19:20:49 UTC
Ryan - I'm reopening this, not because I think we should make any change, but just because your answer doesn't address the question Franz is asking.

The point is that it is common, where TypedArray specifies the type of the array elements and elsewhere to put a 'U' in front of Integer to indicate unsigned.

But the main question is whether our type should in fact be a Signed Integer, since we might need those in future. If we keep with unsigned, then the question is whether to rename it ?

If we keep with unsigned and the existing name, then we *will* have a problem when we later want to introduce a signed big integer - what will we call it BigSInteger ?

I wouldn't be opposed to renaming to UnsignedBigInteger, since I am never afraid of spending letters...
Comment 3 Ryan Sleevi 2014-01-28 20:19:30 UTC
Closing this again, as no action is needed.

BigInteger is a typedef, not an interface type. As such, it is purely syntactic sugar.

A future version of the WebCrypto API could introduce further distinction by introducing a typedef for "BigInt" and "BigUInt", and it would be 100% backwards compatible as long as the API was updated to rename all occurrences of "BigInteger" with "BigUInt"

See http://heycam.github.io/webidl/#idl-typedefs

As such, the potential future concern of an additional type does not need to be addressed until we have such a need, and can be done so in a way that is fully API compatible.
Comment 4 Mark Watson 2014-01-28 20:24:56 UTC
Ok, that works for me.