문제

In my app I'm generating secret key based on device id + random garble. What's safiest way to store those secret key in a way that it can be easily retrieved if user will transfer data from one device to another one?

I'm talking about storing secret key in some external storage like: gmail or other server alike environment.

도움이 되었습니까?

해결책

"easily transferred secret key" is an oxymoron, because the main purpose of the secret key is to be, well, impossible to guess or copy. that's why i'd recommend to generate the unique secret key on every user device and use them to encode your data stored on that particular device (and nowhere else).

when you transfer the data, you may ask the user to create the password, and encrypt transferred data with that password. and ask the user to enter the same password on the receiving device in order to decrypt the transfer and encrypt back again, but using the unique device key.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top