<?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>25706</bug_id>
          
          <creation_ts>2014-05-14 12:01:40 +0000</creation_ts>
          <short_desc>Incomplete Key Generation Definitions</short_desc>
          <delta_ts>2014-10-22 21:17:06 +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="Kelsey Cairns">kelsey.cairns</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>public-webcrypto</cc>
    
    <cc>virginie.galindo</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105953</commentid>
    <comment_count>0</comment_count>
    <who name="Kelsey Cairns">kelsey.cairns</who>
    <bug_when>2014-05-14 12:01:40 +0000</bug_when>
    <thetext>For the AES algorithms and HMAC, the key generation step does not go into any more detail than &quot;generate a key.&quot; If there is some intended method to generate a key, it should be specified. Similarly, if the underlying mechanism is intentionally unspecified I think it would be good to clearly state that somewhere. A quick search didn&apos;t yield anything and the discussions in the section on random number generation (including the note that the random number generator should not be used for keys) were also not helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105976</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-05-14 16:22:17 +0000</bug_when>
    <thetext>(In reply to Kelsey Cairns from comment #0)
&gt; For the AES algorithms and HMAC, the key generation step does not go into
&gt; any more detail than &quot;generate a key.&quot; If there is some intended method to
&gt; generate a key, it should be specified. Similarly, if the underlying
&gt; mechanism is intentionally unspecified I think it would be good to clearly
&gt; state that somewhere. A quick search didn&apos;t yield anything and the
&gt; discussions in the section on random number generation (including the note
&gt; that the random number generator should not be used for keys) were also not
&gt; helpful.

Can you please provide suggested wording?

Including a normative reference on SP800-133 is undesirable, as it state&apos;s clearly in Section 5 that the RBG should be a FIPS-approved one, which historically tend to be be weaker in terms of security guarantees. Further, it also uses terminology identical to the spec with respect to key generation.

Can you explain any concrete concerns about where the language choice here affects interoperability? Can you explain any concrete concerns about the implementation that are not, in and of themselves, quality of implementation issues?

On &quot;quality of implementation&quot; issues, we&apos;ve counted things such as the quality of the primality test, the number of bits of entropy, the constant-timedness of the operations - all things which, from a black box perspective, do not change the output or interoperability of implementations, and thus are security concerns with respect to the User Agent, and not to the specification as a whole.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106041</commentid>
    <comment_count>2</comment_count>
    <who name="Kelsey Cairns">kelsey.cairns</who>
    <bug_when>2014-05-15 14:24:42 +0000</bug_when>
    <thetext>No interoperability issues with this one. The biggest concern to me is that it seems I could make an implementation that created completely non-random keys and still be API compliant. I get that we don&apos;t want to constrain implementations to anything specific, but maybe it would be reasonable to specify a lower bound on entropy? I think even a moving target is better than nothing, like &quot;no worse than /dev/urandom.&quot;

This bug is also an ease of use thing stemming from looking over the spec the other day with someone who&apos;s going to try an implementation and being asked &quot;what do they mean?&quot; when it came to one of the general key generation steps. I would have liked to be able to give a definitive answer from the spec, but I couldn&apos;t find one.

My suggestion would be a blurb in the Terminology section along the lines of:

&quot;The phrase &quot;generate key,&quot; when no further specification is given, is meant to allow implementers flexibility in the choice of random number generator. However an entropy source should be used that is [at least as good as.. [choose your reference, make sure there&apos;s some kind of metric for comparison]]&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112281</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-09-26 17:50:05 +0000</bug_when>
    <thetext>Are there any further opinions on this one ?

Any objections to the suggestion for a (informative?) recommendation in comment 2 ?

What should the reference be ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113079</commentid>
    <comment_count>4</comment_count>
    <who name="">virginie.galindo</who>
    <bug_when>2014-10-14 09:32:13 +0000</bug_when>
    <thetext>In order to progress towards exit to Last Call for the Web Crypto API, the chair suggests the following resolution for that bug. 

Resolution : Bug RESOLVED as WONTFIX. Based on the fact that this request is about giving guidance to implementers and users (and not adding a feature) combined with the fact that no reference related to robust random generation can be pointed to and agreed on. 

If none objects before the 20th of Oct @20:00 UTC, this resolution will be endorsed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113599</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-10-22 21:17:06 +0000</bug_when>
    <thetext>Closing per Chair&apos;s proposed resolution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>