Skip to content
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

Hidden volumes #67

Closed
d-e-s-o opened this issue Jan 15, 2019 · 6 comments
Closed

Hidden volumes #67

d-e-s-o opened this issue Jan 15, 2019 · 6 comments
Assignees
Labels

Comments

@d-e-s-o
Copy link
Owner

d-e-s-o commented Jan 15, 2019

I started looking into implementing hidden volume support. I first wanted to get the opening and closing done. I was thinking about adding a reveal and hide subcommand to the storage command (names up for debate).
I am not sure about the creation of a hidden volume, though (which likely will have to come eventually and I'd like to have a story for it; I haven't checked if there is something else that we would need to support). storage create seems a ambiguous. storage create-hidden somewhat too long and not in-line with the other subcommands? Not sure.

(I did ponder creating a new top-level command but could not really work that nicely)

The other question is whether to open the encrypted volume if it is not already opened or not (the hidden volume resides inside the encrypted volume and hence the latter must have been opened to begin with).
My take would be to not open the encrypted volume but rather fail the operation. The main reason is that I would like to have symmetry between reveal and hide, and when we hide we have no information as to whether the encrypted volume was already opened before or whether that was done as part of reveal.

Do you have thoughts on this matter, @robinkrahl?

@d-e-s-o d-e-s-o self-assigned this Jan 15, 2019
@robinkrahl
Copy link
Collaborator

I was thinking about adding a reveal and hide subcommand to the storage command (names up for debate).

Sounds good.

storage create seems a ambiguous. storage create-hidden somewhat too long and not in-line with the other subcommands?

I think the most consistent solution would be to have another level of subcommands, but that’s too complex for this use case. So I’d prefer storage create-hidden.

My take would be to not open the encrypted volume but rather fail the operation.

I agree.

You should also keep in mind that there is the NK_get_SD_usage_data_as_string function that returns the possible range for the create command. I don’t support it in nitrokey as it returns a string instead of a data structure, but I have opened a pull request to fix that.

@d-e-s-o
Copy link
Owner Author

d-e-s-o commented Jan 15, 2019

Thanks for your response! I actually like the additional subcommand idea. I'll see what it looks like.

@d-e-s-o
Copy link
Owner Author

d-e-s-o commented Jan 16, 2019

Another interesting topic is that of password management for hidden volumes. The way I understand it, multiple hidden volumes can exist and the one to open is selected based on the password provided.
I am not sure how to best map that to our existing infrastructure for entering secrets. We could, just as we do for PINs, use pinentry to let the user enter the password and we cache it. We'll also have an environment variable representing that password as we do for the User & Admin PIN.
For the case where a user has multiple volumes we could document that the user would have to clear the PIN if he/she wants to open a different volume (I consider that case rather unlikely or at least not frequent).

The alternative would be to always ask for the password (no caching). That does not fit very nicely into our existing design (I guess), but it may be workable.

Perhaps there are more options.

@robinkrahl
Copy link
Collaborator

robinkrahl commented Jan 16, 2019 via email

@d-e-s-o
Copy link
Owner Author

d-e-s-o commented Jan 17, 2019

Okay, then I think we are in agreement here. I hope to make some progress by the end of the week.

@d-e-s-o
Copy link
Owner Author

d-e-s-o commented Jan 20, 2019

No more issues found to be worth a discussion. Closing this issue accordingly.

@d-e-s-o d-e-s-o closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants