Conversation
|
thanks for this! this is a very large pull request with a lot of new cryptography, so it will probably take me a while to fully review it, but i did have some initial questions:
|
|
one other thing that i think would be useful would be an option to store the wrapped keys in |
|
one other thing to consider here - while using the device-local backends does prevent fully offline attacks, any amount of access to the machine is sufficient to allow for unlimited unlock attempts, which isn't great if there is a desire to allow for very short (or empty) pins. how possible would it be to move the entire operation into the secure environment, which would allow for things like limiting the number of pin entry attempts, etc? this would be more work to implement, but it'd be nice to at least keep the option open. |
|
Thanks for your feedback and questions :)
I considered this, but chose not to do so for simplicity. I can add it as a TODO. I chose to allow the user to set the KDF params in the config file
good point, it raises the question whether we only want to allow certain mechanism with certain security properties, or document the options, and leave the responsibility on the user to decide if their chosen pin method is secure enough.
Yes having this as an option (maybe default?) sounds great, although I like it that my fingerprint secured pin persists across sessions; keeping both options is what I would suggest. I'll implement when I get the time.
This is not a problem for fingerprint based age-plugin-se and yubikey pin policies with age-plugin-yubikey, but I take your point. I'm not an expert here, but I think implementing this would not be straightforward at all. One possibility is to get the rbw agent to talk to the TPM directly, and encrypts the I'm not certain the above is a good idea, but it seems to me that any solution would require talking to the tpm directly, which would require writing non-trivial code that calls the TPM2 API. There might exist a crate that would do this for us. I haven't found one but haven't looked very hard either. |
Related issues: #166 #297
This PR implements a pin feature to
rbw. The design is described in issue #297. All additions are gated behind the"pin"feature flag. I've implemented two 'backends' for the local secret that enables the pin. One is using the age crate to allow the user to encrypt the vault decryption key using a hardware token backed age identity. The other just uses the operating systems keyring, using the keyring crate.I'm happy to take feedback. I realise this is a big PR, so happy to answer any questions. I've been using this build for a few months and have had no issues with it so far.
DEMO
Here is a demo of how it looks like using an age-plugin-se identity.
pin_age_demo.mov
AI Usage Disclaimer:
AI was used in the following way to make this PR: AI was used when I was stuck on a bug, and to provide a second opinion on implementation decisions. I also used AI to reorder and clean the commit history before submitting this PR.