Closed
Bug 1416265
Opened 8 years ago
Closed 8 years ago
pk11wrap: Recover backward compatibility of PBES2 AES with older NSS releases
Categories
(NSS :: Libraries, defect)
NSS
Libraries
Tracking
(Not tracked)
RESOLVED
FIXED
3.35
People
(Reporter: ueno, Assigned: ueno)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
6.20 KB,
patch
|
rrelyea
:
review+
|
Details | Diff | Splinter Review |
Since bug 1268141, we changed the PKCS #5 decoder to use fixed key length for AES-CBC-Pad as defined in RFC 8018. However, it turned out that this change prevents reading AES encrypted files created with older NSS releases.
In the older NSS releases, the key length was determined from PBKDF2-params. However, the embedded key length value was always 32; that means AES encryption was always AES-256-CBC, even when the algorithm ID is AES-128-CBC or AES-192-CBC.
Considering those, the attached patch recover the backward compatibility in the following way:
- if the underlying encryption scheme is AES-CBC-Pad
- if the key length encoded in PBKDF2-params is NOT 32, then that means the file is created with newer NSS or other tools; determine the key length from the algorithm ID
- if the key length encoded in PBKDF2-params is 32, then the file is encrypted with AES-256-CBC anyway
I haven't (yet) come up with the test case for this; will attach it later.
Attachment #8927369 -
Flags: review?(rrelyea)
Assignee | ||
Comment 1•8 years ago
|
||
Added a test case.
Attachment #8927369 -
Attachment is obsolete: true
Attachment #8927369 -
Flags: review?(rrelyea)
Attachment #8927773 -
Flags: review?(rrelyea)
Updated•8 years ago
|
Attachment #8927773 -
Flags: review?(rrelyea) → review+
Assignee | ||
Comment 2•8 years ago
|
||
Thank you for the review, landed as: https://bugzilla.mozilla.org/show_bug.cgi?id=1399867
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.35
Updated•8 years ago
|
Depends on: 1268141
Keywords: regression
Updated•8 years ago
|
Assignee: nobody → dueno
You need to log in
before you can comment on or make changes to this bug.
Description
•