-
Notifications
You must be signed in to change notification settings - Fork 11
support argon2id & nested decryption #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
src/vaultwarden/models/sync.py
Outdated
| ResetMasterPassword: bool | None = None | ||
| master_key: bytes | None = None | ||
|
|
||
| master_key: bytes | None = None #pydantic.PrivateAttr(default=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose using PrivateAttr here
|
@Lujeni can we talk about this? |
|
argon2id works now as well. |
|
@commonism Sorry for the delay! Great idea! The Argon2id support and the decryption refactor with pydantic's update: can you update + rebase your branch pls and fix linter part |
CipherDetails may have a dedicated key to use for decryption, use if set
|
Done |
Hi,
I've looked into this library as a replacement.
This PR is meant to allow discussing some design aspects of the library.
In the first place I need to be able to lookup credentials, therefore I worked on decryption.
Decryption is dealt with during validation, using a pydantic WrapValidator.
Item specific keys, as with CipherDetails or Attachments, can be pushed to the stack when working the item, popped afterwards to continue with the org key. Attachment misses this glue atm.
Encryption would be a WrapSerializer.
Argon2id got some initial thoughts already as well.
I've used allow=forbid for development purposes.
I'd be glad if you could look into this and let me know what think about it.
I could even split this into different PRs (crypto-serdes, argon2id) if required.