<?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>24760</bug_id>
          
          <creation_ts>2014-02-21 01:12:07 +0000</creation_ts>
          <short_desc>Specify correct padding algorithm for AES-CBC</short_desc>
          <delta_ts>2014-02-28 17:00:39 +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>FIXED</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="Mark Watson">watsonm</reporter>
          <assigned_to name="Mark Watson">watsonm</assigned_to>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101083</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-02-21 01:12:07 +0000</bug_when>
    <thetext>Jim writes:

Let’s start with a discussion of what reference(s) we should be using for the padding algorithm.  The problem with both of the current one is that they are setup for 64-bit encryption block algorithms and not the current 128-bit block size.  The best reference that I can give you for now would be RFC 5652 (Cryptographic Message Syntax) which is the official successor to PKCS #7 in any event.  The section that describes the padding algorithm is section 6.3

 

The unpadding algorithm in step 5 of decrypt needs to state “If p is zero or greater than 16”</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101622</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-02-28 16:12:20 +0000</bug_when>
    <thetext>The normative procedure in WebCrypto currently references RFC2898, which indeed says &quot;the padding string PS consists of 8-(||M|| mod 8) octets each with value 8-(||M|| mod 8).​&quot;​

So this is clearly wrong.

I propose to replace this with a reference to RFC2315.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101636</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-02-28 17:00:39 +0000</bug_when>
    <thetext>Changeset 7f7c2917970d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>