Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MasterSecret implements Parcelable, secure? #934

Closed
payload opened this issue Mar 2, 2014 · 1 comment
Closed

MasterSecret implements Parcelable, secure? #934

payload opened this issue Mar 2, 2014 · 1 comment

Comments

@payload
Copy link

payload commented Mar 2, 2014

Hi. I was grepping the code for weird places to confirm if I can use TextSecure as my SMS replacement.

I saw that MasterSecret nulls out some buffer in its constructor where secretKey and macKey was residing. Is this because we don't want to leave some copy of the secretKey in freed memory? I guess so.

But than again MasterSecret gets copied around often in Parcel I think. For each Intent.putExtra and for the single MasterSecret.parcelClone call (why?). Why aren't these copies nulled out after use? Especially because Parcel comes from a pool with no documented scope.

@kmindi kmindi mentioned this issue Mar 2, 2014
4 tasks
@moxie0
Copy link
Contributor

moxie0 commented Mar 2, 2014

MasterSecret is for location encryption. It needs to be passed across binder calls. Attempts to "null out" immutable objects in Java will not end well. In general, attempting to clean or protect memory in the JVM is not really possible.

@moxie0 moxie0 closed this as completed Mar 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants