This pull request adds OperationSupport class that allows configuring the set of allowed operations. By default, only basic operations are allowed. When a disabled operation should be used, the library throws the exception SW_OPERATION_NOT_SUPPORTED.
To use JCMathLib in a simulator, add the following line in the constructor of your applet.
There are also pre-configured sets of supported operations for some cards.
If you want to enable some operations that are not included in the default set, you can do it in the following way.
OperationSupport.getInstance().ECDH_XY = true;
The last example line enables ECPoint multiplication via ALG_EC_SVDP_DH_PLAIN_XY key agreement. This is a new feature included in this pull request that results in almost native performance of scalar multiplication on cards that support it.
This pull request adds OperationSupport class that allows configuring the set of allowed operations. By default, only basic operations are allowed. When a disabled operation should be used, the library throws the exception
SW_OPERATION_NOT_SUPPORTED
.To use JCMathLib in a simulator, add the following line in the constructor of your applet.
There are also pre-configured sets of supported operations for some cards.
If you want to enable some operations that are not included in the default set, you can do it in the following way.
The last example line enables ECPoint multiplication via
ALG_EC_SVDP_DH_PLAIN_XY
key agreement. This is a new feature included in this pull request that results in almost native performance of scalar multiplication on cards that support it.