Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3bfee24f authored by Eric Biggers's avatar Eric Biggers
Browse files

Skip creating password data file for unsecured users

As another optimization, skip creating the "password data" file in the
LSKF-based protector when the LSKF is empty.  When the LSKF is empty,
the password data file is unnecessary except for providing the scrypt
salt and parameters.  However, since scrypt provides no security benefit
when the LSKF is empty, we can instead just skip the scrypt step.

This saves creating one file, which can be somewhat expensive due to the
use of synchronous writes and an fsync of the parent directory.  It also
saves the scrypt operation (albeit with the minimum parameters) and the
random salt generation.

Bug: 232452368
Bug: 251131631
Bug: 251147505
Test: atest com.android.server.locksettings
Change-Id: Ifdc0d507b81cc4b877d1177fb9c31dbff84cdbb0
parent cdf39de7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment