Jainathan Leung
Jainathan Leung

Reputation: 1157

Bouncycastle elliptic curve encryption on Android

I'm trying to decrypt an X509 cert on an android device using Bouncycastle. However, I am consistently getting

java.lang.RuntimeException: algorithm identifier 1.2.840.10045.2.1 in key not recognised.

However, when I run the exact same code on my own computer, it works perfectly fine. Is android overriding some of the bouncycastle libraries with an outdated version?

Upvotes: 3

Views: 2232

Answers (1)

Otra
Otra

Reputation: 8158

I don't think Android has full ECC capabilities yet. The bouncycastle android uses has a lot of that taken out. I would take a look at spongycastle, however, which attempts to implement all of bouncycastle's original functionality for Android.

Here's a link to a bouncy castle topic talking about missing ECC in android.

Here's a link to SpongyCastle

Upvotes: 6

Related Questions