<?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>309347</bug_id>
          
          <creation_ts>2026-03-06 04:48:39 -0800</creation_ts>
          <short_desc>SubtleCrypto.importKey is unable to import a private Key that is working fine in chrome and other browsers</short_desc>
          <delta_ts>2026-03-06 05:00:07 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>Safari 26</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 26</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>233705</dup_id>
          
          <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="pjain">pranjal.jain</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2187753</commentid>
    <comment_count>0</comment_count>
    <who name="pjain">pranjal.jain</who>
    <bug_when>2026-03-06 04:48:39 -0800</bug_when>
    <thetext>Steps to reproduce:

// PKCS8 representation of a P-256 EC private key with the public key omitted
const pkcs8 = new Uint8Array([48,129,147,2,1,0,48,19,6,7,42,134,72,206,61,2,1,6,8,42,134,72,206,61,3,1,7,4,121,48,119,2,1,1,4,32,232,48,70,210,221,56,109,25,129,113,81,91,165,225,251,99,14,164,11,105,244,7,43,71,62,179,7,61,139,30,152,238,160,10,6,8,42,134,72,206,61,3,1,7,161,68,3,66,0,4,35,226,167,162,21,4,6,207,12,238,2,40,121,168,11,16,254,151,85,17,145,148,140,207,195,45,28,100,59,133,45,128,181,196,131,11,196,108,181,186,254,28,93,236,21,167,43,55,221,253,93,124,177,161,71,92,58,179,154,198,150,54,20,223])

await crypto.subtle.importKey(&apos;pkcs8&apos;, pkcs8, { name: &apos;ECDSA&apos;, namedCurve: &apos;P-256&apos; }, true, [&apos;sign&apos;])

Actual results:

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

Expected results:
EC private key PKCS8 without the public key component should import as in other browsers</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2187754</commentid>
    <comment_count>1</comment_count>
    <who name="pjain">pranjal.jain</who>
    <bug_when>2026-03-06 05:00:07 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 233705 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>