<?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>26178</bug_id>
          
          <creation_ts>2014-06-23 14:44:07 +0000</creation_ts>
          <short_desc>ECMAScript standard library</short_desc>
          <delta_ts>2014-10-22 21:33:58 +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>allen</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>mathias</cc>
    
    <cc>public-webcrypto</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>108220</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-23 14:44:07 +0000</bug_when>
    <thetext>Crypto seems like something that would benefit node.js and company too. Can we still place it somewhere where it can be uplifted into ECMAScript proper?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108240</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-06-23 19:47:32 +0000</bug_when>
    <thetext>I don&apos;t feel confident that this WG is able to accommodate this request, in charter or scope.

Consider, for example, the notoriousness that has been the algorithm selection discussion. If you rule out the concerns of UAs - or if you rule, in scope, the concerns of server-side deployments such as node.js - you end up with a significantly different set of criteria and interoperability concerns, ones which no doubt will cause significant (continued) hurdles towards adoption. Considering the threatened formal objections over algorithm selection as case in point of this.

I&apos;m not sure what you mean by &quot;place it somewhere where it can be uplifted into ECMAScript proper&quot;. Are you referring to the SubtleCrypto interface being attached to window/worker global scope? If so, is the suggestion to make it &quot;Yet Another Global&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108261</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-06-24 08:31:03 +0000</bug_when>
    <thetext>It is already a global

&gt; &quot;SubtleCrypto&quot; in window
true

So instead of 

var enc = crypto.subtle.encrypt(...)

you&apos;d have

&gt; var enc = SubtleCrypto.encrypt(...)

which would be similar to how other built-in libraries work, such as Math.


I realize this might be too late at this point though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108287</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-06-24 15:29:47 +0000</bug_when>
    <thetext>Yeah, I was never sure why we hung this stuff off window.crypto, really, since fundamentally these are all static methods....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108290</commentid>
    <comment_count>4</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-06-24 16:48:06 +0000</bug_when>
    <thetext>The logic behind the decision that got us here:

1) Earlier drafts introduced specific notions of key storage (eg: yet another web storage mechanism), and thus hanging off window (indicating there is logical storage attached to the current document) was seen as appropriate

2) As a consequence of that storage choice, there was a distinction between what was available to window and what was available to workers (how to handle locking of the storage database and signals of storage database changes)

3) The window.crypto.subtle is a reflection of the WG&apos;s decision to pursue a low-level API at present, but still leave flexibility for a &apos;high-level&apos; API - one which might include device-level interactions (such as being discussed during the upcoming September workshop)

(In reply to Anne from comment #2)
&gt; It is already a global

Unintentional, but I suspect a consequence of omitting NoInterfaceObject, because callers were going to be allowed to override the .prototype to extend the algorithms (however, in practice, this doesn&apos;t work; one cannot define a new hash/digest algorithm and then have it work with RSA, for example).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111954</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-09-22 17:53:30 +0000</bug_when>
    <thetext>Based on comment #4 I suggest we make no change here and close this as &apos;won&apos;t fix&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111967</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-22 18:07:45 +0000</bug_when>
    <thetext>Note that a low-level API is exactly what should be the same across ECMAScript runtimes... But I guess it&apos;s too late now :-(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113607</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-10-22 21:33:58 +0000</bug_when>
    <thetext>In the absence of further comments I&apos;m closing this as WONTFIX. If you object, please reopen.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>