2

I created some lightweight cipher in Java Card language and now I want to integrate them into the Java Card API.I noticed the javacardx.crypto.Cipher as well as javacard.security.Key classes. But it seems to me that if I extends the Cipher class and implement all that methods I will still need a way to add my cipher constants into the internal framework for fully integrated the ciphers.Is there a good way to do this ?

Alberto12
  • 509
  • 2
  • 16

1 Answers1

4

No, there is no way to register new ciphers. But note that you normally generate object instances during installation time. So it shouldn't matter all that much if you create an object that extends Cipher and instantiate that instead.

So in general you should create your own XCipher class with your own getInstance methods and constants.

Algorithms are represented by byte constants in Java Card. If they would have a registry there is a chance of collisions. That's why the Java Card forum generally decides if new algorithms should be added.

Maarten Bodewes
  • 90,524
  • 13
  • 150
  • 263