4 ms·
All AES-CBC data is authenticated with HMAC SHA-256. This was highlighted in the BWN-01-011 issue (which was determined to be a false positive since it was deem
by xxkylexx 8y ago
All AES-CBC data is authenticated with HMAC SHA-256. This was highlighted in the BWN-01-011 issue (which was determined to be a false positive since it was deemed that authentication was properly done).
- CiPHPerCoder 8y agoI haven't traced through the app's code to verify that is true. Recommendation: If there is no HMAC tag with a ciphertext, immediately throw an exception. It makes it clearer that a decryption failure occurred (thus avoiding false positives).
- xxkylexx 8y agoIt does do this [1], however, it is a little more complex since Bitwarden has to backwards-compat support old data that was AES-CBC encrypted from long ago before auth checks were implemented, while also combating against downgrade attacks. This same discussion was had back in January when you (I assume this is PIE Scott) reported the problem in issue 306171 on HackerOne which was closed out. [1]: https://github.com/bitwarden/jslib/blob/master/src/services/crypto.service.ts#L547 https://github.com/bitwarden/jslib/blob/master/src/services/...
- CiPHPerCoder 8y agoOh, this did seem familiar! The AES-CBC thing is tied to the key, right? So the downgrade attack isn't possible.
- xxkylexx 8y agoYes, new account keys are identified (presence of a mac key) and block the downgrade (see code link above).