-
Notifications
You must be signed in to change notification settings - Fork 40
AES-KW key unwrapping does not check for integrity #175
Comments
Thanks for the quality bug. We will investigate. |
I've tried to reproduce this issue using it throws
ossl doesn't throw the error I'll take a look at this |
|
Thanks for looking into it and your prompt answers :) I think I've tried
|
Grepping quickly in the code of OSSL: it looks like the check here node-webcrypto-ossl/src/aes/aes_cbc.cpp Line 147 in 3276a83
<= 0
|
This Javascript code, when ran in a browser, properly throws an exception when trying to unwrap the modified wrapped key:
See https://jsfiddle.net/rnf6kdL9/1/
When the same code runs in Node 14.x using
node-webcrypto-ossl
v2.1.3, no exception is thrown when trying to unwrap the modified wrapped key. The integrity of the unwrapped key should be checked, as defined here: https://datatracker.ietf.org/doc/html/rfc3394#page-6The text was updated successfully, but these errors were encountered: