Skip to content

Address security issue by storing hashed password rather than encrypted#29

Merged
tonyr59h merged 5 commits intodevelopfrom
issue/27-hash-pin
Apr 28, 2016
Merged

Address security issue by storing hashed password rather than encrypted#29
tonyr59h merged 5 commits intodevelopfrom
issue/27-hash-pin

Conversation

@tonyr59h
Copy link
Contributor

Fix #27, most of the details are available in the issue.

I've tested with fresh installs and with upgrades from versions that used encryption-based security, both working as expected. Upgrading from the old MD5 hashing security (original security implementation) should work as it did before for unlocking, setting a new password will remove the stored MD5 password and use the security added in this PR.

In order to keep things backwards compatible PASSWORD_ENC_SECRET must remain as a build property. The secret is used to decrypt existing passwords only and, once decrypted, the stored password will be converted from encryption-based to hash-based security.

Most of the changes are superficial (code cleanup). The relevant security changes are all in db8403c.

cc @daniloercoli

currentAppLocker = new DefaultAppLock(currentApp);
currentAppLocker.enable();
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call here isSupportedApi instead of duplicating the code ?

@tonyr59h
Copy link
Contributor Author

Maybe move that method in this class

Done in b715eef. Thanks for the review @daniloercoli!

}

/**
* Default App lock is available on Android-v14 or higher.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niptick: I think we should change the comment in something like:
True when an App lock is available. It could be either a the Default App lock on Android-v14 or higher, or a non default App lock.

@daniloercoli
Copy link
Contributor

Feel free to merge this PR, once the issue with the comment reported in my last review is sorted (If you want to change it).

@tonyr59h tonyr59h merged commit 7079d63 into develop Apr 28, 2016
@tonyr59h tonyr59h deleted the issue/27-hash-pin branch April 28, 2016 20:55
@tonyr59h tonyr59h added this to the 1.2.0 milestone May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants