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

[idea] Use second factor as challenge #20

Open
Vincent43 opened this issue Nov 9, 2017 · 4 comments
Open

[idea] Use second factor as challenge #20

Vincent43 opened this issue Nov 9, 2017 · 4 comments

Comments

@Vincent43
Copy link

Vincent43 commented Nov 9, 2017

Using second factor (user password) as challenge will allow for not storing challenge on disk and keep it secret. It would need asking for second factor before challenge-response action.

@eworm-de
Copy link
Owner

eworm-de commented Nov 9, 2017

This already supports second factor on top of the stored challenge. What's wrong with that?

@Vincent43
Copy link
Author

Vincent43 commented Nov 9, 2017

Challenge is stored in clear available to anyone. If someone has access to yubikey, the response and at least half of luks passphrase is avalaible . That means it works same as static password stored in yubikey. If second factor is used as challenge, access to yubikey alone gives nothing. Also stored challenge doesn't have any useful purpose if second factor is needed anyway and can be used as challenge instead.

So I propose that stored challenge will be used only in one factor case.

For two factor user password will be used as both challenge and second half of luks passphrase.

@eworm-de
Copy link
Owner

eworm-de commented Nov 9, 2017

Challenge is stored in clear available to anyone. If someone has access to yubikey, the response and at least half of luks passphrase is avalaible . That means it works same as static password stored in yubikey.

No. Because you need Yubikey and challenge at the same time and place.

If second factor is used as challenge, access to yubikey alone gives nothing. Also stored challenge doesn't have any useful purpose if second factor is needed anyway and can be used as challenge instead.

Wrong. The challenge (and LUKS passphrase) is changed on every boot. So consider the stored challenge is a dynamic salt: If anybody manages to calculate the response (aka LUKS passphrase) it is invalid on next boot.

So I propose that stored challenge will be used only in one factor case.

No. See above.

For two factor user password will be used as both challenge and second half of luks passphrase.

That does not bring any benefit but extra code complexity.

@Vincent43
Copy link
Author

Vincent43 commented Nov 9, 2017

Challenge is stored alongside encrypted disk so it doesn't count as a factor. Without access to this data everything is pointless. Having yubikey is enough to get correct response.

Changing the challenge doesn't bring any additional security as still possessing same yubikey give you valid response. You (and attacker) don't have to know anything about challenge (if stored) and response as it's working automatically with correct yubikey.

Also one time access to offline encrypted data (which allows for copying luks header) or online decrypted data (which allows for dumping luks encryption key directly with dmsetup table --showkeys)is enough for an attacker to save and use current challenge/key forever unless you reencrypt whole disk with different luks key. Changing challenge/response doesn't help at all with above. I already had this discussion in cornelinux/yubikey-luks#1 (comment) .

One Time Password concept is only useful where independent oracle exist i.e. remote server. It's not useful in case of physical disk encryption when decryption is done offline with environment controlled by whoever has access to data.

Also this adds actual extra code complexity and in worst case scenario can break things. Moreover if stored challenge is damaged or lost, luks key cannot be decrypted with valid yubikey and valid password.

I already explained benefits of using password as challenge. I didn't look at code but as password logic already exist it's a matter of moving it to the place before challenge-response generation scheme and providing it as input instead of what is stored in config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants