JCMathLib icon indicating copy to clipboard operation
JCMathLib copied to clipboard

Add function for primality testing

Open petrs opened this issue 6 years ago • 1 comments

petrs avatar Jul 24 '19 08:07 petrs

I'm interested. I could implement it this or the coming week.

Are we aware of any methods checking the primality of their input parameters? I think that would be the optimal way of doing it.

For example, the setFieldFP() seems to be a good candidate:

https://docs.oracle.com/javacard/3.0.5/api/javacard/security/ECKey.html#setFieldFP(byte[],%20short,%20short)

I believe we are already using this method, so it won't introduce new API dependencies.

mavroudisv avatar Jul 24 '19 12:07 mavroudisv