libkeepass / pykeepass

Python library to interact with keepass databases (supports KDBX3 and KDBX4)
https://pypi.org/project/pykeepass/
GNU General Public License v3.0
411 stars 96 forks source link

Add decrypt option to decrypt body on demand #360

Closed janbrummer closed 12 months ago

janbrummer commented 1 year ago

Fixes: https://github.com/libkeepass/pykeepass/issues/359

janbrummer commented 1 year ago

@Evidlo Like so?

And also a function for direct master seed access would make sense i guess. Nobody should know the internal structure...

janbrummer commented 1 year ago

@Evidlo Like so?

And also a function for direct master seed access would make sense i guess. Nobody should know the internal structure...

I've added a master_seed property

Evidlo commented 1 year ago

Looks good so far. Just needs a test and a description added to the misc section of the README

janbrummer commented 1 year ago

So i tried to implement the necessary parts in Secrets and discovered that i was wrong with master_seed... it's actually the kdf algorithm salt. Sorry about that, somehow mixed the output during debugging keepassxc. Nevertheless the PR main part is still valid. I'll adjust the property and add the necessary requested bits.

janbrummer commented 1 year ago

Secrets works fine with this solution \o/ Ready for review.