Subject: Re: [jose] draft-ietf-jose-json-web-algorithms-27: section-5.2 (PKCS #5)

From: Mike Jones <[email-masked]>
Date: Fri, 13 Jun 2014 21:26:54 +0000

(Adding the JOSE working group)

I believe you're right.  I'll plan to make this change in the next version of the spec.

Thanks for the careful read!

                                                            -- Mike

From: Shaun Cooley (shcooley) [mailto:[email-masked]]
Sent: Friday, June 13, 2014 10:34 AM
To: Mike Jones
Cc: Matt Miller (mamille2)
Subject: draft-ietf-jose-json-web-algorithms-27: section-5.2 (PKCS #5)

Michael -
 I am working on implementing a browser compatible JS implementation of JOSE, based on the work Matt Miller did for Node.JS.  While going through the spec, I noticed that PKCS #5 is called out for the AES-CBC ciphers.  Shouldn't this be PKCS #7?

PKCS #5 - RFC2898 section 6.2 specifies:
The padding string PS shall consist of 8 - (||M|| mod 8) octets all having value 8 - (||M|| mod 8).

PKCS #7 - RFC2315 section 10.3 note 2 specifies:
For such algorithms, the method shall be to pad the input at the trailing end with k - (l mod k) octets all having value k - (l mod k), where l is the length of the input.

PKCS #7 allows for padding in block sizes of 2-255 bytes, whereas PKCS #5 is intended for block sizes of 8.  This means that PKCS #7 is a superset of #5, and given that AES is a block size of 16, it seems the spec should require PKCS #7.

Thoughts?

Shaun Cooley
DISTINGUISHED ENGINEER.ENGINEERING
Collaboration Technology Group
[email-masked]<mailto:[email-masked]>
Phone: +1 408 902 3344
Mobile: +1 310 293 2087

[http://www.cisco.com/web/europe/images/email/signature/logo05.jpg]
Cisco.com<http://www.cisco.com/>

This email may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html

---

From: Mike Jones <[email-masked]>
Date: Sat, 21 Jun 2014 00:02:49 +0000

This change has been incorporated in the -28 drafts.

                                                            Thanks again, Shaun,
                                                            -- Mike

From: jose [mailto:[email-masked]] On Behalf Of Mike Jones
Sent: Friday, June 13, 2014 2:27 PM
To: Shaun Cooley (shcooley)
Cc: [email-masked]; Matt Miller (mamille2)
Subject: Re: [jose] draft-ietf-jose-json-web-algorithms-27: section-5.2 (PKCS #5)

                                                            -- Mike

Michael -

Thoughts?

Shaun Cooley