doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
581 stars 83 forks source link

Implement argon2 kdf #109

Closed quexten closed 1 year ago

quexten commented 1 year ago

Hi,

this work-in-progress PR implements basic support for the argon2 KDF. Logging in with default (and at least one other non-default setting, I did not test the boundary values yet) already works. I'm not super familiar with rust yet, so it might require another iteration. Also, I still intend to replace the kdfType (currently has type u32) with an enum.

Nevertheless, I'm happy to get some feedback on this PR.

quexten commented 1 year ago

Ok, the type of the kdf is now an enum instead of u32.

I believe it is now ready for a review.

doy commented 1 year ago

sorry for not getting to this sooner - do you think you could use the argon2 crate instead? i'm really trying to minimize the number of different cryptographic libraries i'm using here, and most of the rest of the code already uses rust-crypto.

quexten commented 1 year ago

Okay, I have changed to the rustcrypto package and re-based to the latest master branch to resolve merge conflicts.

doy commented 1 year ago

thanks!