Page 1 of 1

Is there a good way to implement an AES-CMAC encryption on Java Cards?

Posted: Mon Jan 28, 2019 10:47 pm
by PaulBod
I can 't find any example or samples of Java card that has AES CMAC encryption. Is there a proper way to implement an AES-CMAC encryption on Java Cards?

Re: Is there a good way to implement an AES-CMAC encryption on Java Cards?

Posted: Tue Jan 29, 2019 6:31 am
by tay00000
Signature.ALG_AES_CMAC_128 is only available from JC 3.0.5 and up.

If you want to implement it yourself, please look at this old forum thread which contains one of our member's source code (https://javacardos.com/javacardforum/vi ... php?t=1114).

Re: Is there a good way to implement an AES-CMAC encryption on Java Cards?

Posted: Thu Jan 31, 2019 5:51 am
by JCaberham
You can implement AES-CMAC from scratch using the AES Cipher and Signature objects, and it's possible and not too difficult.

Re: Is there a good way to implement an AES-CMAC encryption on Java Cards?

Posted: Thu Jan 31, 2019 11:08 pm
by PaulBod
tay00000 wrote:
Tue Jan 29, 2019 6:31 am
Signature.ALG_AES_CMAC_128 is only available from JC 3.0.5 and up.

If you want to implement it yourself, please look at this old forum thread which contains one of our member's source code (https://javacardos.com/javacardforum/vi ... php?t=1114).
Thanks you very much.
I learned a lot from the link you suggested.

Re: Is there a good way to implement an AES-CMAC encryption on Java Cards?

Posted: Fri Feb 01, 2019 1:30 am
by nishakale
Excellent topic. Great answers by expert. Thank you.