Tuesday, August 6, 2013

Re: [android-developers] Read ciphered ECDSA key

On Tue, Aug 6, 2013 at 5:53 PM, Filipe Batista <batista.filipe@gmail.com> wrote:
> Hello,
> I have a private key in the pem format ciphered with AES 128 that was
> generated using ECDSA.
> In Android how can i decipher the key and read it?

You will probably need more info to do this, but:
(this is not Android specific)

1. Find out (or derive) the AES key and IV
2. Decrypt the EC key blob
3. Find out its format, probably PKCS#8 and initialize the appropriate KeySpec
4. Use a KeyFactory to get PrivateKey and PublicKey from the KeySpec
5. Use keys with Signature, etc.

More info:

http://www.bouncycastle.org/wiki/display/JA1/Elliptic+Curve+Key+Pair+Generation+and+Key+Factories

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
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 android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment