Skip to content

Conversation

@commonism
Copy link

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.

ResetMasterPassword: bool | None = None
master_key: bytes | None = None

master_key: bytes | None = None #pydantic.PrivateAttr(default=None)
Copy link
Author

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

@Lowaiz Lowaiz self-requested a review July 4, 2025 14:26
@commonism
Copy link
Author

@Lujeni can we talk about this?

@commonism
Copy link
Author

argon2id works now as well.

@commonism
Copy link
Author

@Lowaiz @Lujeni - how to proceed with this?

@commonism commonism changed the title WIP: decrypt - using pydantic WrapValidator support argon2id & nested decryption Dec 29, 2025
@Lujeni
Copy link
Member

Lujeni commented Jan 12, 2026

@commonism Sorry for the delay!

Great idea! The Argon2id support and the decryption refactor with pydantic's WrapValidator look really good. I'll review this and come back later so we can deep dive together to finalize and properly integrate this.

update: can you update + rebase your branch pls and fix linter part

@Lujeni Lujeni self-assigned this Jan 12, 2026
@Lujeni Lujeni added the enhancement New feature or request label Jan 12, 2026
CipherDetails may have a dedicated key to use for decryption, use if set
@commonism
Copy link
Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants