From b97597bf20f5b44fb024c994cd3961c0a10d204b Mon Sep 17 00:00:00 2001 From: petrs Date: Thu, 8 Sep 2016 14:13:02 +0200 Subject: initial commit --- !uploader/GPPcScConnectionPlugin.dll | Bin 0 -> 15360 bytes !uploader/GPShell.exe | Bin 0 -> 33280 bytes !uploader/GlobalPlatform.dll | Bin 0 -> 117248 bytes !uploader/gp.exe | Bin 0 -> 908346 bytes !uploader/gp.jar | Bin 0 -> 894200 bytes !uploader/gppro_upload.bat | 5 + !uploader/gppro_upload_emv.bat | 5 + !uploader/libeay32.dll | Bin 0 -> 1017344 bytes !uploader/openkms-gp.jar | Bin 0 -> 78142 bytes !uploader/simpleECC.cap | Bin 0 -> 4938 bytes !uploader/simpleECC221.cap | Bin 0 -> 4562 bytes !uploader/simpleECC_NXP_JCOP_CJ2A081.txt | 54 + !uploader/simpleECC_test.txt | 27 + !uploader/simpleECC_testDHSecret.txt | 23 + !uploader/simpleECC_testSetParams.txt | 27 + !uploader/ssleay32.dll | Bin 0 -> 200704 bytes !uploader/zlib1.dll | Bin 0 -> 75264 bytes build.xml | 73 ++ dist/README.TXT | 32 + dist/SimpleAPDU.jar | Bin 0 -> 19404 bytes dist/lib/jcardsim-2.2.2-all.jar | Bin 0 -> 394661 bytes ext/ant-javacard.jar | Bin 0 -> 9346 bytes ext/globalplatform-2_1_1/gp211.jar | Bin 0 -> 2766 bytes .../org/globalplatform/javacard/globalplatform.exp | Bin 0 -> 1868 bytes .../api_export_files/java/io/javacard/io.exp | Bin 0 -> 212 bytes .../api_export_files/java/lang/javacard/lang.exp | Bin 0 -> 881 bytes .../api_export_files/java/rmi/javacard/rmi.exp | Bin 0 -> 280 bytes .../javacard/framework/javacard/framework.exp | Bin 0 -> 6750 bytes .../framework/service/javacard/service.exp | Bin 0 -> 2901 bytes .../javacard/security/javacard/security.exp | Bin 0 -> 7205 bytes .../javacardx/crypto/javacard/crypto.exp | Bin 0 -> 1282 bytes ext/java_card_kit-2_2_1/bin/apdutool | 15 + ext/java_card_kit-2_2_1/bin/capdump | 15 + ext/java_card_kit-2_2_1/bin/capgen | 15 + ext/java_card_kit-2_2_1/bin/converter | 15 + ext/java_card_kit-2_2_1/bin/cref | Bin 0 -> 590311 bytes ext/java_card_kit-2_2_1/bin/exp2text | 15 + ext/java_card_kit-2_2_1/bin/jcwde | 15 + ext/java_card_kit-2_2_1/bin/scriptgen | 15 + ext/java_card_kit-2_2_1/bin/verifycap | 15 + ext/java_card_kit-2_2_1/bin/verifyexp | 15 + ext/java_card_kit-2_2_1/bin/verifyrev | 15 + ext/java_card_kit-2_2_1/lib/apduio.jar | Bin 0 -> 18371 bytes ext/java_card_kit-2_2_1/lib/apdutool.jar | Bin 0 -> 25249 bytes ext/java_card_kit-2_2_1/lib/api.jar | Bin 0 -> 125003 bytes ext/java_card_kit-2_2_1/lib/capdump.jar | Bin 0 -> 4397 bytes ext/java_card_kit-2_2_1/lib/converter.jar | Bin 0 -> 641460 bytes ext/java_card_kit-2_2_1/lib/installer.jar | Bin 0 -> 29810 bytes ext/java_card_kit-2_2_1/lib/javacardframework.jar | Bin 0 -> 82345 bytes ext/java_card_kit-2_2_1/lib/jcclientsamples.jar | Bin 0 -> 18202 bytes .../lib/jcrmiclientframework.jar | Bin 0 -> 35705 bytes ext/java_card_kit-2_2_1/lib/jcwde.jar | Bin 0 -> 76411 bytes ext/java_card_kit-2_2_1/lib/offcardverifier.jar | Bin 0 -> 149207 bytes ext/java_card_kit-2_2_1/lib/scriptgen.jar | Bin 0 -> 12459 bytes .../api_export_files/java/io/javacard/io.exp | Bin 0 -> 212 bytes .../api_export_files/java/lang/javacard/lang.exp | Bin 0 -> 881 bytes .../api_export_files/java/rmi/javacard/rmi.exp | Bin 0 -> 280 bytes .../javacard/framework/javacard/framework.exp | Bin 0 -> 7040 bytes .../framework/service/javacard/service.exp | Bin 0 -> 2901 bytes .../javacard/security/javacard/security.exp | Bin 0 -> 8989 bytes .../javacardx/apdu/javacard/apdu.exp | Bin 0 -> 113 bytes .../javacardx/biometry/javacard/biometry.exp | Bin 0 -> 2254 bytes .../javacardx/crypto/javacard/crypto.exp | Bin 0 -> 1382 bytes .../javacardx/external/javacard/external.exp | Bin 0 -> 857 bytes .../javacardx/framework/math/javacard/math.exp | Bin 0 -> 812 bytes .../javacardx/framework/tlv/javacard/tlv.exp | Bin 0 -> 3011 bytes .../framework/util/intx/javacard/intx.exp | Bin 0 -> 309 bytes .../javacardx/framework/util/javacard/util.exp | Bin 0 -> 819 bytes ext/java_card_kit-2_2_2/bin/apdutool | 15 + ext/java_card_kit-2_2_2/bin/capdump | 15 + ext/java_card_kit-2_2_2/bin/capgen | 15 + ext/java_card_kit-2_2_2/bin/converter | 15 + ext/java_card_kit-2_2_2/bin/cref | Bin 0 -> 735003 bytes ext/java_card_kit-2_2_2/bin/exp2text | 15 + ext/java_card_kit-2_2_2/bin/jcwde | 15 + ext/java_card_kit-2_2_2/bin/libjpcsclite.so | Bin 0 -> 5803 bytes ext/java_card_kit-2_2_2/bin/scriptgen | 15 + ext/java_card_kit-2_2_2/bin/verifycap | 15 + ext/java_card_kit-2_2_2/bin/verifyexp | 15 + ext/java_card_kit-2_2_2/bin/verifyrev | 15 + ext/java_card_kit-2_2_2/lib/apduio.jar | Bin 0 -> 48313 bytes ext/java_card_kit-2_2_2/lib/apdutool.jar | Bin 0 -> 26302 bytes ext/java_card_kit-2_2_2/lib/api.jar | Bin 0 -> 175768 bytes ext/java_card_kit-2_2_2/lib/api_16.jar | Bin 0 -> 145072 bytes ext/java_card_kit-2_2_2/lib/capdump.jar | Bin 0 -> 4369 bytes ext/java_card_kit-2_2_2/lib/converter.jar | Bin 0 -> 640317 bytes ext/java_card_kit-2_2_2/lib/installer.jar | Bin 0 -> 30035 bytes ext/java_card_kit-2_2_2/lib/javacardframework.jar | Bin 0 -> 95149 bytes ext/java_card_kit-2_2_2/lib/jcclientsamples.jar | Bin 0 -> 23754 bytes .../lib/jcrmiclientframework.jar | Bin 0 -> 31335 bytes ext/java_card_kit-2_2_2/lib/jcwde.jar | Bin 0 -> 80671 bytes ext/java_card_kit-2_2_2/lib/jcwde_16.jar | Bin 0 -> 69477 bytes ext/java_card_kit-2_2_2/lib/offcardverifier.jar | Bin 0 -> 147387 bytes ext/java_card_kit-2_2_2/lib/scriptgen.jar | Bin 0 -> 12382 bytes ext/java_card_kit-3_0_3/COPYRIGHT.html | 171 +++ .../api_export_files/java/io/javacard/io.exp | Bin 0 -> 212 bytes .../api_export_files/java/lang/javacard/lang.exp | Bin 0 -> 881 bytes .../api_export_files/java/rmi/javacard/rmi.exp | Bin 0 -> 280 bytes .../javacard/framework/javacard/framework.exp | Bin 0 -> 7077 bytes .../framework/service/javacard/service.exp | Bin 0 -> 2901 bytes .../javacard/security/javacard/security.exp | Bin 0 -> 10533 bytes .../javacardx/apdu/javacard/apdu.exp | Bin 0 -> 113 bytes .../javacardx/biometry/javacard/biometry.exp | Bin 0 -> 2254 bytes .../javacardx/crypto/javacard/crypto.exp | Bin 0 -> 1862 bytes .../javacardx/external/javacard/external.exp | Bin 0 -> 857 bytes .../javacardx/framework/math/javacard/math.exp | Bin 0 -> 812 bytes .../javacardx/framework/tlv/javacard/tlv.exp | Bin 0 -> 3011 bytes .../framework/util/intx/javacard/intx.exp | Bin 0 -> 309 bytes .../javacardx/framework/util/javacard/util.exp | Bin 0 -> 819 bytes .../legal/Distribution_ReadME.txt | 21 + ext/java_card_kit-3_0_3/legal/THIRDPARTYREADME.txt | 1246 ++++++++++++++++++++ ext/java_card_kit-3_0_3/lib/api_classic.jar | Bin 0 -> 43109 bytes ext/java_card_kit-3_0_3/lib/api_connected.jar | Bin 0 -> 142812 bytes ext/java_card_kit-3_0_3/lib/logging.properties | 64 + ext/java_card_kit-3_0_3/lib/tools.jar | Bin 0 -> 1452414 bytes ext/java_card_kit-3_0_3/shared/Java_clr_hori.gif | Bin 0 -> 3500 bytes .../shared/Java_clr_hori_interval.gif | Bin 0 -> 1725 bytes .../shared/Java_clr_hori_small.gif | Bin 0 -> 1267 bytes ext/java_card_kit-3_0_3/shared/downicon.gif | Bin 0 -> 91 bytes ext/java_card_kit-3_0_3/shared/oracle.gif | Bin 0 -> 1932 bytes ext/java_card_kit-3_0_3/shared/smallOracleLogo.gif | Bin 0 -> 2059 bytes ext/java_card_kit-3_0_3/shared/topicon.gif | Bin 0 -> 93 bytes .../visa/openplatform/javacard/openplatform.exp | Bin 0 -> 1294 bytes ext/visa_openplatform-2_0/visaop20.jar | Bin 0 -> 26832 bytes jcardsim-2.2.2-all.jar | Bin 0 -> 394661 bytes jcbuild.xml | 24 + lib/jcardsim-2.2.2-all.jar | Bin 0 -> 394661 bytes manifest.mf | 3 + src/applets/EC_Consts.java | 184 +++ src/applets/SimpleECCApplet.java | 351 ++++++ src/simpleapdu/CardMngr.java | 209 ++++ src/simpleapdu/ISO7816_status_words.txt | 71 ++ src/simpleapdu/SimpleAPDU.java | 78 ++ 133 files changed, 2968 insertions(+) create mode 100644 !uploader/GPPcScConnectionPlugin.dll create mode 100644 !uploader/GPShell.exe create mode 100644 !uploader/GlobalPlatform.dll create mode 100644 !uploader/gp.exe create mode 100644 !uploader/gp.jar create mode 100644 !uploader/gppro_upload.bat create mode 100644 !uploader/gppro_upload_emv.bat create mode 100644 !uploader/libeay32.dll create mode 100644 !uploader/openkms-gp.jar create mode 100644 !uploader/simpleECC.cap create mode 100644 !uploader/simpleECC221.cap create mode 100644 !uploader/simpleECC_NXP_JCOP_CJ2A081.txt create mode 100644 !uploader/simpleECC_test.txt create mode 100644 !uploader/simpleECC_testDHSecret.txt create mode 100644 !uploader/simpleECC_testSetParams.txt create mode 100644 !uploader/ssleay32.dll create mode 100644 !uploader/zlib1.dll create mode 100644 build.xml create mode 100644 dist/README.TXT create mode 100644 dist/SimpleAPDU.jar create mode 100644 dist/lib/jcardsim-2.2.2-all.jar create mode 100644 ext/ant-javacard.jar create mode 100644 ext/globalplatform-2_1_1/gp211.jar create mode 100644 ext/globalplatform-2_1_1/org/globalplatform/javacard/globalplatform.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/java/io/javacard/io.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/java/lang/javacard/lang.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/java/rmi/javacard/rmi.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/javacard/framework/javacard/framework.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/javacard/framework/service/javacard/service.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/javacard/security/javacard/security.exp create mode 100644 ext/java_card_kit-2_2_1/api_export_files/javacardx/crypto/javacard/crypto.exp create mode 100644 ext/java_card_kit-2_2_1/bin/apdutool create mode 100644 ext/java_card_kit-2_2_1/bin/capdump create mode 100644 ext/java_card_kit-2_2_1/bin/capgen create mode 100644 ext/java_card_kit-2_2_1/bin/converter create mode 100644 ext/java_card_kit-2_2_1/bin/cref create mode 100644 ext/java_card_kit-2_2_1/bin/exp2text create mode 100644 ext/java_card_kit-2_2_1/bin/jcwde create mode 100644 ext/java_card_kit-2_2_1/bin/scriptgen create mode 100644 ext/java_card_kit-2_2_1/bin/verifycap create mode 100644 ext/java_card_kit-2_2_1/bin/verifyexp create mode 100644 ext/java_card_kit-2_2_1/bin/verifyrev create mode 100644 ext/java_card_kit-2_2_1/lib/apduio.jar create mode 100644 ext/java_card_kit-2_2_1/lib/apdutool.jar create mode 100644 ext/java_card_kit-2_2_1/lib/api.jar create mode 100644 ext/java_card_kit-2_2_1/lib/capdump.jar create mode 100644 ext/java_card_kit-2_2_1/lib/converter.jar create mode 100644 ext/java_card_kit-2_2_1/lib/installer.jar create mode 100644 ext/java_card_kit-2_2_1/lib/javacardframework.jar create mode 100644 ext/java_card_kit-2_2_1/lib/jcclientsamples.jar create mode 100644 ext/java_card_kit-2_2_1/lib/jcrmiclientframework.jar create mode 100644 ext/java_card_kit-2_2_1/lib/jcwde.jar create mode 100644 ext/java_card_kit-2_2_1/lib/offcardverifier.jar create mode 100644 ext/java_card_kit-2_2_1/lib/scriptgen.jar create mode 100644 ext/java_card_kit-2_2_2/api_export_files/java/io/javacard/io.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/java/lang/javacard/lang.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/java/rmi/javacard/rmi.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacard/framework/javacard/framework.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacard/framework/service/javacard/service.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacard/security/javacard/security.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/apdu/javacard/apdu.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/biometry/javacard/biometry.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/crypto/javacard/crypto.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/external/javacard/external.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/math/javacard/math.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/tlv/javacard/tlv.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/intx/javacard/intx.exp create mode 100644 ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/javacard/util.exp create mode 100644 ext/java_card_kit-2_2_2/bin/apdutool create mode 100644 ext/java_card_kit-2_2_2/bin/capdump create mode 100644 ext/java_card_kit-2_2_2/bin/capgen create mode 100644 ext/java_card_kit-2_2_2/bin/converter create mode 100644 ext/java_card_kit-2_2_2/bin/cref create mode 100644 ext/java_card_kit-2_2_2/bin/exp2text create mode 100644 ext/java_card_kit-2_2_2/bin/jcwde create mode 100644 ext/java_card_kit-2_2_2/bin/libjpcsclite.so create mode 100644 ext/java_card_kit-2_2_2/bin/scriptgen create mode 100644 ext/java_card_kit-2_2_2/bin/verifycap create mode 100644 ext/java_card_kit-2_2_2/bin/verifyexp create mode 100644 ext/java_card_kit-2_2_2/bin/verifyrev create mode 100644 ext/java_card_kit-2_2_2/lib/apduio.jar create mode 100644 ext/java_card_kit-2_2_2/lib/apdutool.jar create mode 100644 ext/java_card_kit-2_2_2/lib/api.jar create mode 100644 ext/java_card_kit-2_2_2/lib/api_16.jar create mode 100644 ext/java_card_kit-2_2_2/lib/capdump.jar create mode 100644 ext/java_card_kit-2_2_2/lib/converter.jar create mode 100644 ext/java_card_kit-2_2_2/lib/installer.jar create mode 100644 ext/java_card_kit-2_2_2/lib/javacardframework.jar create mode 100644 ext/java_card_kit-2_2_2/lib/jcclientsamples.jar create mode 100644 ext/java_card_kit-2_2_2/lib/jcrmiclientframework.jar create mode 100644 ext/java_card_kit-2_2_2/lib/jcwde.jar create mode 100644 ext/java_card_kit-2_2_2/lib/jcwde_16.jar create mode 100644 ext/java_card_kit-2_2_2/lib/offcardverifier.jar create mode 100644 ext/java_card_kit-2_2_2/lib/scriptgen.jar create mode 100644 ext/java_card_kit-3_0_3/COPYRIGHT.html create mode 100644 ext/java_card_kit-3_0_3/api_export_files/java/io/javacard/io.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/java/lang/javacard/lang.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/java/rmi/javacard/rmi.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacard/framework/javacard/framework.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacard/framework/service/javacard/service.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacard/security/javacard/security.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/apdu/javacard/apdu.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/biometry/javacard/biometry.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/crypto/javacard/crypto.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/external/javacard/external.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/math/javacard/math.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/tlv/javacard/tlv.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/intx/javacard/intx.exp create mode 100644 ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/javacard/util.exp create mode 100644 ext/java_card_kit-3_0_3/legal/Distribution_ReadME.txt create mode 100644 ext/java_card_kit-3_0_3/legal/THIRDPARTYREADME.txt create mode 100644 ext/java_card_kit-3_0_3/lib/api_classic.jar create mode 100644 ext/java_card_kit-3_0_3/lib/api_connected.jar create mode 100644 ext/java_card_kit-3_0_3/lib/logging.properties create mode 100644 ext/java_card_kit-3_0_3/lib/tools.jar create mode 100644 ext/java_card_kit-3_0_3/shared/Java_clr_hori.gif create mode 100644 ext/java_card_kit-3_0_3/shared/Java_clr_hori_interval.gif create mode 100644 ext/java_card_kit-3_0_3/shared/Java_clr_hori_small.gif create mode 100644 ext/java_card_kit-3_0_3/shared/downicon.gif create mode 100644 ext/java_card_kit-3_0_3/shared/oracle.gif create mode 100644 ext/java_card_kit-3_0_3/shared/smallOracleLogo.gif create mode 100644 ext/java_card_kit-3_0_3/shared/topicon.gif create mode 100644 ext/visa_openplatform-2_0/visa/openplatform/javacard/openplatform.exp create mode 100644 ext/visa_openplatform-2_0/visaop20.jar create mode 100644 jcardsim-2.2.2-all.jar create mode 100644 jcbuild.xml create mode 100644 lib/jcardsim-2.2.2-all.jar create mode 100644 manifest.mf create mode 100644 src/applets/EC_Consts.java create mode 100644 src/applets/SimpleECCApplet.java create mode 100644 src/simpleapdu/CardMngr.java create mode 100644 src/simpleapdu/ISO7816_status_words.txt create mode 100644 src/simpleapdu/SimpleAPDU.java diff --git a/!uploader/GPPcScConnectionPlugin.dll b/!uploader/GPPcScConnectionPlugin.dll new file mode 100644 index 0000000..3b27f6b Binary files /dev/null and b/!uploader/GPPcScConnectionPlugin.dll differ diff --git a/!uploader/GPShell.exe b/!uploader/GPShell.exe new file mode 100644 index 0000000..091eece Binary files /dev/null and b/!uploader/GPShell.exe differ diff --git a/!uploader/GlobalPlatform.dll b/!uploader/GlobalPlatform.dll new file mode 100644 index 0000000..6dca172 Binary files /dev/null and b/!uploader/GlobalPlatform.dll differ diff --git a/!uploader/gp.exe b/!uploader/gp.exe new file mode 100644 index 0000000..6478bf2 Binary files /dev/null and b/!uploader/gp.exe differ diff --git a/!uploader/gp.jar b/!uploader/gp.jar new file mode 100644 index 0000000..774d81a Binary files /dev/null and b/!uploader/gp.jar differ diff --git a/!uploader/gppro_upload.bat b/!uploader/gppro_upload.bat new file mode 100644 index 0000000..2f2ec8b --- /dev/null +++ b/!uploader/gppro_upload.bat @@ -0,0 +1,5 @@ +gp.exe -delete 4C6162616B417070 -deletedeps -verbose + +gp.exe -install simpleECC.cap -verbose + + diff --git a/!uploader/gppro_upload_emv.bat b/!uploader/gppro_upload_emv.bat new file mode 100644 index 0000000..dac8169 --- /dev/null +++ b/!uploader/gppro_upload_emv.bat @@ -0,0 +1,5 @@ +gp.exe -delete 4C6162616B417070 -deletedeps -verbose -emv + +gp.exe -install simpleECC.cap -verbose -emv + + diff --git a/!uploader/libeay32.dll b/!uploader/libeay32.dll new file mode 100644 index 0000000..b59a6b4 Binary files /dev/null and b/!uploader/libeay32.dll differ diff --git a/!uploader/openkms-gp.jar b/!uploader/openkms-gp.jar new file mode 100644 index 0000000..9cd5de5 Binary files /dev/null and b/!uploader/openkms-gp.jar differ diff --git a/!uploader/simpleECC.cap b/!uploader/simpleECC.cap new file mode 100644 index 0000000..62e38b6 Binary files /dev/null and b/!uploader/simpleECC.cap differ diff --git a/!uploader/simpleECC221.cap b/!uploader/simpleECC221.cap new file mode 100644 index 0000000..ba7bbb5 Binary files /dev/null and b/!uploader/simpleECC221.cap differ diff --git a/!uploader/simpleECC_NXP_JCOP_CJ2A081.txt b/!uploader/simpleECC_NXP_JCOP_CJ2A081.txt new file mode 100644 index 0000000..bec8ef7 --- /dev/null +++ b/!uploader/simpleECC_NXP_JCOP_CJ2A081.txt @@ -0,0 +1,54 @@ +# Usable for: NXP_JCOP_CJ2A081 +mode_211 +enable_trace +establish_context +card_connect +select -AID a000000003000000 +open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f + +delete -AID 010203040506070809 +delete -AID 010203040506 +delete -AID e1e2e3e4e5e6e7e8e9 +delete -AID e1e2e3e4e5e6 +delete -AID d1d2d3d4d5d6d7d8d9 +delete -AID d1d2d3d4d5d6 +delete -AID d1d2d3d4d5 +delete -AID b1b2b3b4b5b6b7b8b9 +delete -AID b1b2b3b4b5b6 +delete -AID a1a2a3a4a5a6a7a8a9 +delete -AID a1a2a3a4a5a6 +delete -AID 6D7970616330303031 +delete -AID 6D797061636B616731 +delete -AID a1a2a3a4a5a6a7a8a9 +delete -AID F1F2F3F4F5F6F7F8F9 +delete -AID F1F2F3F4F5F6 +delete -AID 313233343536373839 +delete -AID 313233343536 + +delete -AID 4c6162616b4170706c6574 +delete -AID 4c6162616b +delete -AID 4C6162616B4170706C6574 +delete -AID 4C6162616B417070 + +install -file simpleECC.cap -nvDataLimit 2000 -instParam 00a2a3a40002000000000000 + +select -AID 4C6162616B4170706C6574 + +send_apdu -APDU B05c0000020080 + +send_apdu -APDU B05c00000200A0 + +send_apdu -APDU B05c00000200c0 + +send_apdu -APDU B05c0000020100 + + + + +send_apdu -APDU B05b0000 + +send_apdu -APDU B05a0000 + + +card_disconnect +release_context diff --git a/!uploader/simpleECC_test.txt b/!uploader/simpleECC_test.txt new file mode 100644 index 0000000..8139511 --- /dev/null +++ b/!uploader/simpleECC_test.txt @@ -0,0 +1,27 @@ +mode_211 +enable_trace +establish_context +card_connect + +select -AID 4C6162616B4170706C6574 + +send_apdu -APDU B05c0000020080 +send_apdu -APDU B05c0100020080 + +send_apdu -APDU B05c00000200A0 +send_apdu -APDU B05c01000200A0 + +send_apdu -APDU B05c00000200c0 +send_apdu -APDU B05c01000200c0 + +send_apdu -APDU B05c0000020100 +send_apdu -APDU B05c0100020100 + + +send_apdu -APDU B05b0000 + +send_apdu -APDU B05a0000 + + +card_disconnect +release_context diff --git a/!uploader/simpleECC_testDHSecret.txt b/!uploader/simpleECC_testDHSecret.txt new file mode 100644 index 0000000..eb6ab5f --- /dev/null +++ b/!uploader/simpleECC_testDHSecret.txt @@ -0,0 +1,23 @@ +mode_211 +enable_trace +establish_context +card_connect + +select -AID 4C6162616B4170706C6574 + +send_apdu -APDU B05c01020200c0 +send_apdu -APDU B05d000000 + +send_apdu -APDU B05d000031049d42769dfdbe113a851bb6b01b1a515d893b5adbc1f6132974749ac0967a8ff4cc54d93187602dd67eb3d22970aca2ca +send_apdu -APDU B05d000031040178e496f67c822b0d33636bcb1e046f716d8d978d6e4cbc3bfef0789e5d3c42c43598d1b0cb44a654c79c21a6a3686a + +send_apdu -APDU B05d00003104e56ae9ef1f7d2a9dfdb6fd2906218138d72ef0a0ad1e8edd288e33450b0e723a3ab9c72a886360026f37482f86f56242 + + + +send_apdu -APDU B05d00003104C9C0EDFB27B71EBE3093FC4F337638CEE02F78F63CEA902261328E9F038AFD60A0CE019B7634597964D7798E3B16D515 +send_apdu -APDU B05d00003104C9C0EDFB27B71EBE3113FC4F337638CEE02F78F63CEA902261328E9F038AFD60A0CE019B7634597964D7798E3B16D515 + + +card_disconnect +release_context diff --git a/!uploader/simpleECC_testSetParams.txt b/!uploader/simpleECC_testSetParams.txt new file mode 100644 index 0000000..09d967a --- /dev/null +++ b/!uploader/simpleECC_testSetParams.txt @@ -0,0 +1,27 @@ +mode_211 +enable_trace +establish_context +card_connect + +select -AID 4C6162616B4170706C6574 +send_apdu -APDU B05c0000020180 + +send_apdu -APDU B05c0000020080 +send_apdu -APDU B05c0100020080 +send_apdu -APDU B05c0102020080 + +send_apdu -APDU B05c00000200a0 +send_apdu -APDU B05c01000200a0 +send_apdu -APDU B05c01020200a0 + +send_apdu -APDU B05c00000200c0 +send_apdu -APDU B05c01000200c0 +send_apdu -APDU B05c01020200c0 + +send_apdu -APDU B05c0000020100 +send_apdu -APDU B05c0100020100 +send_apdu -APDU B05c0102020100 + + +card_disconnect +release_context diff --git a/!uploader/ssleay32.dll b/!uploader/ssleay32.dll new file mode 100644 index 0000000..e8fabb6 Binary files /dev/null and b/!uploader/ssleay32.dll differ diff --git a/!uploader/zlib1.dll b/!uploader/zlib1.dll new file mode 100644 index 0000000..31996cd Binary files /dev/null and b/!uploader/zlib1.dll differ diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..5cfa0a1 --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project SimpleECC. + + + diff --git a/dist/README.TXT b/dist/README.TXT new file mode 100644 index 0000000..fe19a92 --- /dev/null +++ b/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "SimpleAPDU.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/dist/SimpleAPDU.jar b/dist/SimpleAPDU.jar new file mode 100644 index 0000000..075aed2 Binary files /dev/null and b/dist/SimpleAPDU.jar differ diff --git a/dist/lib/jcardsim-2.2.2-all.jar b/dist/lib/jcardsim-2.2.2-all.jar new file mode 100644 index 0000000..0ac10c0 Binary files /dev/null and b/dist/lib/jcardsim-2.2.2-all.jar differ diff --git a/ext/ant-javacard.jar b/ext/ant-javacard.jar new file mode 100644 index 0000000..ddc4931 Binary files /dev/null and b/ext/ant-javacard.jar differ diff --git a/ext/globalplatform-2_1_1/gp211.jar b/ext/globalplatform-2_1_1/gp211.jar new file mode 100644 index 0000000..baf03d9 Binary files /dev/null and b/ext/globalplatform-2_1_1/gp211.jar differ diff --git a/ext/globalplatform-2_1_1/org/globalplatform/javacard/globalplatform.exp b/ext/globalplatform-2_1_1/org/globalplatform/javacard/globalplatform.exp new file mode 100644 index 0000000..9c50aae Binary files /dev/null and b/ext/globalplatform-2_1_1/org/globalplatform/javacard/globalplatform.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/java/io/javacard/io.exp b/ext/java_card_kit-2_2_1/api_export_files/java/io/javacard/io.exp new file mode 100644 index 0000000..931133a Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/java/io/javacard/io.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/java/lang/javacard/lang.exp b/ext/java_card_kit-2_2_1/api_export_files/java/lang/javacard/lang.exp new file mode 100644 index 0000000..f349818 Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/java/lang/javacard/lang.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/java/rmi/javacard/rmi.exp b/ext/java_card_kit-2_2_1/api_export_files/java/rmi/javacard/rmi.exp new file mode 100644 index 0000000..209cdf3 Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/java/rmi/javacard/rmi.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/javacard/framework.exp b/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/javacard/framework.exp new file mode 100644 index 0000000..7deb667 Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/javacard/framework.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/service/javacard/service.exp b/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/service/javacard/service.exp new file mode 100644 index 0000000..8fbef2f Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/javacard/framework/service/javacard/service.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/javacard/security/javacard/security.exp b/ext/java_card_kit-2_2_1/api_export_files/javacard/security/javacard/security.exp new file mode 100644 index 0000000..ece3b83 Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/javacard/security/javacard/security.exp differ diff --git a/ext/java_card_kit-2_2_1/api_export_files/javacardx/crypto/javacard/crypto.exp b/ext/java_card_kit-2_2_1/api_export_files/javacardx/crypto/javacard/crypto.exp new file mode 100644 index 0000000..3df48b1 Binary files /dev/null and b/ext/java_card_kit-2_2_1/api_export_files/javacardx/crypto/javacard/crypto.exp differ diff --git a/ext/java_card_kit-2_2_1/bin/apdutool b/ext/java_card_kit-2_2_1/bin/apdutool new file mode 100644 index 0000000..5a1391b --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/apdutool @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.apdutool.Main "$@" diff --git a/ext/java_card_kit-2_2_1/bin/capdump b/ext/java_card_kit-2_2_1/bin/capdump new file mode 100644 index 0000000..dadebd1 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/capdump @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.capdump.CapDump "$@" diff --git a/ext/java_card_kit-2_2_1/bin/capgen b/ext/java_card_kit-2_2_1/bin/capgen new file mode 100644 index 0000000..d0abad1 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/capgen @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.jcasm.cap.Main "$@" diff --git a/ext/java_card_kit-2_2_1/bin/converter b/ext/java_card_kit-2_2_1/bin/converter new file mode 100644 index 0000000..70e9db7 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/converter @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Converter "$@" diff --git a/ext/java_card_kit-2_2_1/bin/cref b/ext/java_card_kit-2_2_1/bin/cref new file mode 100644 index 0000000..3244115 Binary files /dev/null and b/ext/java_card_kit-2_2_1/bin/cref differ diff --git a/ext/java_card_kit-2_2_1/bin/exp2text b/ext/java_card_kit-2_2_1/bin/exp2text new file mode 100644 index 0000000..d88da73 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/exp2text @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Exp2Text "$@" diff --git a/ext/java_card_kit-2_2_1/bin/jcwde b/ext/java_card_kit-2_2_1/bin/jcwde new file mode 100644 index 0000000..c51669b --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/jcwde @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.jcwde.Main "$@" diff --git a/ext/java_card_kit-2_2_1/bin/scriptgen b/ext/java_card_kit-2_2_1/bin/scriptgen new file mode 100644 index 0000000..2df519b --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/scriptgen @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.scriptgen.Main "$@" diff --git a/ext/java_card_kit-2_2_1/bin/verifycap b/ext/java_card_kit-2_2_1/bin/verifycap new file mode 100644 index 0000000..28256d9 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/verifycap @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.Verifier "$@" diff --git a/ext/java_card_kit-2_2_1/bin/verifyexp b/ext/java_card_kit-2_2_1/bin/verifyexp new file mode 100644 index 0000000..dc4c4fd --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/verifyexp @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.VerifyExp "$@" diff --git a/ext/java_card_kit-2_2_1/bin/verifyrev b/ext/java_card_kit-2_2_1/bin/verifyrev new file mode 100644 index 0000000..55b8158 --- /dev/null +++ b/ext/java_card_kit-2_2_1/bin/verifyrev @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright © 2003 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.VerifyRev "$@" diff --git a/ext/java_card_kit-2_2_1/lib/apduio.jar b/ext/java_card_kit-2_2_1/lib/apduio.jar new file mode 100644 index 0000000..b74da00 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/apduio.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/apdutool.jar b/ext/java_card_kit-2_2_1/lib/apdutool.jar new file mode 100644 index 0000000..dae00af Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/apdutool.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/api.jar b/ext/java_card_kit-2_2_1/lib/api.jar new file mode 100644 index 0000000..e8ea0ad Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/api.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/capdump.jar b/ext/java_card_kit-2_2_1/lib/capdump.jar new file mode 100644 index 0000000..a30ecd7 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/capdump.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/converter.jar b/ext/java_card_kit-2_2_1/lib/converter.jar new file mode 100644 index 0000000..a9ad89d Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/converter.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/installer.jar b/ext/java_card_kit-2_2_1/lib/installer.jar new file mode 100644 index 0000000..55928d3 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/installer.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/javacardframework.jar b/ext/java_card_kit-2_2_1/lib/javacardframework.jar new file mode 100644 index 0000000..d16b86d Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/javacardframework.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/jcclientsamples.jar b/ext/java_card_kit-2_2_1/lib/jcclientsamples.jar new file mode 100644 index 0000000..bba7f43 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/jcclientsamples.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/jcrmiclientframework.jar b/ext/java_card_kit-2_2_1/lib/jcrmiclientframework.jar new file mode 100644 index 0000000..3d04f6f Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/jcrmiclientframework.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/jcwde.jar b/ext/java_card_kit-2_2_1/lib/jcwde.jar new file mode 100644 index 0000000..c748f26 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/jcwde.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/offcardverifier.jar b/ext/java_card_kit-2_2_1/lib/offcardverifier.jar new file mode 100644 index 0000000..2369c14 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/offcardverifier.jar differ diff --git a/ext/java_card_kit-2_2_1/lib/scriptgen.jar b/ext/java_card_kit-2_2_1/lib/scriptgen.jar new file mode 100644 index 0000000..64f9d96 Binary files /dev/null and b/ext/java_card_kit-2_2_1/lib/scriptgen.jar differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/java/io/javacard/io.exp b/ext/java_card_kit-2_2_2/api_export_files/java/io/javacard/io.exp new file mode 100644 index 0000000..931133a Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/java/io/javacard/io.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/java/lang/javacard/lang.exp b/ext/java_card_kit-2_2_2/api_export_files/java/lang/javacard/lang.exp new file mode 100644 index 0000000..f349818 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/java/lang/javacard/lang.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/java/rmi/javacard/rmi.exp b/ext/java_card_kit-2_2_2/api_export_files/java/rmi/javacard/rmi.exp new file mode 100644 index 0000000..209cdf3 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/java/rmi/javacard/rmi.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/javacard/framework.exp b/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/javacard/framework.exp new file mode 100644 index 0000000..9e9351b Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/javacard/framework.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/service/javacard/service.exp b/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/service/javacard/service.exp new file mode 100644 index 0000000..8fbef2f Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacard/framework/service/javacard/service.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacard/security/javacard/security.exp b/ext/java_card_kit-2_2_2/api_export_files/javacard/security/javacard/security.exp new file mode 100644 index 0000000..d3279d4 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacard/security/javacard/security.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/apdu/javacard/apdu.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/apdu/javacard/apdu.exp new file mode 100644 index 0000000..c9183d4 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/apdu/javacard/apdu.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/biometry/javacard/biometry.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/biometry/javacard/biometry.exp new file mode 100644 index 0000000..fb46fa3 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/biometry/javacard/biometry.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/crypto/javacard/crypto.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/crypto/javacard/crypto.exp new file mode 100644 index 0000000..a9968bb Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/crypto/javacard/crypto.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/external/javacard/external.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/external/javacard/external.exp new file mode 100644 index 0000000..4af91e5 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/external/javacard/external.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/math/javacard/math.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/math/javacard/math.exp new file mode 100644 index 0000000..89a1ac6 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/math/javacard/math.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/tlv/javacard/tlv.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/tlv/javacard/tlv.exp new file mode 100644 index 0000000..58495fb Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/tlv/javacard/tlv.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/intx/javacard/intx.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/intx/javacard/intx.exp new file mode 100644 index 0000000..881a961 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/intx/javacard/intx.exp differ diff --git a/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/javacard/util.exp b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/javacard/util.exp new file mode 100644 index 0000000..3ce0d16 Binary files /dev/null and b/ext/java_card_kit-2_2_2/api_export_files/javacardx/framework/util/javacard/util.exp differ diff --git a/ext/java_card_kit-2_2_2/bin/apdutool b/ext/java_card_kit-2_2_2/bin/apdutool new file mode 100644 index 0000000..128e724 --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/apdutool @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.apdutool.Main "$@" diff --git a/ext/java_card_kit-2_2_2/bin/capdump b/ext/java_card_kit-2_2_2/bin/capdump new file mode 100644 index 0000000..3877c3a --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/capdump @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.capdump.CapDump "$@" diff --git a/ext/java_card_kit-2_2_2/bin/capgen b/ext/java_card_kit-2_2_2/bin/capgen new file mode 100644 index 0000000..f054c6b --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/capgen @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.jcasm.cap.Main "$@" diff --git a/ext/java_card_kit-2_2_2/bin/converter b/ext/java_card_kit-2_2_2/bin/converter new file mode 100644 index 0000000..e99bb8e --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/converter @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Converter "$@" diff --git a/ext/java_card_kit-2_2_2/bin/cref b/ext/java_card_kit-2_2_2/bin/cref new file mode 100644 index 0000000..b0d8ac8 Binary files /dev/null and b/ext/java_card_kit-2_2_2/bin/cref differ diff --git a/ext/java_card_kit-2_2_2/bin/exp2text b/ext/java_card_kit-2_2_2/bin/exp2text new file mode 100644 index 0000000..6350fac --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/exp2text @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.converter.Exp2Text "$@" diff --git a/ext/java_card_kit-2_2_2/bin/jcwde b/ext/java_card_kit-2_2_2/bin/jcwde new file mode 100644 index 0000000..f59a861 --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/jcwde @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.jcwde.Main "$@" diff --git a/ext/java_card_kit-2_2_2/bin/libjpcsclite.so b/ext/java_card_kit-2_2_2/bin/libjpcsclite.so new file mode 100644 index 0000000..4ffb8b1 Binary files /dev/null and b/ext/java_card_kit-2_2_2/bin/libjpcsclite.so differ diff --git a/ext/java_card_kit-2_2_2/bin/scriptgen b/ext/java_card_kit-2_2_2/bin/scriptgen new file mode 100644 index 0000000..3a1e310 --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/scriptgen @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.scriptgen.Main "$@" diff --git a/ext/java_card_kit-2_2_2/bin/verifycap b/ext/java_card_kit-2_2_2/bin/verifycap new file mode 100644 index 0000000..6d4ae0b --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/verifycap @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.Verifier "$@" diff --git a/ext/java_card_kit-2_2_2/bin/verifyexp b/ext/java_card_kit-2_2_2/bin/verifyexp new file mode 100644 index 0000000..9120515 --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/verifyexp @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.VerifyExp "$@" diff --git a/ext/java_card_kit-2_2_2/bin/verifyrev b/ext/java_card_kit-2_2_2/bin/verifyrev new file mode 100644 index 0000000..c231efb --- /dev/null +++ b/ext/java_card_kit-2_2_2/bin/verifyrev @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +JAVA_HOME=${JAVA_HOME:-/usr/j2se} + +bin_home=`dirname $0` +JC_HOME=${JC_HOME:-$bin_home/..} + +JC_PATH=$JC_HOME/lib/apdutool.jar:$JC_HOME/lib/apduio.jar:$JC_HOME/lib/converter.jar:$JC_HOME/lib/jcwde.jar:$JC_HOME/lib/scriptgen.jar:$JC_HOME/lib/offcardverifier.jar:$JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar:$JC_HOME/lib/capdump.jar:$JC_HOME/samples/classes:$CLASSPATH + +JFLAGS="-classpath $JC_PATH" +$JAVA_HOME/bin/java $JFLAGS com.sun.javacard.offcardverifier.VerifyRev "$@" diff --git a/ext/java_card_kit-2_2_2/lib/apduio.jar b/ext/java_card_kit-2_2_2/lib/apduio.jar new file mode 100644 index 0000000..ab57e26 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/apduio.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/apdutool.jar b/ext/java_card_kit-2_2_2/lib/apdutool.jar new file mode 100644 index 0000000..c4ad9f2 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/apdutool.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/api.jar b/ext/java_card_kit-2_2_2/lib/api.jar new file mode 100644 index 0000000..98e07b2 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/api.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/api_16.jar b/ext/java_card_kit-2_2_2/lib/api_16.jar new file mode 100644 index 0000000..6213631 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/api_16.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/capdump.jar b/ext/java_card_kit-2_2_2/lib/capdump.jar new file mode 100644 index 0000000..00f38c5 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/capdump.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/converter.jar b/ext/java_card_kit-2_2_2/lib/converter.jar new file mode 100644 index 0000000..3728ebe Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/converter.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/installer.jar b/ext/java_card_kit-2_2_2/lib/installer.jar new file mode 100644 index 0000000..43004d5 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/installer.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/javacardframework.jar b/ext/java_card_kit-2_2_2/lib/javacardframework.jar new file mode 100644 index 0000000..35762c4 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/javacardframework.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/jcclientsamples.jar b/ext/java_card_kit-2_2_2/lib/jcclientsamples.jar new file mode 100644 index 0000000..c169891 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/jcclientsamples.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/jcrmiclientframework.jar b/ext/java_card_kit-2_2_2/lib/jcrmiclientframework.jar new file mode 100644 index 0000000..c0fdaad Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/jcrmiclientframework.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/jcwde.jar b/ext/java_card_kit-2_2_2/lib/jcwde.jar new file mode 100644 index 0000000..1f6d017 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/jcwde.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/jcwde_16.jar b/ext/java_card_kit-2_2_2/lib/jcwde_16.jar new file mode 100644 index 0000000..76de86b Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/jcwde_16.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/offcardverifier.jar b/ext/java_card_kit-2_2_2/lib/offcardverifier.jar new file mode 100644 index 0000000..e6b00a9 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/offcardverifier.jar differ diff --git a/ext/java_card_kit-2_2_2/lib/scriptgen.jar b/ext/java_card_kit-2_2_2/lib/scriptgen.jar new file mode 100644 index 0000000..e1b50c5 Binary files /dev/null and b/ext/java_card_kit-2_2_2/lib/scriptgen.jar differ diff --git a/ext/java_card_kit-3_0_3/COPYRIGHT.html b/ext/java_card_kit-3_0_3/COPYRIGHT.html new file mode 100644 index 0000000..66af699 --- /dev/null +++ b/ext/java_card_kit-3_0_3/COPYRIGHT.html @@ -0,0 +1,171 @@ + + + + + + + + Copyright + + +
Copyright © 1998, 2010, +Oracle and/or its affiliates. All rights reserved.
+
+

This software and related documentation are provided under a license +agreement containing restrictions on use and disclosure and are +protected by intellectual property laws. Except as expressly permitted +in your license agreement or allowed by law, you may not use, copy, +reproduce, translate, broadcast, modify, license, transmit, distribute, +exhibit, perform, publish, or display any part, in any form, or by any +means. Reverse engineering, disassembly, or decompilation of this +software, unless required by law for interoperability, is prohibited.

+

The information contained herein is subject to change without notice +and is not warranted to be error-free. If you find any errors, please +report them to us in writing.

+

If this is software or related software documentation that is +delivered to the U.S. Government or anyone licensing it on behalf of +the U.S. Government, the following notice is applicable:

+

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related +documentation and technical data delivered to U.S. Government customers +are "commercial computer software" or "commercial technical data" +pursuant to the applicable Federal Acquisition Regulation and +agency-specific supplemental regulations. As such, the use, +duplication, disclosure, modification, and adaptation shall be subject +to the restrictions and license terms set forth in the applicable +Government contract, and, to the extent applicable by the terms of the +Government contract, the additional rights set forth in FAR 52.227-19, +Commercial Computer Software License (December 2007). Oracle USA, Inc., +500 Oracle Parkway, Redwood City, CA 94065.

+

This software or hardware is developed for general use in a variety +of information management applications. It is not developed or intended +for use in any inherently dangerous applications, including +applications which may create a risk of personal injury. If you use +this software or hardware in dangerous applications, then you shall be +responsible to take all appropriate fail-safe, backup, redundancy, and +other measures to ensure the safe use. Oracle Corporation and its +affiliates disclaim any liability for any damages caused by use of this +software or hardware in dangerous applications.

