<?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>27255</bug_id>
          
          <creation_ts>2014-11-06 01:30:58 +0000</creation_ts>
          <short_desc>Inconsistent handling of SPKI / PKCS#8 data between implementations</short_desc>
          <delta_ts>2016-05-23 22:38:45 +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>All</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="Ryan Sleevi">sleevi</reporter>
          <assigned_to name="Ryan Sleevi">sleevi</assigned_to>
          <cc>mitar.w3</cc>
    
    <cc>public-webcrypto</cc>
    
    <cc>rlb</cc>
    
    <cc>vijaybh</cc>
    
    <cc>virginie.galindo</cc>
    
    <cc>watsonm</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114582</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Sleevi">sleevi</who>
    <bug_when>2014-11-06 01:30:58 +0000</bug_when>
    <thetext>This is an implementation issue that likely highlights a spec issue, so filing a bug.

The import key steps described in https://dvcs.w3.org/hg/webcrypto-api/raw-file/34df8cbba360/spec/Overview.html for RSASSA-PKCS1-v1_5 seem to conflict with various crypto libraries&apos; implementations, including OpenSSL, BoringSSL, NSS, and (CAPI/CNG).

Namely:
WebCrypto requires that importing an RSASSA-PKCS1-v1_5 key as an SPKI or PKCS#8 key, the implementation must also recognize the oids sha1WithRSAEncryption, sha256WithRSAEncryption, sha384WithRSAEncryption, and sha512WithRSAEncryption.

Problem:
All of the cryptographic libraries reject such keys. They all require that the key be 1.2.840.113549.1.1 (rsaEncryption).

It also seems that the libraries will reject keys with id-RSASSA-PSS and id-RSAES-OAEP, which means that the security considerations from Section 8 of RFC 4055 can&apos;t be uniformly followed.

Proposed (Partial) Solution:
Remove the language and only support rsaEncryption for RSASSA-PKCS1_v1_5. This primarily limits the ability of wrapped key providers to explicitly limit the hash algorithm used with a particular key. Provided that the supplied wrapped key has not been previously used with a different hash function (or a different function altogether, such as RSA-PSS or RSA-OAEP), this should be fine.

Open Issue:
What to do for RSA-PSS and RSA-OAEP. Keeping the current language means, effectively, that current UAs will need to manually process the ASN.1 encodings and validate accordingly. This has benefits (correctness / full conformance) and downsides (ASN.1 parsing outside of the crypto library seems a recipe for disaster).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126485</commentid>
    <comment_count>1</comment_count>
    <who name="">virginie.galindo</who>
    <bug_when>2016-05-23 21:17:28 +0000</bug_when>
    <thetext>This bug has been moved to webcrypto github repository https://github.com/w3c/webcrypto/issues/26</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>