<?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>26458</bug_id>
          
          <creation_ts>2014-07-29 19:22:28 +0000</creation_ts>
          <short_desc>Are all the API methods really returning Promise&lt;any&gt;, or can the return value be specified more precisely?</short_desc>
          <delta_ts>2014-09-25 23:09: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="Boris Zbarsky">bzbarsky</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>public-webcrypto</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>109519</commentid>
    <comment_count>0</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-07-29 19:22:28 +0000</bug_when>
    <thetext>For example, I would expect that verify() actually returns a Promise&lt;boolean&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109523</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-07-29 19:58:54 +0000</bug_when>
    <thetext>I intentionally did not do that for Verify(), in order to support Signature-with-message-recovery schemes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109524</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-07-29 20:03:52 +0000</bug_when>
    <thetext>What would such a scheme return instead of a boolean?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109525</commentid>
    <comment_count>3</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-07-29 20:11:19 +0000</bug_when>
    <thetext>For a message recovery scheme, &quot;probably&quot; a Bool or ArrayBuffer. Or a tuple of Bool &amp; ArrayBuffer. It&apos;s unclear, and gross, but the alternative would be creating some new VerifyWithSignatureRecovery method, with some new key usage, to support something that&apos;s logically a Verify.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109526</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-07-29 20:37:03 +0000</bug_when>
    <thetext>OK.  So what about encrypt()?  Are there cases when it&apos;s not an ArrayBuffer?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109529</commentid>
    <comment_count>5</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-07-29 20:53:04 +0000</bug_when>
    <thetext>(In reply to Boris Zbarsky from comment #4)
&gt; OK.  So what about encrypt()?  Are there cases when it&apos;s not an ArrayBuffer?

There was the debate about whether Encrypt should return a single ciphertext, or ciphertext+tag for AAD. Ditto for input.

Rather than going piecemeal through these, a more useful exercise might be to compile a table. My gut reaction is negative, but part of that may be change aversion, and part of that is knowing that the moment we restrict the API to some single return type, someone will inevitably show up with a use case that doesn&apos;t fit in cleanly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111962</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-09-22 18:03:58 +0000</bug_when>
    <thetext>Based on Comment #5 I&apos;d suggest won&apos;t fix for this. Any objections ?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>