cryptohome: simplify marking vault keysets as LECredential |
|||
Issue descriptionCurrently, VaultKeyset protobufs contain two potential indications that the keyset is for LECredential: 1) LE_CREDENTIAL in flags; 2) key_data.policy.low_entropy_credential = true Both are available as plaintext fields. Only the (1) is guaranteed to be set in the keyset file on disk, though (2) is set in most cases (is it possible it is always set?). When loading the keyset from file, we check (1) and set (2) accordingly. Only (2) is exposed through cryptohome API to callers. This seems to be over-complicated and error-prone.
,
Jul 13
Re comment 1: Just to note, I'm suspecting that my refactoring CL http://crrev.com/c/1098255 (which was originally aimed at bug 832395) could fix this issue, by making Mount::DecryptVaultKeyset() reuse HomeDirs::GetValidKeyset() and transitively VaultKeyset::Load()+VaultKeyset::Decrypt() instead of its own logic of loading keysets. Admittedly, my CL turned out to be quite non-trivial and got stuck in reviewing, but if it addresses the problem discovered above then maybe we should attempt at landing it?
,
Jul 13
Re #1: in the current codebase, do we rely somewhere on checking key_data.policy.low_entropy_credential through vault_keyset->IsLECredential() after Mount::DecryptVaultKeyset()? Inside Mount::DecryptVaultKeyset we seem to always check for LE_CREDENTIAL in flags, which is fine. Just trying to understand if we need an urgent fix or can wait for the refactoring.
,
Oct 12
,
Dec 10
Maksim - looks like your change landed in the end, any updates to this bug? thanks! |
|||
►
Sign in to add a comment |
|||
Comment 1 by igorcov@chromium.org
, Jul 13