Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

How to compute values using ' log' and 'sqrt' on javacard ?

Algorithm School

Moderator: UNKNwYSHSA

User avatar
btwtiger
Posts: 28
Joined: Wed Jun 10, 2015 7:22 am
Points :134
Contact:

How to compute values using ' log' and 'sqrt' on javacard ?

Post by btwtiger » Wed Jun 10, 2015 7:30 am

Recently,I need to compute values using log and sqrt on a JavaCard. Is there any class for javacard to solve this issue ?
Many thanks.
Last edited by btwtiger on Wed Jun 10, 2015 10:31 pm, edited 4 times in total.
Onward...

User avatar
horse dream
Posts: 76
Joined: Thu May 21, 2015 11:48 pm
Points :138
Contact:

Re: How to compute values using ' log'?

Post by horse dream » Wed Jun 10, 2015 7:43 am

Javacard doesn't support Math class and also only supports boolean, byte, short, and optionally int. Maybe you can create your own class with tricky ways and of course the result is not precise. If you let server/terminal side do complex calculation/encryption, the card only stores data,maybe you can get it working.
Last edited by horse dream on Wed Jun 10, 2015 9:51 pm, edited 1 time in total.

User avatar
btwtiger
Posts: 28
Joined: Wed Jun 10, 2015 7:22 am
Points :134
Contact:

Re: How to compute values using ' log'?

Post by btwtiger » Wed Jun 10, 2015 9:46 pm

horse dream wrote:Javacard doesn't support Math class and also only supports boolean, byte, short, and optionally int. Maybe you can create your own class with tricky ways and of course the result is not precise. If you let server/terminal side do complex calculation/encryption, the card only stores data,maybe you can get it working.


Sorry to tell you I have to do all the calculation on the card side. Anyhow,thank you for your attention.
Onward...

User avatar
Larson
Posts: 18
Joined: Wed May 20, 2015 3:56 am
Points :30
Contact:

Re: How to compute values using ' log' on javacard ?

Post by Larson » Wed Jun 10, 2015 10:04 pm

I've not came across such a class yet. The only way to meet your request is to use some limited tricks with the crypto API.

User avatar
btwtiger
Posts: 28
Joined: Wed Jun 10, 2015 7:22 am
Points :134
Contact:

Re: How to compute values using ' log' on javacard ?

Post by btwtiger » Wed Jun 10, 2015 10:13 pm

Larson wrote:I've not came across such a class yet. The only way to meet your request is to use some limited tricks with the crypto API.


Would you please give me a example ?
Onward...

User avatar
Larson
Posts: 18
Joined: Wed May 20, 2015 3:56 am
Points :30
Contact:

Re: How to compute values using ' log' on javacard ?

Post by Larson » Wed Jun 10, 2015 10:28 pm

e.g. You can perform an RSA modulo exponentiation using 2 as public key and a large modulus to perform squares.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 15 guests

JavaCard OS : Disclaimer