Elliptic Curve sample
The sample in the ecdsa folder illustrates the use of Elliptic Curve Digital Signature Algorithms (ECDSA).
Generates and registers an ECDSA key pair.
Signs data.
Verifies the data signature.
See below for how to compile and run the sample.
Compiling ECDSAExample.java
Run the following command line in the etjava/examples directory.
javac -sourcepath source -d classes -classpath ../lib/enttoolkit.jar source/com/entrust/toolkit/examples/ecdsa/ECDSAExample.javaRunning ECDSAExample
Run the following command line in the etjava/examples directory.
java -classpath classes;<path to enttoolkit.jar> com.entrust.toolkit.examples.ecdsa.ECDSAExampleFor example:
C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.ecdsa.ECDSAExampleRegistering a named curve over a prime field...DONERegistering a named curve over a characteristic two field...DONEGenerating key pair... DONECreating signature... DONEVerifying signature... VALID