<?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>27771</bug_id>
          
          <creation_ts>2015-01-06 19:20:11 +0000</creation_ts>
          <short_desc>Should HKDF&apos;s derive bits operation throw OperationError if length is null?</short_desc>
          <delta_ts>2016-05-24 00:45:20 +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>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</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="Nick Harper">nharper</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>116843</commentid>
    <comment_count>0</comment_count>
    <who name="Nick Harper">nharper</who>
    <bug_when>2015-01-06 19:20:11 +0000</bug_when>
    <thetext>The spec for HKDF&apos;s derive bits operation says to throw a TypeError if length is null. I&apos;m wondering if OperationError would be a better choice.

For 3 of the 4 other algorithms that support the derive bits operation (ECDH, DH, PBKDF2), they throw an OperationError if the provided length is not valid (which includes if the length is null). The last one (CONCAT) doesn&apos;t specify, but it is implied that it would throw an OperationError. Since HKDF is the only one that throws a TypeError if length is null, it seems like it would make more sense to throw an OperationError instead to match the behavior of other algorithms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126534</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2016-05-24 00:23:13 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcrypto/issues/74</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>