Page 1 of 1

Implement my own crypt API in Java Card

Posted: Tue Jan 05, 2016 3:09 am
by Thelogan
We all know that Java Card API has crypto API. But if I want to implement/add my own crypt API in Java Card API, how can I do this ? I have looked thru the Java Card API document. Below is the segment of the overview.
public abstract class Cipher
extends Object

The Cipher class is the abstract base class for Cipher algorithms. Implementations of Cipher algorithms must extend this class and implement all the abstract methods.
...


I can not understand this well.
"Implementations of Cipher algorithms must extend this class and implement all the abstract methods. "
If I implement my own crypt API, how could I do this according to the Java Card API document?

Re: Implement my own crypt API in Java Card

Posted: Thu Jan 07, 2016 5:13 am
by Tarantino
In order to implement your own cryptographic classes you have to implement interface javacardx/crypto/KeyEncryption.java. As you know that javacardx.crypto is extension package. It also contains Cipher.java which is essentially your implementation of Ciphers and you have to implement its abstract methods.