+

Oracle and Java are registered trademarks of Oracle Corporation +and/or its +affiliates. Oracle and Java are registered trademarks of Oracle and/or +its affiliates. Other names may be trademarks of their respective +owners.

+

AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks +or registered trademarks of Advanced Micro Devices. Intel and Intel +Xeon are trademarks or registered trademarks of Intel Corporation. All +SPARC trademarks are used under license and are trademarks or +registered trademarks of SPARC International, Inc. UNIX is a registered +trademark licensed through X/Open Company, Ltd.

+

This software or hardware and documentation may provide access to or +information on content, products, and services from third parties. +Oracle Corporation and its affiliates are not responsible for and +expressly disclaim all warranties of any kind with respect to +third-party content, products, and services. Oracle Corporation and its +affiliates will not be responsible for any loss, costs, or damages +incurred due to your access to or use of third-party content, products, +or services.
+

+
+Copyright © 1998, 2010, Oracle +et/ou ses affiliés. +Tous droits réservés. + +

Ce logiciel et la documentation qui l’accompagne sont +protégés par les +lois sur la propriété intellectuelle. Ils sont +concédés sous licence et soumis à +des restrictions d’utilisation et de divulgation. Sauf disposition de +votre contrat de licence ou +de la loi, vous ne pouvez pas copier, reproduire, traduire, diffuser, +modifier, breveter, +transmettre, distribuer, exposer, exécuter, publier ou afficher +le logiciel, même partiellement, sous quelque forme +et par quelque procédé que ce soit. Par ailleurs, il est +interdit de +procéder à toute ingénierie inverse du logiciel, +de le désassembler ou de le décompiler, +excepté à des fins d’interopérabilité avec +des logiciels tiers ou tel que prescrit par +la loi.

