PhilippC / PhilippC/keepass2android
Configurable Biometric Re-authentication Timeout for Keystore
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 478
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 2
Description
Description:
I am requesting a feature to enhance security by implementing a strict, user-configurable timeout for the master key in the Android Keystore.
Currently, the app relies on biometric unlock, but there is no mechanism to enforce an "auto-purge" of the session key from RAM after a specific period of inactivity. To mitigate risks from memory forensic analysis (RAM dumping), I propose the following:
Configurable Timeout: Add a setting to define an auth-timeout (in seconds/minutes).
Forced Purge: Upon expiration of this timer, the session key must be explicitly wiped from memory (zeroed out).
Biometric Re-bind: Once the timeout is reached, the app must revoke the current CryptoObject token and require a fresh BiometricPrompt authentication to re-initialize the Keystore access.
Implementation details: Please utilize KeyGenParameterSpec.Builder with setUserAuthenticationValidityDurationSeconds() to enforce this policy at the hardware/TEE level, ensuring the key becomes inaccessible once the validity window closes.
This is critical for users who need to protect their vault against physical forensic extraction while the device is in a locked or backgrounded state.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Android Keystore integration and any use of KeyGenParameterSpec.Builder; first trace how biometric authentication initializes and reuses the master key. Confirm the timeout is configurable and that expiry requires fresh BiometricPrompt authentication, with session-key handling covered by tests if the project provides them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- authentication, mobile, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100