Skip to content

Instantly share code, notes, and snippets.

@kyle-ssg
Created July 11, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyle-ssg/0caf45d01eebcbb9f6cd840e71e91517 to your computer and use it in GitHub Desktop.
Save kyle-ssg/0caf45d01eebcbb9f6cd840e71e91517 to your computer and use it in GitHub Desktop.
Secured local storage
Set salt
- When
1: when the user logs in
2: When the user changes their secret word
- Process
This is the process of storeing the encrypted secret answer along with a salt.
At this point the previous secured local storage is wiped, storeing a combination of the secret word and salt along with a generated challenge.
If there is local storage data in memory at this point it is re-encrypted using the generated challenge and written to local storage.
Generate seret challenge
- When
1: When the salt is generated
2: When the user successfully decrypts local storage using a challenge
- Process
Get secured storage
- When
This occurs when the user activates the app and has is logged in.
- Process
At this point the secured storage either provides the version in memory or returns a challenge with salt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment