Search code examples
javadigital-signaturecurvejavacard

Elliptic Curve on Java Card - is it possible to use external libraries on Java Card?


I am writing you because I programmed a signature algorithm with elliptic curves in Java on PC and I would like to integrate it on a Java Card. In my program, I use the crypto library BouncyCastle.

So my question is the following : is it possible to use external libraries on Java Card ?

Thank you very much for your help !


Solution

  • Kind of. You can use external libraries that were explicitly written for Java Card. Java Card (Classic) is a very constrained Java environment, which has quite a lot of Java SE functionality missing. Heck, usually it even doesn't have integers, only bytes and shorts.

    You cannot use external libraries written for Java SE. And you certainly cannot use Bouncy Castle. Java Card has its own crypto library (which actually has got a lot of functionality, some even not found in Java SE).

    Note that even if you could rewrite cryptographic functionality, it would be pretty tricky to get enough performance out of Java Card. The crypto libraries of Java Card usually rely on native processing and co-processor support.