+

Les informations fournies dans ce document sont susceptibles de +modification sans préavis. +Par ailleurs, Oracle Corporation ne garantit pas qu’elles soient +exemptes d’erreurs et vous invite, +le cas échéant, à lui en faire part par +écrit.

+

Si ce logiciel, ou +la documentation qui l’accompagne, est concédé sous +licence au Gouvernement des Etats-Unis, ou à +toute entité qui délivre la licence de ce logiciel ou +l’utilise pour le +compte du Gouvernement des Etats-Unis, la notice suivante s’applique:

+

U.S. GOVERNMENT RIGHTS. Programs, +software, databases, and related documentation and technical data +delivered to U.S. Government customers are +"commercial computer software" or "commercial technical data" pursuant +to the applicable Federal Acquisition +Regulation and agency-specific supplemental regulations. As such, the +use, duplication, disclosure, modification, and +adaptation shall be subject to the restrictions and license terms set +forth in +the applicable Government contract, and, to the extent applicable by +the terms of the +Government contract, the additional rights set forth in FAR 52.227-19, +Commercial Computer Software +License (December 2007). Oracle America, Inc., 500 Oracle Parkway, +Redwood City, CA +94065.

+

Ce logiciel ou matériel a été +développé pour un usage général dans le +cadre d’applications de gestion des informations. Ce logiciel ou +matériel n’est pas conçu ni +n’est destiné à être utilisé dans des +applications à risque, notamment dans des applications +pouvant causer des dommages corporels. Si vous utilisez ce logiciel ou +matériel dans +le cadre d’applications dangereuses, il est de votre +responsabilité de prendre toutes les mesures +de secours, de sauvegarde, de redondance et autres mesures +nécessaires à son utilisation +dans des conditions optimales de sécurité. Oracle +Corporation et ses affiliés déclinent toute +responsabilité +quant aux dommages causés par l’utilisation de ce logiciel ou +matériel pour ce type +d’applications.

+

Oracle et Java sont des marques déposées d’Oracle +Corporation et/ou de ses affiliés.Tout +autre nom mentionné peut correspondre à des marques +appartenant à d’autres propriétaires qu’Oracle.

+

AMD, Opteron, +le logo AMD et le logo AMD Opteron sont des marques ou des +marques déposées d’Advanced Micro Devices. Intel et Intel +Xeon sont des marques ou +des marques déposées d’Intel Corporation. Toutes les +marques SPARC sont utilisées sous licence et +sont des marques ou des marques déposées de SPARC +International, Inc. UNIX est une +marque déposée concédée sous licence par +X/Open Company, Ltd.

+

Ce logiciel ou matériel et +la documentation qui l’accompagne peuvent fournir des informations ou +des liens donnant accès à +des contenus, des produits et des services émanant de tiers. +Oracle Corporation et +ses affiliés déclinent toute responsabilité ou +garantie expresse quant aux contenus, produits ou services +émanant de tiers. En aucun cas, Oracle Corporation et ses +affiliés ne sauraient +être tenus pour responsables des pertes subies, des coûts +occasionnés ou des dommages causés +par l’accès à des contenus, produits ou services tiers, +ou à leur utilisation.
+

+

