On Fri, Jan 31, 2014 at 7:05 AM, pskr <[email protected]> wrote:

>
> So, is there a way to store a secret key? This key should be available only
> to my app (not even user). I plan to use it to verify things like trials,
> purchases, etc. (and to avoid server calls for this purpose) in my app.

No, only public-private key pairs are supported (RSA, DSA and ECDSA)

>
> I tried to generate a keypair and store the private key, but I need to
> provide a certificate chain. How can I generate a self signed certificate in
> app's code and use it for this purpose (chain of 1 certificate)? Is this
> even a correct usage?
>

A self-signed certificate is automatically generated when you generate the
key. If you don't need the certificate simply don't use it. You can use the
RSA key to wrap your secret keys and then store them in the filesystem.
See this sample:

https://android.googlesource.com/platform/development/+/master/samples/Vault/src/com/example/android/vault/SecretKeyWrapper.java

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to