<?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>29545</bug_id>
          
          <creation_ts>2016-03-28 18:15:01 +0000</creation_ts>
          <short_desc>ECDSA &apos;alg&apos; names for JWK: ES512 vs ES521</short_desc>
          <delta_ts>2016-05-24 00:40:23 +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>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="Eric Roman">ericroman</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>125653</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Roman">ericroman</who>
    <bug_when>2016-03-28 18:15:01 +0000</bug_when>
    <thetext>There is confusion (at least to me) on what the meaning of the ECDSA &quot;alg&quot; parameter is.

  * The WebCrypto spec contains both strings &quot;ES512&quot; and &quot;ES521&quot; when searching its text.

ES512 is mentioned in the (non-normative) section &quot;Mapping between JSON Web Key / JSON Web Algorithm&quot; as meaning P-521 with SHA-512. This definition is consistent with the JWA spec&apos;s definition.

The use of ES512 is nowhere in the WebCrypto spec though, so for all intents and purposes this is a dangling reference. (issue #1).

Next up, when looking at the JWA&apos;s description of ES* algorithms:

 * ES256 -- ECDSA using P-256 and SHA-256
 * ES384 -- ECDSA using P-384 and SHA-384
 * ES512 -- ECDSA using P-521 and SHA-512

This is in contrast to WebCryto&apos;s definitions:

 * ES256 -- ECDSA with P-256 (and any hash algorithm)
 * ES384 -- ECDSA with P-384 (and any hash algorithm)
 * ES521 -- ECDSA with P-521 (and any hash algorithm)

The problem here is ES256 and ES384 are spelled the same, but have different meanings. ES521 is unambiguous as it appears only in WebCrypto.

WebCrypto&apos;s understanding of the algorithm means it does not enforce the hash algorithm restriction implied by JWA. Which I guess is meh. But what I think is more inconsistent is that ES512 is not supported, even though it could be interpreted similarly to mean P-521 (with any hash algorithm), even.

This is causing a compatibility problem as Chromium&apos;s implementation recognizes ES512 (the one given by JWA) and not ES521 (the one invented by WebCrypto spec).

Credit to Jim Schaad for observing Chromium doesn&apos;t accept ES521.

I can easily change Chromium to match the current WebCrypto spec, but the different meaning of these names doesn&apos;t seem right. Is this the desired intent, or should we be using different algorithm names for ES256 and ES384 ?

Also see the Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=598339</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126483</commentid>
    <comment_count>1</comment_count>
    <who name="">virginie.galindo</who>
    <bug_when>2016-05-23 20:55:31 +0000</bug_when>
    <thetext>This bug has been moved to github webcrypto repository under https://github.com/w3c/webcrypto/issues/24</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>