+
+ + diff --git a/ext/java_card_kit-3_0_3/api_export_files/java/io/javacard/io.exp b/ext/java_card_kit-3_0_3/api_export_files/java/io/javacard/io.exp new file mode 100644 index 0000000..931133a Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/java/io/javacard/io.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/java/lang/javacard/lang.exp b/ext/java_card_kit-3_0_3/api_export_files/java/lang/javacard/lang.exp new file mode 100644 index 0000000..f349818 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/java/lang/javacard/lang.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/java/rmi/javacard/rmi.exp b/ext/java_card_kit-3_0_3/api_export_files/java/rmi/javacard/rmi.exp new file mode 100644 index 0000000..209cdf3 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/java/rmi/javacard/rmi.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/javacard/framework.exp b/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/javacard/framework.exp new file mode 100644 index 0000000..50b66e0 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/javacard/framework.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/service/javacard/service.exp b/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/service/javacard/service.exp new file mode 100644 index 0000000..8fbef2f Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacard/framework/service/javacard/service.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacard/security/javacard/security.exp b/ext/java_card_kit-3_0_3/api_export_files/javacard/security/javacard/security.exp new file mode 100644 index 0000000..994455e Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacard/security/javacard/security.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/apdu/javacard/apdu.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/apdu/javacard/apdu.exp new file mode 100644 index 0000000..c9183d4 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/apdu/javacard/apdu.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/biometry/javacard/biometry.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/biometry/javacard/biometry.exp new file mode 100644 index 0000000..fb46fa3 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/biometry/javacard/biometry.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/crypto/javacard/crypto.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/crypto/javacard/crypto.exp new file mode 100644 index 0000000..7146e93 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/crypto/javacard/crypto.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/external/javacard/external.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/external/javacard/external.exp new file mode 100644 index 0000000..4af91e5 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/external/javacard/external.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/math/javacard/math.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/math/javacard/math.exp new file mode 100644 index 0000000..89a1ac6 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/math/javacard/math.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/tlv/javacard/tlv.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/tlv/javacard/tlv.exp new file mode 100644 index 0000000..58495fb Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/tlv/javacard/tlv.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/intx/javacard/intx.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/intx/javacard/intx.exp new file mode 100644 index 0000000..881a961 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/intx/javacard/intx.exp differ diff --git a/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/javacard/util.exp b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/javacard/util.exp new file mode 100644 index 0000000..3ce0d16 Binary files /dev/null and b/ext/java_card_kit-3_0_3/api_export_files/javacardx/framework/util/javacard/util.exp differ diff --git a/ext/java_card_kit-3_0_3/legal/Distribution_ReadME.txt b/ext/java_card_kit-3_0_3/legal/Distribution_ReadME.txt new file mode 100644 index 0000000..37560c9 --- /dev/null +++ b/ext/java_card_kit-3_0_3/legal/Distribution_ReadME.txt @@ -0,0 +1,21 @@ +DistributionREADME + +DISTRIBUTION BY DEVELOPERS. Subject to the terms and conditions of the Software License Agreement and the obligations, restrictions, and exceptions set forth below, You may reproduce and distribute the portions of Software identified below ("Redistributable"), provided that: + +(a) You distribute Redistributable complete and unmodified and only bundled as part of Your Programs, + +(b) Your Programs add significant and primary functionality to the Redistributable, + +(c) You do not distribute additional software intended to replace any +component(s) of the Redistributable, + +(d) You do not remove or alter any proprietary legends or notices contained in or on the Redistributable. + +(e) You only distribute the Redistributable subject to a license agreement that protects Oracle's interests consistent with the terms contained in this +Agreement, and + +(f) You agree to defend and indemnify Oracle and its licensors from and against any damages, costs, liabilities, settlement amounts and/or expenses (including attorneys' fees) incurred in connection with any claim, lawsuit or action by any third party that arises or results from the use or distribution of any and all Programs and/or Redistributable. + +The following files are Redistributables: + +Java Card Development Kit 3.0.3 diff --git a/ext/java_card_kit-3_0_3/legal/THIRDPARTYREADME.txt b/ext/java_card_kit-3_0_3/legal/THIRDPARTYREADME.txt new file mode 100644 index 0000000..1c5c2c0 --- /dev/null +++ b/ext/java_card_kit-3_0_3/legal/THIRDPARTYREADME.txt @@ -0,0 +1,1246 @@ +DO NOT TRANSLATE OR LOCALIZE + +*************************************************************************** + +%%The following software may be included in this product: +ASM + +Use of any of this software is governed by the terms of the license below: + +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +Izpack + +Use of any of this software is governed by the terms of the license below: + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable copyright license to +reproduce, prepare Derivative Works of, publicly display, publicly perform, +sublicense, and distribute the Work and such Derivative Works in Source or +Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, +each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) patent +license to make, have made, use, offer to sell, sell, import, and otherwise +transfer the Work, where such license applies only to those patent claims +licensable by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) with the Work +to which such Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim in a lawsuit) +alleging that the Work or a Contribution incorporated within the Work +constitutes direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the date +such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and in +Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy +of this License; and + + 2. You must cause any modified files to carry prominent notices stating that +You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from the +Source form of the Work, excluding those notices that do not pertain to any part +of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy of +the attribution notices contained within such NOTICE file, excluding those +notices that do not pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. + +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without any +additional terms or conditions. Notwithstanding the above, nothing herein shall +supersede or modify the terms of any separate license agreement you may have +executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, +trademarks, service marks, or product names of the Licensor, except as required +for reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any warranties +or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in +tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to in +writing, shall any Contributor be liable to You for damages, including any +direct, indirect, special, incidental, or consequential damages of any character +arising as a result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, work stoppage, +computer failure or malfunction, or any and all other commercial damages or +losses), even if such Contributor has been advised of the possibility of such +damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or +Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You agree to +indemnify, defend, and hold each Contributor harmless for any liability incurred +by, or claims asserted against, such Contributor by reason of your accepting any +such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +*************************************************************************** + +%%The following software may be included in this product: +Apache BCEL (Byte Code Engineering Library) + +Use of any of this software is governed by the terms of the license below: + +* Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + * + * 1. Definitions. + * + * "License" shall mean the terms and conditions for use, reproduction, + * and distribution as defined by Sections 1 through 9 of this document. + * + * "Licensor" shall mean the copyright owner or entity authorized by + * the copyright owner that is granting the License. + * + * "Legal Entity" shall mean the union of the acting entity and all + * other entities that control, are controlled by, or are under common + * control with that entity. For the purposes of this definition, + * "control" means (i) the power, direct or indirect, to cause the + * direction or management of such entity, whether by contract or + * otherwise, or (ii) ownership of fifty percent (50%) or more of the + * outstanding shares, or (iii) beneficial ownership of such entity. + * + * "You" (or "Your") shall mean an individual or Legal Entity + * exercising permissions granted by this License. + * + * "Source" form shall mean the preferred form for making modifications, + * including but not limited to software source code, documentation + * source, and configuration files. + * + * "Object" form shall mean any form resulting from mechanical + * transformation or translation of a Source form, including but + * not limited to compiled object code, generated documentation, + * and conversions to other media types. + * + * "Work" shall mean the work of authorship, whether in Source or + * Object form, made available under the License, as indicated by a + * copyright notice that is included in or attached to the work + * (an example is provided in the Appendix below). + * + * "Derivative Works" shall mean any work, whether in Source or Object + * form, that is based on (or derived from) the Work and for which the + * editorial revisions, annotations, elaborations, or other modifications + * represent, as a whole, an original work of authorship. For the purposes + * of this License, Derivative Works shall not include works that remain + * separable from, or merely link (or bind by name) to the interfaces of, + * the Work and Derivative Works thereof. + * + * "Contribution" shall mean any work of authorship, including + * the original version of the Work and any modifications or additions + * to that Work or Derivative Works thereof, that is intentionally + * submitted to Licensor for inclusion in the Work by the copyright owner + * or by an individual or Legal Entity authorized to submit on behalf of + * the copyright owner. For the purposes of this definition, "submitted" + * means any form of electronic, verbal, or written communication sent + * to the Licensor or its representatives, including but not limited to + * communication on electronic mailing lists, source code control systems, + * and issue tracking systems that are managed by, or on behalf of, the + * Licensor for the purpose of discussing and improving the Work, but + * excluding communication that is conspicuously marked or otherwise + * designated in writing by the copyright owner as "Not a Contribution." + * + * "Contributor" shall mean Licensor and any individual or Legal Entity + * on behalf of whom a Contribution has been received by Licensor and + * subsequently incorporated within the Work. + * + * 2. Grant of Copyright License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * copyright license to reproduce, prepare Derivative Works of, + * publicly display, publicly perform, sublicense, and distribute the + * Work and such Derivative Works in Source or Object form. + * + * 3. Grant of Patent License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * (except as stated in this section) patent license to make, have made, + * use, offer to sell, sell, import, and otherwise transfer the Work, + * where such license applies only to those patent claims licensable + * by such Contributor that are necessarily infringed by their + * Contribution(s) alone or by combination of their Contribution(s) + * with the Work to which such Contribution(s) was submitted. If You + * institute patent litigation against any entity (including a + * cross-claim or counterclaim in a lawsuit) alleging that the Work + * or a Contribution incorporated within the Work constitutes direct + * or contributory patent infringement, then any patent licenses + * granted to You under this License for that Work shall terminate + * as of the date such litigation is filed. + * + * 4. Redistribution. You may reproduce and distribute copies of the + * Work or Derivative Works thereof in any medium, with or without + * modifications, and in Source or Object form, provided that You + * meet the following conditions: + * + * (a) You must give any other recipients of the Work or + * Derivative Works a copy of this License; and + * + * (b) You must cause any modified files to carry prominent notices + * stating that You changed the files; and + * + * (c) You must retain, in the Source form of any Derivative Works + * that You distribute, all copyright, patent, trademark, and + * attribution notices from the Source form of the Work, + * excluding those notices that do not pertain to any part of + * the Derivative Works; and + * + * (d) If the Work includes a "NOTICE" text file as part of its + * distribution, then any Derivative Works that You distribute must + * include a readable copy of the attribution notices contained + * within such NOTICE file, excluding those notices that do not + * pertain to any part of the Derivative Works, in at least one + * of the following places: within a NOTICE text file distributed + * as part of the Derivative Works; within the Source form or + * documentation, if provided along with the Derivative Works; or, + * within a display generated by the Derivative Works, if and + * wherever such third-party notices normally appear. The contents + * of the NOTICE file are for informational purposes only and + * do not modify the License. You may add Your own attribution + * notices within Derivative Works that You distribute, alongside + * or as an addendum to the NOTICE text from the Work, provided + * that such additional attribution notices cannot be construed + * as modifying the License. + * + * You may add Your own copyright statement to Your modifications and + * may provide additional or different license terms and conditions + * for use, reproduction, or distribution of Your modifications, or + * for any such Derivative Works as a whole, provided Your use, + * reproduction, and distribution of the Work otherwise complies with + * the conditions stated in this License. + * + * 5. Submission of Contributions. Unless You explicitly state otherwise, + * any Contribution intentionally submitted for inclusion in the Work + * by You to the Licensor shall be under the terms and conditions of + * this License, without any additional terms or conditions. + * Notwithstanding the above, nothing herein shall supersede or modify + * the terms of any separate license agreement you may have executed + * with Licensor regarding such Contributions. + * + * 6. Trademarks. This License does not grant permission to use the trade + * names, trademarks, service marks, or product names of the Licensor, + * except as required for reasonable and customary use in describing the + * origin of the Work and reproducing the content of the NOTICE file. + * + * 7. Disclaimer of Warranty. Unless required by applicable law or + * agreed to in writing, Licensor provides the Work (and each + * Contributor provides its Contributions) on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied, including, without limitation, any warranties or conditions + * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + * PARTICULAR PURPOSE. You are solely responsible for determining the + * appropriateness of using or redistributing the Work and assume any + * risks associated with Your exercise of permissions under this License. + * + * 8. Limitation of Liability. In no event and under no legal theory, + * whether in tort (including negligence), contract, or otherwise, + * unless required by applicable law (such as deliberate and grossly + * negligent acts) or agreed to in writing, shall any Contributor be + * liable to You for damages, including any direct, indirect, special, + * incidental, or consequential damages of any character arising as a + * result of this License or out of the use or inability to use the + * Work (including but not limited to damages for loss of goodwill, + * work stoppage, computer failure or malfunction, or any and all + * other commercial damages or losses), even if such Contributor + * has been advised of the possibility of such damages. + * + * 9. Accepting Warranty or Additional Liability. While redistributing + * the Work or Derivative Works thereof, You may choose to offer, + * and charge a fee for, acceptance of support, warranty, indemnity, + * or other liability obligations and/or rights consistent with this + * License. However, in accepting such obligations, You may act only + * on Your own behalf and on Your sole responsibility, not on behalf + * of any other Contributor, and only if You agree to indemnify, + * defend, and hold each Contributor harmless for any liability + * incurred by, or claims asserted against, such Contributor by reason + * of your accepting any such warranty or additional liability. + * + * END OF TERMS AND CONDITIONS + * + * APPENDIX: How to apply the Apache License to your work. + * + * To apply the Apache License to your work, attach the following + * boilerplate notice, with the fields enclosed by brackets "[]" + * replaced with your own identifying information. (Don't include + * the brackets!) The text should be enclosed in the appropriate + * comment syntax for the file format. We also recommend that a + * file or class name and description of purpose be included on the + * same "printed page" as the copyright notice for easier + * identification within third-party archives. + * + * Copyright [yyyy] [name of copyright owner] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +*************************************************************************** + +%%The following software may be included in this product: +Jetty HTTP Server + +Use of any of this software is governed by the terms of the license below: + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +Additional License(s) + +All source files carry one of three copyrights: + +Copyright (c) 1999 The Apache Software Foundation. All rights reserved. +Copyright (c) 1996 Mort Bay Consulting Pty. Ltd. All rights reserved. +Copyright (c) 1996 Optimus Solutions Pty. Ltd. All rights reserved. + +One file is under the LGPL. This appears to be an oversight and it's +in an optional "extras" +component that we don't ship. + +*************************************************************************** + +%%The following software may be included in this product: +Apache Jakarta Commons + +Use of any of this software is governed by the terms of the license below: + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*************************************************************************** + +%%The following software may be included in this product: +Ant + +Use of any of this software is governed by the terms of the license below: + +License +The Apache Software License Version 2.0 + +The Apache Software License Version 2.0 applies to all releases of Ant starting +with ant 1.6.1 + +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + * + * 1. Definitions. + * + * "License" shall mean the terms and conditions for use, reproduction, + * and distribution as defined by Sections 1 through 9 of this document. + * + * "Licensor" shall mean the copyright owner or entity authorized by + * the copyright owner that is granting the License. + * + * "Legal Entity" shall mean the union of the acting entity and all + * other entities that control, are controlled by, or are under common + * control with that entity. For the purposes of this definition, + * "control" means (i) the power, direct or indirect, to cause the + * direction or management of such entity, whether by contract or + * otherwise, or (ii) ownership of fifty percent (50%) or more of the + * outstanding shares, or (iii) beneficial ownership of such entity. + * + * "You" (or "Your") shall mean an individual or Legal Entity + * exercising permissions granted by this License. + * + * "Source" form shall mean the preferred form for making modifications, + * including but not limited to software source code, documentation + * source, and configuration files. + * + * "Object" form shall mean any form resulting from mechanical + * transformation or translation of a Source form, including but + * not limited to compiled object code, generated documentation, + * and conversions to other media types. + * + * "Work" shall mean the work of authorship, whether in Source or + * Object form, made available under the License, as indicated by a + * copyright notice that is included in or attached to the work + * (an example is provided in the Appendix below). + * + * "Derivative Works" shall mean any work, whether in Source or Object + * form, that is based on (or derived from) the Work and for which the + * editorial revisions, annotations, elaborations, or other modifications + * represent, as a whole, an original work of authorship. For the purposes + * of this License, Derivative Works shall not include works that remain + * separable from, or merely link (or bind by name) to the interfaces of, + * the Work and Derivative Works thereof. + * + * "Contribution" shall mean any work of authorship, including + * the original version of the Work and any modifications or additions + * to that Work or Derivative Works thereof, that is intentionally + * submitted to Licensor for inclusion in the Work by the copyright owner + * or by an individual or Legal Entity authorized to submit on behalf of + * the copyright owner. For the purposes of this definition, "submitted" + * means any form of electronic, verbal, or written communication sent + * to the Licensor or its representatives, including but not limited to + * communication on electronic mailing lists, source code control systems, + * and issue tracking systems that are managed by, or on behalf of, the + * Licensor for the purpose of discussing and improving the Work, but + * excluding communication that is conspicuously marked or otherwise + * designated in writing by the copyright owner as "Not a Contribution." + * + * "Contributor" shall mean Licensor and any individual or Legal Entity + * on behalf of whom a Contribution has been received by Licensor and + * subsequently incorporated within the Work. + * + * 2. Grant of Copyright License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * copyright license to reproduce, prepare Derivative Works of, + * publicly display, publicly perform, sublicense, and distribute the + * Work and such Derivative Works in Source or Object form. + * + * 3. Grant of Patent License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * (except as stated in this section) patent license to make, have made, + * use, offer to sell, sell, import, and otherwise transfer the Work, + * where such license applies only to those patent claims licensable + * by such Contributor that are necessarily infringed by their + * Contribution(s) alone or by combination of their Contribution(s) + * with the Work to which such Contribution(s) was submitted. If You + * institute patent litigation against any entity (including a + * cross-claim or counterclaim in a lawsuit) alleging that the Work + * or a Contribution incorporated within the Work constitutes direct + * or contributory patent infringement, then any patent licenses + * granted to You under this License for that Work shall terminate + * as of the date such litigation is filed. + * + * 4. Redistribution. You may reproduce and distribute copies of the + * Work or Derivative Works thereof in any medium, with or without + * modifications, and in Source or Object form, provided that You + * meet the following conditions: + * + * (a) You must give any other recipients of the Work or + * Derivative Works a copy of this License; and + * + * (b) You must cause any modified files to carry prominent notices + * stating that You changed the files; and + * + * (c) You must retain, in the Source form of any Derivative Works + * that You distribute, all copyright, patent, trademark, and + * attribution notices from the Source form of the Work, + * excluding those notices that do not pertain to any part of + * the Derivative Works; and + * + * (d) If the Work includes a "NOTICE" text file as part of its + * distribution, then any Derivative Works that You distribute must + * include a readable copy of the attribution notices contained + * within such NOTICE file, excluding those notices that do not + * pertain to any part of the Derivative Works, in at least one + * of the following places: within a NOTICE text file distributed + * as part of the Derivative Works; within the Source form or + * documentation, if provided along with the Derivative Works; or, + * within a display generated by the Derivative Works, if and + * wherever such third-party notices normally appear. The contents + * of the NOTICE file are for informational purposes only and + * do not modify the License. You may add Your own attribution + * notices within Derivative Works that You distribute, alongside + * or as an addendum to the NOTICE text from the Work, provided + * that such additional attribution notices cannot be construed + * as modifying the License. + * + * You may add Your own copyright statement to Your modifications and + * may provide additional or different license terms and conditions + * for use, reproduction, or distribution of Your modifications, or + * for any such Derivative Works as a whole, provided Your use, + * reproduction, and distribution of the Work otherwise complies with + * the conditions stated in this License. + * + * 5. Submission of Contributions. Unless You explicitly state otherwise, + * any Contribution intentionally submitted for inclusion in the Work + * by You to the Licensor shall be under the terms and conditions of + * this License, without any additional terms or conditions. + * Notwithstanding the above, nothing herein shall supersede or modify + * the terms of any separate license agreement you may have executed + * with Licensor regarding such Contributions. + * + * 6. Trademarks. This License does not grant permission to use the trade + * names, trademarks, service marks, or product names of the Licensor, + * except as required for reasonable and customary use in describing the + * origin of the Work and reproducing the content of the NOTICE file. + * + * 7. Disclaimer of Warranty. Unless required by applicable law or + * agreed to in writing, Licensor provides the Work (and each + * Contributor provides its Contributions) on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied, including, without limitation, any warranties or conditions + * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + * PARTICULAR PURPOSE. You are solely responsible for determining the + * appropriateness of using or redistributing the Work and assume any + * risks associated with Your exercise of permissions under this License. + * + * 8. Limitation of Liability. In no event and under no legal theory, + * whether in tort (including negligence), contract, or otherwise, + * unless required by applicable law (such as deliberate and grossly + * negligent acts) or agreed to in writing, shall any Contributor be + * liable to You for damages, including any direct, indirect, special, + * incidental, or consequential damages of any character arising as a + * result of this License or out of the use or inability to use the + * Work (including but not limited to damages for loss of goodwill, + * work stoppage, computer failure or malfunction, or any and all + * other commercial damages or losses), even if such Contributor + * has been advised of the possibility of such damages. + * + * 9. Accepting Warranty or Additional Liability. While redistributing + * the Work or Derivative Works thereof, You may choose to offer, + * and charge a fee for, acceptance of support, warranty, indemnity, + * or other liability obligations and/or rights consistent with this + * License. However, in accepting such obligations, You may act only + * on Your own behalf and on Your sole responsibility, not on behalf + * of any other Contributor, and only if You agree to indemnify, + * defend, and hold each Contributor harmless for any liability + * incurred by, or claims asserted against, such Contributor by reason + * of your accepting any such warranty or additional liability. + * + * END OF TERMS AND CONDITIONS + * + * APPENDIX: How to apply the Apache License to your work. + * + * To apply the Apache License to your work, attach the following + * boilerplate notice, with the fields enclosed by brackets "[]" + * replaced with your own identifying information. (Don't include + * the brackets!) The text should be enclosed in the appropriate + * comment syntax for the file format. We also recommend that a + * file or class name and description of purpose be included on the + * same "printed page" as the copyright notice for easier + * identification within third-party archives. + * + * Copyright [yyyy] Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +You can download the original license file here. + +The License is accompanied by a NOTICE + + ========================================================================= + == NOTICE file corresponding to the section 4 d of == + == the Apache License, Version 2.0, == + == in this case for the Apache Ant distribution. == + ========================================================================= + + This product includes software developed by + The Apache Software Foundation (http://www.apache.org/). + + This product includes also software developed by : + - the W3C consortium (http://www.w3c.org) , + - the SAX project (http://www.saxproject.org) + + Please read the different LICENSE files present in the root directory of + this distribution. + + The names "Ant" and "Apache Software Foundation" must not be used to + endorse or promote products derived from this software without prior + written permission. For written permission, please contact + apache@apache.org. + +The Apache Software License, Version 1.1 + +The Apache Software License, Version 1.1, applies to all versions of up to ant +1.6.0 included. + +/* + * ============================================================================ + * The Apache Software License, Version 1.1 + * ============================================================================ + * + * Copyright (C) 2000-2003 The Apache Software Foundation. All + * rights reserved. + * + * Redistribution and use in source and binary forms, with or without modifica- + * tion, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. The end-user documentation included with the redistribution, if any, must + * include the following acknowledgment: "This product includes software + * developed by the Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, if + * and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Ant" and "Apache Software Foundation" must not be used to + * endorse or promote products derived from this software without prior + * written permission. For written permission, please contact + * apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", nor may + * "Apache" appear in their name, without prior written permission of the + * Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- + * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This software consists of voluntary contributions made by many individuals + * on behalf of the Apache Software Foundation. For more information on the + * Apache Software Foundation, please see . + * + */ + + +Additional License(s) + +none + +*************************************************************************** + +%%The following software may be included in this product: +SAX + +Use of any of this software is governed by the terms of the license below: + +There is not a license - it is in the public domain + +Copyright Disclaimers + +This page includes statements to that effect by David Megginson, who would have +been able to claim copyright for the original work. + +SAX 1.0 + +Version 1.0 of the Simple API for XML (SAX), created collectively by the +membership of the XML-DEV mailing list, is hereby released into the public +domain. + +No one owns SAX: you may use it freely in both commercial and non-commercial +applications, bundle it with your software distribution, include it on a CD-ROM, +list the source code in a book, mirror the documentation at your own web site, +or use it in any other way you see fit. + +SAX 2.0 + +I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and +release all of the SAX 2.0 source code, compiled code, and documentation +contained in this distribution into the Public Domain. SAX comes with NO +WARRANTY or guarantee of fitness for any purpose. + + David Megginson, david@megginson.com + 2000-05-05 + +Additional License(s) + +Public domain software + +*************************************************************************** + +%%The following software may be included in this product: +Ant-Contrib + +Use of any of this software is governed by the terms of the license below: + +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001-2003 Ant-Contrib project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Ant-Contrib project (http://sourceforge.net/projects/ant-contrib)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The name Ant-Contrib must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact + * ant-contrib-developers@lists.sourceforge.net. + * + * 5. Products derived from this software may not be called "Ant-Contrib" + * nor may "Ant-Contrib" appear in their names without prior written + * permission of the Ant-Contrib project. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE ANT-CONTRIB PROJECT OR ITS + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + */ + +*************************************************************************** + + diff --git a/ext/java_card_kit-3_0_3/lib/api_classic.jar b/ext/java_card_kit-3_0_3/lib/api_classic.jar new file mode 100644 index 0000000..a7d5bb5 Binary files /dev/null and b/ext/java_card_kit-3_0_3/lib/api_classic.jar differ diff --git a/ext/java_card_kit-3_0_3/lib/api_connected.jar b/ext/java_card_kit-3_0_3/lib/api_connected.jar new file mode 100644 index 0000000..14812ba Binary files /dev/null and b/ext/java_card_kit-3_0_3/lib/api_connected.jar differ diff --git a/ext/java_card_kit-3_0_3/lib/logging.properties b/ext/java_card_kit-3_0_3/lib/logging.properties new file mode 100644 index 0000000..5f34c9d --- /dev/null +++ b/ext/java_card_kit-3_0_3/lib/logging.properties @@ -0,0 +1,64 @@ +# Copyright (c) 2010, 2010, Oracle and/or its affiliates. All rights reserved. + +# Properties file which configures the operation of the JDK +# logging facility. + +# The system will look for this config file, first using +# a System property specified at startup: +# +# >java -Djava.util.logging.config.file=myLoggingConfigFilePath +# +# If this property is not specified, then the config file is +# retrieved from its default location at: +# +# JDK_HOME/jre/lib/logging.properties + +# Global logging properties. +# ------------------------------------------ +# The set of handlers to be loaded upon startup. +# Comma-separated list of class names. +# java.util.logging.ConsoleHandler +handlers=com.sun.javacard.tools.util.JCConsoleHandler, java.util.logging.FileHandler + +# Default global logging level. +# Loggers and Handlers may override this level +.level=ALL + +# Loggers +# ------------------------------------------ +# Loggers are usually attached to packages. +# Here, the level for each package is specified. +# The global level is used by default, so levels +# specified here simply act as an override. +#com.sun.javacard.offcardinstaller=ALL + +# Handlers +# ----------------------------------------- + +com.sun.javacard.tools.util.JCConsoleHandler.level=ALL +com.sun.javacard.tools.util.JCConsoleHandler.formatter=com.sun.javacard.tools.util.JCToolsFormatter +com.sun.javacard.tools.util.JCConsoleHandler.filter=com.sun.javacard.tools.util.ConsoleFilter + +# --- FileHandler --- +# Override of global logging level +java.util.logging.FileHandler.level=ALL + +# Naming style for the output file: +# (The output file is placed in the directory +# defined by the "user.home" System property.) +java.util.logging.FileHandler.pattern=%h/java%u.log + +# Limiting size of output file in bytes: +java.util.logging.FileHandler.limit=50000 + +# Number of output files to cycle through, by appending an +# integer to the base file name: +java.util.logging.FileHandler.count=10 + +# Style of output (Simple or XML): +java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter + +java.util.logging.FileHandler.append=true + +#--------------print class method info +printCurrentClassAndMethod = false diff --git a/ext/java_card_kit-3_0_3/lib/tools.jar b/ext/java_card_kit-3_0_3/lib/tools.jar new file mode 100644 index 0000000..f5c9b23 Binary files /dev/null and b/ext/java_card_kit-3_0_3/lib/tools.jar differ diff --git a/ext/java_card_kit-3_0_3/shared/Java_clr_hori.gif b/ext/java_card_kit-3_0_3/shared/Java_clr_hori.gif new file mode 100644 index 0000000..10eab90 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/Java_clr_hori.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/Java_clr_hori_interval.gif b/ext/java_card_kit-3_0_3/shared/Java_clr_hori_interval.gif new file mode 100644 index 0000000..3230819 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/Java_clr_hori_interval.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/Java_clr_hori_small.gif b/ext/java_card_kit-3_0_3/shared/Java_clr_hori_small.gif new file mode 100644 index 0000000..fdb9030 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/Java_clr_hori_small.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/downicon.gif b/ext/java_card_kit-3_0_3/shared/downicon.gif new file mode 100644 index 0000000..d178dd6 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/downicon.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/oracle.gif b/ext/java_card_kit-3_0_3/shared/oracle.gif new file mode 100644 index 0000000..4a98827 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/oracle.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/smallOracleLogo.gif b/ext/java_card_kit-3_0_3/shared/smallOracleLogo.gif new file mode 100644 index 0000000..d06d49d Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/smallOracleLogo.gif differ diff --git a/ext/java_card_kit-3_0_3/shared/topicon.gif b/ext/java_card_kit-3_0_3/shared/topicon.gif new file mode 100644 index 0000000..f4dfbf3 Binary files /dev/null and b/ext/java_card_kit-3_0_3/shared/topicon.gif differ diff --git a/ext/visa_openplatform-2_0/visa/openplatform/javacard/openplatform.exp b/ext/visa_openplatform-2_0/visa/openplatform/javacard/openplatform.exp new file mode 100644 index 0000000..b889504 Binary files /dev/null and b/ext/visa_openplatform-2_0/visa/openplatform/javacard/openplatform.exp differ diff --git a/ext/visa_openplatform-2_0/visaop20.jar b/ext/visa_openplatform-2_0/visaop20.jar new file mode 100644 index 0000000..c1fe3b8 Binary files /dev/null and b/ext/visa_openplatform-2_0/visaop20.jar differ diff --git a/jcardsim-2.2.2-all.jar b/jcardsim-2.2.2-all.jar new file mode 100644 index 0000000..0ac10c0 Binary files /dev/null and b/jcardsim-2.2.2-all.jar differ diff --git a/jcbuild.xml b/jcbuild.xml new file mode 100644 index 0000000..eaf73ab --- /dev/null +++ b/jcbuild.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/jcardsim-2.2.2-all.jar b/lib/jcardsim-2.2.2-all.jar new file mode 100644 index 0000000..0ac10c0 Binary files /dev/null and b/lib/jcardsim-2.2.2-all.jar differ diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/src/applets/EC_Consts.java b/src/applets/EC_Consts.java new file mode 100644 index 0000000..7923c91 --- /dev/null +++ b/src/applets/EC_Consts.java @@ -0,0 +1,184 @@ +/** + * + */ +package applets; + +import javacard.framework.ISOException; +import javacard.framework.Util; +import javacard.security.ECPrivateKey; +import javacard.security.ECPublicKey; +import javacard.security.KeyBuilder; + +public class EC_Consts { + public static byte[] EC_FP_P = null; + public static byte[] EC_FP_A = null; + public static byte[] EC_FP_B = null; + public static byte[] EC_FP_G_X = null; + public static byte[] EC_FP_G_Y = null; + public static byte[] EC_FP_R = null; + public static short EC_FP_K = 1; + + // secp192r1 from http://www.secg.org/sec2-v2.pdf + public static final byte[] EC192_FP_P = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF}; + public static final byte[] EC192_FP_A = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFE, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC}; + public static final byte[] EC192_FP_B = new byte[]{ + (byte) 0x64, (byte) 0x21, (byte) 0x05, (byte) 0x19, + (byte) 0xE5, (byte) 0x9C, (byte) 0x80, (byte) 0xE7, + (byte) 0x0F, (byte) 0xA7, (byte) 0xE9, (byte) 0xAB, + (byte) 0x72, (byte) 0x24, (byte) 0x30, (byte) 0x49, + (byte) 0xFE, (byte) 0xB8, (byte) 0xDE, (byte) 0xEC, + (byte) 0xC1, (byte) 0x46, (byte) 0xB9, (byte) 0xB1}; + // G in compressed form / first part of ucompressed + public static final byte[] EC192_FP_G_X = new byte[]{ + (byte) 0x18, (byte) 0x8D, (byte) 0xA8, (byte) 0x0E, + (byte) 0xB0, (byte) 0x30, (byte) 0x90, (byte) 0xF6, + (byte) 0x7C, (byte) 0xBF, (byte) 0x20, (byte) 0xEB, + (byte) 0x43, (byte) 0xA1, (byte) 0x88, (byte) 0x00, + (byte) 0xF4, (byte) 0xFF, (byte) 0x0A, (byte) 0xFD, + (byte) 0x82, (byte) 0xFF, (byte) 0x10, (byte) 0x12}; + // second part of G uncompressed + public static final byte[] EC192_FP_G_Y = new byte[]{ + (byte) 0x07, (byte) 0x19, (byte) 0x2B, (byte) 0x95, + (byte) 0xFF, (byte) 0xC8, (byte) 0xDA, (byte) 0x78, + (byte) 0x63, (byte) 0x10, (byte) 0x11, (byte) 0xED, + (byte) 0x6B, (byte) 0x24, (byte) 0xCD, (byte) 0xD5, + (byte) 0x73, (byte) 0xF9, (byte) 0x77, (byte) 0xA1, + (byte) 0x1E, (byte) 0x79, (byte) 0x48, (byte) 0x11}; + // Order of G + public static final byte[] EC192_FP_R = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0x99, (byte) 0xDE, (byte) 0xF8, (byte) 0x36, + (byte) 0x14, (byte) 0x6B, (byte) 0xC9, (byte) 0xB1, + (byte) 0xB4, (byte) 0xD2, (byte) 0x28, (byte) 0x31}; + // cofactor of G + public static final short EC192_FP_K = 1; + + // secp256r1 from http://www.secg.org/sec2-v2.pdf + public static final byte[] EC256_FP_P = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF}; + public static final byte[] EC256_FP_A = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFC}; + public static final byte[] EC256_FP_B = new byte[]{ + (byte) 0x5A, (byte) 0xC6, (byte) 0x35, (byte) 0xD8, + (byte) 0xAA, (byte) 0x3A, (byte) 0x93, (byte) 0xE7, + (byte) 0xB3, (byte) 0xEB, (byte) 0xBD, (byte) 0x55, + (byte) 0x76, (byte) 0x98, (byte) 0x86, (byte) 0xBC, + (byte) 0x65, (byte) 0x1D, (byte) 0x06, (byte) 0xB0, + (byte) 0xCC, (byte) 0x53, (byte) 0xB0, (byte) 0xF6, + (byte) 0x3B, (byte) 0xCE, (byte) 0x3C, (byte) 0x3E, + (byte) 0x27, (byte) 0xD2, (byte) 0x60, (byte) 0x4B}; + // G in compressed form / first part of ucompressed + public static final byte[] EC256_FP_G_X = new byte[]{ + (byte) 0x6B, (byte) 0x17, (byte) 0xD1, (byte) 0xF2, + (byte) 0xE1, (byte) 0x2C, (byte) 0x42, (byte) 0x47, + (byte) 0xF8, (byte) 0xBC, (byte) 0xE6, (byte) 0xE5, + (byte) 0x63, (byte) 0xA4, (byte) 0x40, (byte) 0xF2, + (byte) 0x77, (byte) 0x03, (byte) 0x7D, (byte) 0x81, + (byte) 0x2D, (byte) 0xEB, (byte) 0x33, (byte) 0xA0, + (byte) 0xF4, (byte) 0xA1, (byte) 0x39, (byte) 0x45, + (byte) 0xD8, (byte) 0x98, (byte) 0xC2, (byte) 0x96}; + // second part of G uncompressed + public static final byte[] EC256_FP_G_Y = new byte[]{ + (byte) 0x4F, (byte) 0xE3, (byte) 0x42, (byte) 0xE2, + (byte) 0xFE, (byte) 0x1A, (byte) 0x7F, (byte) 0x9B, + (byte) 0x8E, (byte) 0xE7, (byte) 0xEB, (byte) 0x4A, + (byte) 0x7C, (byte) 0x0F, (byte) 0x9E, (byte) 0x16, + (byte) 0x2B, (byte) 0xCE, (byte) 0x33, (byte) 0x57, + (byte) 0x6B, (byte) 0x31, (byte) 0x5E, (byte) 0xCE, + (byte) 0xCB, (byte) 0xB6, (byte) 0x40, (byte) 0x68, + (byte) 0x37, (byte) 0xBF, (byte) 0x51, (byte) 0xF5}; + // Order of G + public static final byte[] EC256_FP_R = new byte[]{ + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, + (byte) 0xBC, (byte) 0xE6, (byte) 0xFA, (byte) 0xAD, + (byte) 0xA7, (byte) 0x17, (byte) 0x9E, (byte) 0x84, + (byte) 0xF3, (byte) 0xB9, (byte) 0xCA, (byte) 0xC2, + (byte) 0xFC, (byte) 0x63, (byte) 0x25, (byte) 0x51}; + // cofactor of G + public static final short EC256_FP_K = 1; + + // TODO: add parameters for longer lengths + + public static void setECKeyParams(ECPublicKey ecPubKey, ECPrivateKey ecPrivKey, short ecLength, byte[] auxBuffer) { + // Select proper courve parameters + switch (ecLength) { + case (short) 192: { + EC_FP_P = EC192_FP_P; + EC_FP_A = EC192_FP_A; + EC_FP_B = EC192_FP_B; + EC_FP_G_X = EC192_FP_G_X; + EC_FP_G_Y = EC192_FP_G_Y; + EC_FP_R = EC192_FP_R; + EC_FP_K = EC192_FP_K; + break; + } + case (short) 256: { + EC_FP_P = EC256_FP_P; + EC_FP_A = EC256_FP_A; + EC_FP_B = EC256_FP_B; + EC_FP_G_X = EC256_FP_G_X; + EC_FP_G_Y = EC256_FP_G_Y; + EC_FP_R = EC256_FP_R; + EC_FP_K = EC256_FP_K; + break; + } + default: { + ISOException.throwIt((short) -1); + } + } + // prepare an ANSI X9.62 uncompressed EC point representation for G + short gSize = (short) 1; + gSize += (short) EC_FP_G_X.length; + gSize += (short) EC_FP_G_Y.length; + auxBuffer[0] = 0x04; + short off = 1; + off = Util.arrayCopy(EC_FP_G_X, (short) 0, auxBuffer, off, (short) EC_FP_G_X.length); + Util.arrayCopy(EC_FP_G_Y, (short) 0, auxBuffer, off, (short) EC_FP_G_Y.length); + + // pre-set basic EC parameters: + ecPubKey.setFieldFP(EC_FP_P, (short) 0, (short) EC_FP_P.length); + ecPubKey.setA(EC_FP_A, (short) 0, (short) EC_FP_A.length); + ecPubKey.setB(EC_FP_B, (short) 0, (short) EC_FP_B.length); + ecPubKey.setG(auxBuffer, (short) 0, gSize); + ecPubKey.setR(EC_FP_R, (short) 0, (short) EC_FP_R.length); + ecPubKey.setK(EC_FP_K); + + ecPrivKey.setFieldFP(EC_FP_P, (short) 0, (short) EC_FP_P.length); + ecPrivKey.setA(EC_FP_A, (short) 0, (short) EC_FP_A.length); + ecPrivKey.setB(EC_FP_B, (short) 0, (short) EC_FP_B.length); + ecPrivKey.setG(auxBuffer, (short) 0, gSize); + ecPrivKey.setR(EC_FP_R, (short) 0, (short) EC_FP_R.length); + ecPrivKey.setK(EC_FP_K); + } +} diff --git a/src/applets/SimpleECCApplet.java b/src/applets/SimpleECCApplet.java new file mode 100644 index 0000000..325d834 --- /dev/null +++ b/src/applets/SimpleECCApplet.java @@ -0,0 +1,351 @@ +/* + * PACKAGEID: 4C6162616B417070 + * APPLETID: 4C6162616B4170706C6574 + */ +package applets; + +import javacard.framework.*; +import javacard.security.*; +import javacardx.crypto.*; + +public class SimpleECCApplet extends javacard.framework.Applet +{ + // MAIN INSTRUCTION CLASS + final static byte CLA_SIMPLEECCAPPLET = (byte) 0xB0; + + // INSTRUCTIONS + final static byte INS_GENERATEKEY = (byte) 0x5a; + final static byte INS_ALLOCATEKEYPAIRS = (byte) 0x5b; + final static byte INS_ALLOCATEKEYPAIR = (byte) 0x5c; + final static byte INS_DERIVEECDHSECRET = (byte) 0x5d; + + + final static short ARRAY_LENGTH = (short) 0xff; + final static byte AES_BLOCK_LENGTH = (short) 0x16; + + final static short EC_LENGTH_BITS = KeyBuilder.LENGTH_EC_FP_192; + //final static short EC_LENGTH_BITS = KeyBuilder.LENGTH_EC_FP_160; + //final static short EC_LENGTH_BITS = (short) 256; +/* + public static final byte[] EC192_FP_PUBLICW = new byte[]{ + (byte) 0x04, (byte) 0xC9, (byte) 0xC0, (byte) 0xED, (byte) 0xFB, (byte) 0x27, + (byte) 0xB7, (byte) 0x1E, (byte) 0xBE, (byte) 0x30, (byte) 0x93, (byte) 0xFC, + (byte) 0x4F, (byte) 0x33, (byte) 0x76, (byte) 0x38, (byte) 0xCE, (byte) 0xE0, + (byte) 0x2F, (byte) 0x78, (byte) 0xF6, (byte) 0x3C, (byte) 0xEA, (byte) 0x90, + (byte) 0x22, (byte) 0x61, (byte) 0x32, (byte) 0x8E, (byte) 0x9F, (byte) 0x03, + (byte) 0x8A, (byte) 0xFD, (byte) 0x60, (byte) 0xA0, (byte) 0xCE, (byte) 0x01, + (byte) 0x9B, (byte) 0x76, (byte) 0x34, (byte) 0x59, (byte) 0x79, (byte) 0x64, + (byte) 0xD7, (byte) 0x79, (byte) 0x8E, (byte) 0x3B, (byte) 0x16, (byte) 0xD5, + (byte) 0x15}; + */ + public static final byte[] EC192_FP_PUBLICW = new byte[]{ + (byte) 0x04, + (byte) 0x9d, (byte) 0x42, (byte) 0x76, (byte) 0x9d, (byte) 0xfd, (byte) 0xbe, + (byte) 0x11, (byte) 0x3a, (byte) 0x85, (byte) 0x1b, (byte) 0xb6, (byte) 0xb0, + (byte) 0x1b, (byte) 0x1a, (byte) 0x51, (byte) 0x5d, (byte) 0x89, (byte) 0x3b, + (byte) 0x5a, (byte) 0xdb, (byte) 0xc1, (byte) 0xf6, (byte) 0x13, (byte) 0x29, + (byte) 0x74, (byte) 0x74, (byte) 0x9a, (byte) 0xc0, (byte) 0x96, (byte) 0x7a, + (byte) 0x8f, (byte) 0xf4, (byte) 0xcc, (byte) 0x54, (byte) 0xd9, (byte) 0x31, + (byte) 0x87, (byte) 0x60, (byte) 0x2d, (byte) 0xd6, (byte) 0x7e, (byte) 0xb3, + (byte) 0xd2, (byte) 0x29, (byte) 0x70a, (byte) 0xca, (byte) 0x2ca}; + + + private KeyPair ecKeyPair = null; + private KeyPair ecKeyPair128 = null; + private KeyPair ecKeyPair160 = null; + private KeyPair ecKeyPair192 = null; + private KeyPair ecKeyPair256 = null; + private ECPublicKey ecPubKey = null; + private ECPublicKey ecPubKey128 = null; + private ECPublicKey ecPubKey160 = null; + private ECPublicKey ecPubKey192 = null; + private ECPublicKey ecPubKey256 = null; + private ECPrivateKey ecPrivKey = null; + private ECPrivateKey ecPrivKey128 = null; + private ECPrivateKey ecPrivKey160 = null; + private ECPrivateKey ecPrivKey192 = null; + private ECPrivateKey ecPrivKey256 = null; + + private KeyAgreement dhKeyAgreement = null; + + // TEMPORARRY ARRAY IN RAM + private byte m_ramArray[] = null; + // PERSISTENT ARRAY IN EEPROM + private byte m_dataArray[] = null; + + protected SimpleECCApplet(byte[] buffer, short offset, byte length) { + short dataOffset = offset; + + if(length > 9) { + // shift to privilege offset + dataOffset += (short)( 1 + buffer[offset]); + // finally shift to Application specific offset + dataOffset += (short)( 1 + buffer[dataOffset]); + // go to proprietary data + dataOffset++; + + m_ramArray = JCSystem.makeTransientByteArray(ARRAY_LENGTH, JCSystem.CLEAR_ON_RESET); + m_dataArray = new byte[ARRAY_LENGTH]; + Util.arrayFillNonAtomic(m_dataArray, (short) 0, ARRAY_LENGTH, (byte) 0); + + dhKeyAgreement = KeyAgreement.getInstance(KeyAgreement.ALG_EC_SVDP_DH, false); + } + + register(); + } + + public static void install(byte[] bArray, short bOffset, byte bLength) throws ISOException { + // applet instance creation + new SimpleECCApplet (bArray, bOffset, bLength); + } + + public boolean select() { + return true; + } + + public void deselect() { + return; + } + + public void process(APDU apdu) throws ISOException + { + // get the APDU buffer + byte[] apduBuffer = apdu.getBuffer(); + + // ignore the applet select command dispached to the process + if (selectingApplet()) + return; + + if (apduBuffer[ISO7816.OFFSET_CLA] == CLA_SIMPLEECCAPPLET) { + switch ( apduBuffer[ISO7816.OFFSET_INS] ) { + case INS_ALLOCATEKEYPAIR: + AllocateKeyPairReturnDefCourve(apdu); + break; + case INS_ALLOCATEKEYPAIRS: + AllocateKeyPairs(apdu); + break; + case INS_GENERATEKEY: + GenerateKey(apdu); + break; + case INS_DERIVEECDHSECRET: + DeriveECDHSecret(apdu); + break; + + default : + // The INS code is not supported by the dispatcher + ISOException.throwIt( ISO7816.SW_INS_NOT_SUPPORTED ) ; + break ; + + } + } + else ISOException.throwIt( ISO7816.SW_CLA_NOT_SUPPORTED); + } + + void AllocateKeyPair(byte algorithm, short bitLen) { + // Select proper attributes + switch (bitLen) { + case (short) 128: { + ecKeyPair = ecKeyPair128; + ecKeyPair = ecKeyPair128; + ecPrivKey = ecPrivKey128; + break; + } + case (short) 160: { + ecKeyPair = ecKeyPair160; + ecKeyPair = ecKeyPair160; + ecPrivKey = ecPrivKey160; + break; + } + case (short) 192: { + ecKeyPair = ecKeyPair192; + ecKeyPair = ecKeyPair192; + ecPrivKey = ecPrivKey192; + break; + } + case (short) 256: { + ecKeyPair = ecKeyPair256; + ecKeyPair = ecKeyPair256; + ecPrivKey = ecPrivKey256; + break; + } + default: { + ISOException.throwIt((short) -1); + } + } + + // Allocate instance + ecKeyPair = new KeyPair(algorithm, bitLen); + ecKeyPair.genKeyPair(); + ecPubKey = (ECPublicKey) ecKeyPair.getPublic(); + // sometimes null is returned and previous one call to genKeyPair() + // is required before we can get public key + if (ecPubKey == null) { + ecKeyPair.genKeyPair(); + } + ecPubKey = (ECPublicKey) ecKeyPair.getPublic(); + ecPrivKey = (ECPrivateKey) ecKeyPair.getPrivate(); + // Set required EC parameters + EC_Consts.setECKeyParams(ecPubKey, ecPrivKey, bitLen, m_ramArray); + } + + short TryAllocateKeyPair(byte algorithm, short bitLen, byte[] buffer, short offset) { + // Try allocation, log result + try { + offset = Util.setShort(buffer, offset, bitLen); + AllocateKeyPair(KeyPair.ALG_EC_FP, bitLen); + buffer[offset] = 1; + offset++; + } catch (Exception e) { + buffer[offset] = 0; + offset++; + } + return offset; + } + void AllocateKeyPairs(APDU apdu) { + byte[] apdubuf = apdu.getBuffer(); + apdu.setIncomingAndReceive(); + + short offset = 0; + + //offset = TryAllocateKeyPair(KeyPair.ALG_EC_FP, (short) 128, apdubuf, offset); + //offset = TryAllocateKeyPair(KeyPair.ALG_EC_FP, (short) 160, apdubuf, offset); + //offset = TryAllocateKeyPair(KeyPair.ALG_EC_FP, (short) 192, apdubuf, offset); + //offset = TryAllocateKeyPair(KeyPair.ALG_EC_FP, (short) 256, apdubuf, offset); + + apdu.setOutgoingAndSend((short) 0, offset); + } + + void AllocateKeyPairReturnDefCourve(APDU apdu) { + byte[] apdubuf = apdu.getBuffer(); + apdu.setIncomingAndReceive(); + + short bitLen = Util.getShort(apdubuf, ISO7816.OFFSET_CDATA); + + // Note: all locations shoudl happen in constructor. But here it is intentional + // as we like to test for result of allocation + ecKeyPair = new KeyPair(KeyPair.ALG_EC_FP, bitLen); + + // If required, generate also new key pair + if (apdubuf[ISO7816.OFFSET_P1] == (byte) 1) { + ecPubKey = (ECPublicKey) ecKeyPair.getPublic(); + ecPrivKey = (ECPrivateKey) ecKeyPair.getPrivate(); + // Some implementation wil not return valid pub key until ecKeyPair.genKeyPair() is called + // Other implementation will fail with exception if same is called => try catch + try { + if (ecPubKey == null) {ecKeyPair.genKeyPair();} + } + catch (Exception e) {} // do nothing + + + // If required, initialize curve parameters first + if (apdubuf[ISO7816.OFFSET_P2] == (byte) 2) { + EC_Consts.setECKeyParams(ecPubKey, ecPrivKey, bitLen, m_ramArray); + } + + // Now generate new keypair with either default or custom curve + ecKeyPair.genKeyPair(); + ecPubKey = (ECPublicKey) ecKeyPair.getPublic(); + ecPrivKey = (ECPrivateKey) ecKeyPair.getPrivate(); + + short len = 0; + short offset = 0; + + // Export curve public parameters + offset += 2; // reserve space for length + len = ecPubKey.getField(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; + offset += 2; // reserve space for length + len = ecPubKey.getA(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; + + offset += 2; // reserve space for length + len = ecPubKey.getB(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; + offset += 2; // reserve space for length + len = ecPubKey.getR(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; +/* + offset += 2; // reserve space for length + len = ecPubKey.getW(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; +*/ + apdu.setOutgoingAndSend((short) 0, offset); + } + } + +/** + For a first quick test, this would be the workflow: + * + * 1. Import a given ECC public key (i.e. a point that is not on the curve) + * + * 2. Generate a fresh ECC keypair + * + * 3. Perform a ECDH key-derivation with the keys from steps 1 and 2 + * + * 4. Repeat steps 2 & 3 a couple of times and record the generated secrets + * + * + * + * If the card is vulnerable, then the generated secrets will repeat. For + * example, we have points of order 5. With such a point and a vulnerable + * card, there are only 5 (or even less) different possible values for the + * generated secrets. This is pretty obvious, if you do a couple of (e.g. + * +-10) key-derivations ;) + * @param apdu + */ + void DeriveECDHSecret(APDU apdu) { + byte[] apdubuf = apdu.getBuffer(); + short len = apdu.setIncomingAndReceive(); + + // Assumption: proper EC keyPair is already allocated + + // If public key point is provided, then use it + if (len == 0) { + // if not provided, use build-in one + Util.arrayCopyNonAtomic(EC192_FP_PUBLICW, (short) 0, apdubuf, ISO7816.OFFSET_CDATA, (short) EC192_FP_PUBLICW.length); + len = (short) EC192_FP_PUBLICW.length; + } + + // Generate fresh EC keypair + ecKeyPair.genKeyPair(); + ecPrivKey = (ECPrivateKey) ecKeyPair.getPrivate(); + + dhKeyAgreement.init(ecPrivKey); + short secretLen = 0; + // Generate and export secret + secretLen = dhKeyAgreement.generateSecret(apdubuf, ISO7816.OFFSET_CDATA, len, m_ramArray, (short) 0); + Util.arrayCopyNonAtomic(m_ramArray, (short) 0, apdubuf, (short) 0, secretLen); + + apdu.setOutgoingAndSend((short) 0, secretLen); + } + + + void GenerateKey(APDU apdu) { + byte[] apdubuf = apdu.getBuffer(); + apdu.setIncomingAndReceive(); + + // Assumption: proper EC keyPair is already allocated and initialized + + ecKeyPair.genKeyPair(); + ecPubKey = (ECPublicKey) ecKeyPair.getPrivate(); + ecPrivKey = (ECPrivateKey) ecKeyPair.getPrivate(); + + short offset = 0; + offset += 2; // reserve space for length + short len = ecPubKey.getW(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; + offset += 2; // reserve space for length + len = ecPrivKey.getS(apdubuf, offset); + Util.setShort(apdubuf, (short) (offset - 2), len); + offset += len; + + apdu.setOutgoingAndSend((short) 0, offset); + } +} + diff --git a/src/simpleapdu/CardMngr.java b/src/simpleapdu/CardMngr.java new file mode 100644 index 0000000..d3ff86b --- /dev/null +++ b/src/simpleapdu/CardMngr.java @@ -0,0 +1,209 @@ +package simpleapdu; + +import com.licel.jcardsim.io.CAD; +import com.licel.jcardsim.io.JavaxSmartCardInterface; +import java.util.List; +import javacard.framework.AID; +import javax.smartcardio.*; + +/** + * + * @author xsvenda + */ +public class CardMngr { + CardTerminal m_terminal = null; + CardChannel m_channel = null; + Card m_card = null; + + // Simulator related attributes + private static CAD m_cad = null; + private static JavaxSmartCardInterface m_simulator = null; + + + private final byte selectCM[] = { + (byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x07, (byte) 0xa0, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x18, (byte) 0x43, (byte) 0x4d}; + + public static final byte OFFSET_CLA = 0x00; + public static final byte OFFSET_INS = 0x01; + public static final byte OFFSET_P1 = 0x02; + public static final byte OFFSET_P2 = 0x03; + public static final byte OFFSET_LC = 0x04; + public static final byte OFFSET_DATA = 0x05; + public static final byte HEADER_LENGTH = 0x05; + public final static short DATA_RECORD_LENGTH = (short) 0x80; // 128B per record + public final static short NUMBER_OF_RECORDS = (short) 0x0a; // 10 records + + public boolean ConnectToCard() throws Exception { + // TRY ALL READERS, FIND FIRST SELECTABLE + List terminalList = GetReaderList(); + + if (terminalList.isEmpty()) { + System.out.println("No terminals found"); + } + + //List numbers of Card readers + boolean cardFound = false; + for (int i = 0; i < terminalList.size(); i++) { + System.out.println(i + " : " + terminalList.get(i)); + m_terminal = (CardTerminal) terminalList.get(i); + if (m_terminal.isCardPresent()) { + m_card = m_terminal.connect("*"); + System.out.println("card: " + m_card); + m_channel = m_card.getBasicChannel(); + + //reset the card + ATR atr = m_card.getATR(); + System.out.println(bytesToHex(m_card.getATR().getBytes())); + + cardFound = true; + } + } + + return cardFound; + } + + public void DisconnectFromCard() throws Exception { + if (m_card != null) { + m_card.disconnect(false); + m_card = null; + } + } + + public byte[] GetCPLCData() throws Exception { + byte[] data; + + // TODO: Modify to obtain CPLC data + byte apdu[] = new byte[HEADER_LENGTH]; + apdu[OFFSET_CLA] = (byte) 0x00; + apdu[OFFSET_INS] = (byte) 0x00; + apdu[OFFSET_P1] = (byte) 0x00; + apdu[OFFSET_P2] = (byte) 0x00; + apdu[OFFSET_LC] = (byte) 0x00; + + ResponseAPDU resp = sendAPDU(apdu); + if (resp.getSW() != 0x9000) { // 0x9000 is "OK" + System.out.println("Fail to obtain card's response data"); + data = null; + } else { + byte temp[] = resp.getBytes(); + data = new byte[temp.length - 2]; + System.arraycopy(temp, 0, data, 0, temp.length - 2); + // Last two bytes are status word (also obtainable by resp.getSW()) + // Take a look at ISO7816_status_words.txt for common codes + } + + return data; + } + + public void ProbeCardCommands() throws Exception { + // TODO: modify to probe for instruction + for (int i = 0; i <= 0; i++) { + byte apdu[] = new byte[HEADER_LENGTH]; + apdu[OFFSET_CLA] = (byte) 0x00; + apdu[OFFSET_INS] = (byte) 0x00; + apdu[OFFSET_P1] = (byte) 0x00; + apdu[OFFSET_P2] = (byte) 0x00; + apdu[OFFSET_LC] = (byte) 0x00; + + ResponseAPDU resp = sendAPDU(apdu); + + System.out.println("Response: " + Integer.toHexString(resp.getSW())); + + if (resp.getSW() != 0x6D00) { // Note: 0x6D00 is SW_INS_NOT_SUPPORTED + // something? + } + } + } + + public List GetReaderList() { + try { + TerminalFactory factory = TerminalFactory.getDefault(); + List readersList = factory.terminals().list(); + return readersList; + } catch (Exception ex) { + System.out.println("Exception : " + ex); + return null; + } + } + + public ResponseAPDU sendAPDU(byte apdu[]) throws Exception { + CommandAPDU commandAPDU = new CommandAPDU(apdu); + + System.out.println(">>>>"); + System.out.println(commandAPDU); + + System.out.println(bytesToHex(commandAPDU.getBytes())); + + long elapsed = -System.nanoTime(); + + ResponseAPDU responseAPDU = m_channel.transmit(commandAPDU); + + elapsed += System.nanoTime(); + + System.out.println(responseAPDU); + System.out.println(bytesToHex(responseAPDU.getBytes())); + + if (responseAPDU.getSW1() == (byte) 0x61) { + CommandAPDU apduToSend = new CommandAPDU((byte) 0x00, + (byte) 0xC0, (byte) 0x00, (byte) 0x00, + (int) responseAPDU.getSW1()); + + responseAPDU = m_channel.transmit(apduToSend); + System.out.println(bytesToHex(responseAPDU.getBytes())); + } + + System.out.println("<<<<"); + System.out.println("Elapsed time (ms): " + elapsed / 1000000); + return (responseAPDU); + } + + public String byteToHex(byte data) { + StringBuilder buf = new StringBuilder(); + buf.append(toHexChar((data >>> 4) & 0x0F)); + buf.append(toHexChar(data & 0x0F)); + return buf.toString(); + } + + public char toHexChar(int i) { + if ((0 <= i) && (i <= 9)) { + return (char) ('0' + i); + } else { + return (char) ('a' + (i - 10)); + } + } + + public String bytesToHex(byte[] data) { + StringBuilder buf = new StringBuilder(); + for (int i = 0; i < data.length; i++) { + buf.append(byteToHex(data[i])); + buf.append(" "); + } + return (buf.toString()); + } + + + public boolean prepareLocalSimulatorApplet(byte[] appletAIDArray, byte[] installData, Class appletClass) { + System.setProperty("com.licel.jcardsim.terminal.type", "2"); + m_cad = new CAD(System.getProperties()); + m_simulator = (JavaxSmartCardInterface) m_cad.getCardInterface(); + AID appletAID = new AID(appletAIDArray, (short) 0, (byte) appletAIDArray.length); + + AID appletAIDRes = m_simulator.installApplet(appletAID, appletClass, installData, (short) 0, (byte) installData.length); + return m_simulator.selectApplet(appletAID); + } + + public byte[] sendAPDUSimulator(byte apdu[]) throws Exception { + System.out.println(">>>>"); + System.out.println(bytesToHex(apdu)); + + byte[] responseBytes = m_simulator.transmitCommand(apdu); + + System.out.println(bytesToHex(responseBytes)); + System.out.println("<<<<"); + + return responseBytes; + } + + +} diff --git a/src/simpleapdu/ISO7816_status_words.txt b/src/simpleapdu/ISO7816_status_words.txt new file mode 100644 index 0000000..bf5af2b --- /dev/null +++ b/src/simpleapdu/ISO7816_status_words.txt @@ -0,0 +1,71 @@ +public interface ISO7816 { + + // Fields + public static final byte INS_EXTERNAL_AUTHENTICATE = -126; + public static final byte INS_SELECT = -92; + public static final byte CLA_ISO7816 = 0; + public static final byte OFFSET_CDATA = 5; + public static final byte OFFSET_LC = 4; + public static final byte OFFSET_P2 = 3; + public static final byte OFFSET_P1 = 2; + public static final byte OFFSET_INS = 1; + public static final byte OFFSET_CLA = 0; + public static final short SW_FILE_FULL = 27268; 0x6A84 + public static final short SW_UNKNOWN = 28416; 0x6F00 + public static final short SW_CLA_NOT_SUPPORTED = 28160; 0x6E00 + public static final short SW_INS_NOT_SUPPORTED = 27904; 0x6D00 + public static final short SW_CORRECT_LENGTH_00 = 27648; 0x6C00 + public static final short SW_WRONG_P1P2 = 27392; 0x6B00 + public static final short SW_INCORRECT_P1P2 = 27270; 0x6A86 + public static final short SW_RECORD_NOT_FOUND = 27267; 0x6A83 + public static final short SW_FILE_NOT_FOUND = 27266; 0x6A82 + public static final short SW_FUNC_NOT_SUPPORTED = 27265; 0x6A81 + public static final short SW_WRONG_DATA = 27264; 0x6A80 + public static final short SW_APPLET_SELECT_FAILED = 27033; 0x6999 + public static final short SW_COMMAND_NOT_ALLOWED = 27014; 0x6986 + public static final short SW_CONDITIONS_NOT_SATISFIED = 27013; 0x6985 + public static final short SW_DATA_INVALID = 27012; 0x6984 + public static final short SW_FILE_INVALID = 27011; 0x6983 + public static final short SW_SECURITY_STATUS_NOT_SATISFIED = 27010; 0x6982 + public static final short SW_WRONG_LENGTH = 26368; 0x6700 + public static final short SW_BYTES_REMAINING_00 = 24832; 0x6100 + public static final short SW_NO_ERROR = -28672; 0x9000 +} + +public interface JCStatus { +static int ALGORITHM_NOT_SUPPORTED = 0x9484; +static int APPLET_INVALIDATED = 0x6283; +static int APPLET_SELECT_FAILED = 0x6999 +static int AUTHENTICATION_FAILED = 0x6300 +static int AUTHORIZATION_FAILED = 0x9482 +static int CHECKSUM_FAILED = 0x9584 +static int CLA_NOT_SUPPORTED = 0x6E00 +static int COMMAND_NOT_ALLOWED = 0x6986 +static int CONDITIONS_NOT_SATISFIED = 0x6985 +static int CORRECT_LENGTH_00 = 0x6C00 +static int DATA_INVALID = 0x6984 +static int DECRYPTION_FAILED = 0x9583 +static int FILE_FULL = 0x6A84 +static int FILE_INVALID = 0x6983 +static int FILE_NOT_FOUND = 0x6A82 +static int FUNC_NOT_SUPPORTED = 0x6A81 +static int INCORRECT_P1P2 = 0x6A86 +static int INS_NOT_SUPPORTED = 0x6D00 +static int INSTALLATION_FAILED = 0x9585 +static int INVALID_STATE = 0x9481 +static int NO_ERROR = 0x9000 +static int NO_SPECIFIC_DIAGNOSIS = 0x6400 +static int PIN_REQUIRED = 0x6982 +static int RECORD_NOT_FOUND = 0x6A83 +static int REFERENCE_DATA_NOT_FOUND = 0x6A88 +static int REGISTRATION_FAILED = 0x9586 +static int SECURITY_STATUS_NOT_SATISFIED = 0x6982 +static int SIGNATURE_CHECK_FAILED = 0x9582 +static int SM_INCORRECT = 0x6988 +static int SM_MISSING = 0x6987 +static int TRUNCATED_DATA = 0x6100 +static int UNKNOWN = 0x6F00 +static int WRONG_DATA = 0x6A80 +static int WRONG_LENGTH = 0x6700 +static int WRONG_P1P2 = 0x6B00 +} \ No newline at end of file diff --git a/src/simpleapdu/SimpleAPDU.java b/src/simpleapdu/SimpleAPDU.java new file mode 100644 index 0000000..240a1cf --- /dev/null +++ b/src/simpleapdu/SimpleAPDU.java @@ -0,0 +1,78 @@ +package simpleapdu; + +import applets.SimpleECCApplet; +import javax.smartcardio.ResponseAPDU; + +/** + * + * @author xsvenda + */ +public class SimpleAPDU { + static CardMngr cardManager = new CardMngr(); + + private static byte DEFAULT_USER_PIN[] = {(byte) 0x30, (byte) 0x30, (byte) 0x30, (byte) 0x30}; + private static byte NEW_USER_PIN[] = {(byte) 0x31, (byte) 0x31, (byte) 0x31, (byte) 0x31}; + private static byte APPLET_AID[] = {(byte) 0x4C, (byte) 0x61, (byte) 0x62, (byte) 0x61, (byte) 0x6B, + (byte) 0x41, (byte) 0x70, (byte) 0x70, (byte) 0x6C, (byte) 0x65, (byte) 0x74}; + private static byte SELECT_SIMPLEAPPLET[] = {(byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x0b, + (byte) 0x4C, (byte) 0x61, (byte) 0x62, (byte) 0x61, (byte) 0x6B, + (byte) 0x41, (byte) 0x70, (byte) 0x70, (byte) 0x6C, (byte) 0x65, (byte) 0x74}; + + private final byte selectCM[] = { + (byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x07, (byte) 0xa0, (byte) 0x00, (byte) 0x00, + (byte) 0x00, (byte) 0x18, (byte) 0x43, (byte) 0x4d}; + + private static byte GENERATEKEY[] = {(byte) 0xB0, (byte) 0x5A, (byte) 0x00, (byte) 0x00, (byte) 0x01, (byte) 0x00}; + private static byte RESPONDDATA[] = {(byte) 0xB0, (byte) 0x5B, (byte) 0x00, (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0x30}; + public static void main(String[] args) { + try { + // + // SIMULATED CARDS + // +/* + // Prepare simulated card + byte[] installData = new byte[10]; // no special install data passed now - can be used to pass initial keys etc. + cardManager.prepareLocalSimulatorApplet(APPLET_AID, installData, SimpleECCApplet.class); + + // TODO: prepare proper APDU command + short additionalDataLen = 0; + byte apdu[] = new byte[CardMngr.HEADER_LENGTH + additionalDataLen]; + apdu[CardMngr.OFFSET_CLA] = (byte) 0xB0; + apdu[CardMngr.OFFSET_INS] = (byte) 0x5a; + apdu[CardMngr.OFFSET_P1] = (byte) 0x00; + apdu[CardMngr.OFFSET_P2] = (byte) 0x00; + apdu[CardMngr.OFFSET_LC] = (byte) additionalDataLen; + + // TODO: if additional data are supplied (additionalDataLen != 0), then set proper inpupt here + + // NOTE: we are using sendAPDUSimulator() instead of sendAPDU() + byte[] response = cardManager.sendAPDUSimulator(apdu); + // TODO: parse response data - status, data + response = cardManager.sendAPDUSimulator(apdu); + +*/ + + + // + // REAL CARDS + // + + // TODO: Try same with real card + if (cardManager.ConnectToCard()) { + // Select our application on card + cardManager.sendAPDU(SELECT_SIMPLEAPPLET); + + for (int i = 0; i < 10; i++) { + cardManager.sendAPDU(GENERATEKEY); + } + cardManager.sendAPDU(RESPONDDATA); + + cardManager.DisconnectFromCard(); + } else { + System.out.println("Failed to connect to card"); + } + } catch (Exception ex) { + System.out.println("Exception : " + ex); + } + } +} -- cgit v1.3.1