<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25387</bug_id>
          
          <creation_ts>2014-04-18 08:00:15 +0000</creation_ts>
          <short_desc>BigInteger</short_desc>
          <delta_ts>2014-05-12 08:38:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Web Cryptography</product>
          <component>Web Cryptography API Document</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>public-webcrypto</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>104071</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-04-18 08:00:15 +0000</bug_when>
    <thetext>Was https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#big-integer reviewed by TC39? Might be worth asking on es-discuss.

Also, since it&apos;s a view on an ArrayBuffer, why are you saying it&apos;s big-endian? That should not matter with views.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104077</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-04-18 15:43:21 +0000</bug_when>
    <thetext>Anne, I don&apos;t think this is defining a view.  What this is saying is that the Uint8Array holds the bytes that represent an integer, in big-endian order.

So for example, the representation of 5 million would be a Uint32Array of length three, containing the values 76, 227, 215, since 76*255^2 + 227*255 + 215 = 5000000.  Consumers would be expected to do that sort of computation themselves to reconstruct the integer.  That&apos;s why the endianness matters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104078</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-04-18 15:44:56 +0000</bug_when>
    <thetext>&gt; would be a Uint32Array

Uint8Array, of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105542</commentid>
    <comment_count>3</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-05-09 16:26:10 +0000</bug_when>
    <thetext>I was confused by this too. If you search for &quot;big&quot; in https://github.com/w3ctag/spec-reviews/issues/3 you&apos;ll find some back-and-forth where its purpose was clarified.

I think if it were renamed ByteSequence, or just left as Uint8Array, it would be clearer. But it doesn&apos;t really matter since it&apos;s just a typedef, so I defer to the spec editors as to what they think best balances confusion vs. clarity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105676</commentid>
    <comment_count>4</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-05-12 05:57:33 +0000</bug_when>
    <thetext>I&apos;m going to close this as WontFix, as the original issue was related to adding the type to TC-39, which we&apos;re not trying to do, merely describe a typographic convention and short-hand.

Boris&apos; explanation in Comment 1 is spot on. The proposed wording in Comment 3 (ByteSequence or Uint8Array) isn&apos;t ideal, since ByteSequence leaves ambiguity about the structure of the data, and Uint8Array is sometimes-structured-as-BigInt and sometimes-not.

If there are specific proposals on where there is confusion, I&apos;d be happy to revisit and incorporate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105687</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-05-12 08:33:12 +0000</bug_when>
    <thetext>The main problem I think is that you want a bigint, and are inventing one on top of a Uint8Array. Ideally there would at least be some coordination with TC39 so that they know this is going on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105689</commentid>
    <comment_count>6</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-05-12 08:38:04 +0000</bug_when>
    <thetext>(In reply to Anne from comment #5)
&gt; The main problem I think is that you want a bigint, and are inventing one on
&gt; top of a Uint8Array. Ideally there would at least be some coordination with
&gt; TC39 so that they know this is going on.

This isn&apos;t really accurate, for the reasons explained on https://github.com/w3ctag/spec-reviews/issues/3#issuecomment-41630590

This WG has spent a lot of time debating BigInteger - whether it&apos;s a first class type or not. You can see in the archives a previous proposal by Microsoft during the eBay/PayPal F2F that demonstrated a number of problems with trying to describe BigInteger for cryptographic operations.

As explained during the W3C TAG review, the typedef here is to annotate a binary format (akin to the ASN.1 DER-encoding of SPKI/PKCS#8)

If you&apos;re performing cryptographic operations using these, then we&apos;ve failed as a WG.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>