<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>233704</bug_id>
          
          <creation_ts>2021-12-01 08:12:29 -0800</creation_ts>
          <short_desc>support importing compressed EC keys in webcrypto</short_desc>
          <delta_ts>2022-08-18 18:02:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>Other</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Filip Skokan">panva.ip</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>a_izquierdogarcia</cc>
    
    <cc>bfulgham</cc>
    
    <cc>katherine_cheney</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1819244</commentid>
    <comment_count>0</comment_count>
    <who name="Filip Skokan">panva.ip</who>
    <bug_when>2021-12-01 08:12:29 -0800</bug_when>
    <thetext>Steps to reproduce:

// SPKI representation of a P-384 EC key in a compressed form.
const spki = new Uint8Array([48, 70, 48, 16, 6, 7, 42, 134, 72, 206, 61, 2, 1, 6, 5, 43, 129, 4, 0, 34, 3, 50, 0, 2, 251, 203, 124, 105, 238, 28, 96, 87, 155, 231, 163, 52, 19, 72, 120, 217, 197, 197, 191, 53, 213, 82, 218, 182, 60, 1, 64, 57, 126, 209, 76, 239, 99, 125, 119, 32, 146, 92, 68, 105, 158, 163, 14, 114, 135, 76, 114, 251])

crypto.subtle.importKey(&apos;spki&apos;, spki, { name: &apos;ECDSA&apos;, namedCurve: &apos;P-384&apos; }, false, [&apos;verify&apos;])

Actual result:

importKey is rejected with DataError: Data provided to an operation does not meet requirements

Expected result:

compressed EC public key SPKI should import as in other browsers (we expect interoperability in this regard)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1819246</commentid>
    <comment_count>1</comment_count>
    <who name="Filip Skokan">panva.ip</who>
    <bug_when>2021-12-01 08:14:10 -0800</bug_when>
    <thetext>Likewise, same issue, when using the raw keyFormat

const pub = new Uint8Array([2, 251, 203, 124, 105, 238, 28, 96, 87, 155, 231, 163, 52, 19, 72, 120, 217, 197, 197, 191, 53, 213, 82, 218, 182, 60, 1, 64, 57, 126, 209, 76, 239, 99, 125, 119, 32, 146, 92, 68, 105, 158, 163, 14, 114, 135, 76, 114, 251])
await crypto.subtle.importKey(&apos;raw&apos;, pub, { name: &apos;ECDSA&apos;, namedCurve: &apos;P-384&apos; }, false, [&apos;verify&apos;])

importKey is rejected with DataError: Data provided to an operation does not meet requirements</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1821562</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-12-08 08:13:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/86211772&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892002</commentid>
    <comment_count>3</comment_count>
    <who name="Angela">a_izquierdogarcia</who>
    <bug_when>2022-08-17 12:06:53 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3406</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892109</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-08-17 18:44:03 -0700</bug_when>
    <thetext>*** Bug 244005 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892111</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-08-17 18:44:06 -0700</bug_when>
    <thetext>*** Bug 244032 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1892347</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-08-18 18:02:30 -0700</bug_when>
    <thetext>*** Bug 244083 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>