Hack Forums
Data encryption challenge - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Blackhat • Red Team • Offensive Security (https://hackforums.net/forumdisplay.php?fid=447)
+---- Forum: Cryptography, Encryption, and Decryption (https://hackforums.net/forumdisplay.php?fid=126)
+---- Thread: Data encryption challenge (/showthread.php?tid=5412655)



Data encryption challenge - Xone - Sep 22, 2016

Hi,

I would like to encrypt and store data locally on mobile device per user, meaning that only that user can decrypt the data.

For this, I guess I should use user credentials (username + password) to encrypt the data. Please note that all users are forced to use strong passwords.
Whenever data is updated, received from server, it shall be updated locally, encrypted.

This implicates that I need to keep user credentials all the time in memory, which I do not want, since somebody can dump application and find those credentials.

What I could do is to calculate SHA256 of combination of user credentials and keep only that hash in memory, and use that hash as encryption key.

Any ideas regarding this?