GurpreetKang / BitwardenDecrypt

Decrypts an encrypted Bitwarden data.json file.
GNU General Public License v3.0
245 stars 30 forks source link

Handle Unsupported EncryptionType Gracefully #15

Closed GurpreetKang closed 2 years ago

GurpreetKang commented 2 years ago

Decryption of the Protected Symmetric Key assumes the EncryptionType = 2 (AesCbc256_HmacSha256_B64) and will fail if it is anything else. Old Bitwarden accounts may be using EncryptionType = 0 (AesCbc256_B64)

This should be handled gracefully with a meaningful error message.

GurpreetKang commented 2 years ago

Previous commnit was incomplete fix.

GurpreetKang commented 2 years ago

https://github.com/GurpreetKang/BitwardenDecrypt/commit/d801cb2e0c0585dd5eeea9ee35d0096a86b4bd96