aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/applet/ECTesterApplet.java
Commit message (Collapse)AuthorAgeFilesLines
* Add customizable time resolution.develJ08nY2019-03-181-0/+1
|
* Add better chunking support and detect it at runtime.J08nY2019-03-141-1/+1
|
* Add custom command chaining to be able to test T=0 cards.J08nY2019-03-131-2/+2
|
* Backport applet to JavaCard 2.2.1 to support more cards.J08nY2018-11-061-799/+12
|
* Reformat all code.J08nY2018-08-121-16/+14
|
* Add ECDSA_sign and ECDSA_verify commands, to allow separate testing.J08nY2018-04-051-29/+119
|
* Rename the CORRUPT command to TRANSFORM, as it does that now.J08nY2018-03-141-29/+29
|
* Add better unexpected exception handling to the applet.J08nY2018-03-051-44/+83
|
* Add some docs and fix ECTesterReader --bit-size option.J08nY2018-03-031-1/+0
|
* Bump copyright years.J08nY2018-02-041-1/+2
|
* Add more tests to the Wrong test suite.J08nY2018-02-041-3/+3
| | | | | | | | | | | | - Now tests also for: - Fp: - p = 0 - p = 1 - p = q^2; q prime - p = q * s; q and s primes - F2m: - e1 = e2 = e3 = 0 - m < e1 < e2 < e3
* Fix default test suite F2m tests.J08nY2018-01-201-1/+0
|
* Fix ECDSA APDU parsing on applet side.J08nY2018-01-131-2/+2
| | | | - Was broken when introducing signature type into the APDU.
* Simplify test suites.J08nY2018-01-091-1/+0
|
* Cleanup the applet ECKA and Signature objects.J08nY2017-12-271-122/+62
|
* Cleanup and a new gitignore.J08nY2017-11-101-11/+13
|
* corrected INS to avoid reserved 0x60-0x6f and 0x90-0x9fpetrs2017-06-161-6/+8
|
* explicit support for reallocation of KeyAgreement engine with provided typepetrs2017-06-161-4/+62
|
* Fix ECDH testsJ08nY2017-06-021-3/+62
|
* Minor fixesJ08nY2017-05-201-3/+3
|
* Added support for extended APDUs, fixed problems with large cmdsJ08nY2017-05-041-146/+142
| | | | | | | | | | | - Switched ECTesterApplet to Javacard 2.2.2 which supports Extended length APDUs (necessary for some Set commands when a large external curve is sent to the applet) - The incoming APDU is now copied over to a sufficiently large buffer before being processed - Simplified instruction processing logic - Renamed ECUtil to AppletUtil - Fixed padding error in nist/P-521
* Change EC_Consts.CORRUPTION_* into a short that's maskableJ08nY2017-05-011-19/+21
|
* Fix some test-vector tests, also test printingJ08nY2017-04-191-1/+7
|
* Refactor testing, add Config class, make EC_Data read bytesJ08nY2017-04-191-3/+4
| | | | | | | | | | | | - The ECTester.Config class now stores and reads all CLI options - Testing with the -t / --test option was partially refactored into: - Test: Encapsulates one Command and Response pair with expected result, a real result and a callback to dynamically assign result - TestSuite: Encapsulates a bunch of tests, represents a whole category of tests either that can be run on any curve or only on some.
* Add invalid curves test(partly) and some parameters (brainpool) for itJ08nY2017-04-151-5/+18
| | | | | | | | | - curves.xml, keys.xml and results.xml's entries can now instead of file path to point to csv file, contain the csv data inline. - Moved EC_Category to reader package from data - Fixed printing of named objects - Added ECDH/C test for KA_BOTH which does ECDH and ECDHC on the applet side, compares the results and reports success/failure etc.
* Added more documentation, anomalous curves, support command.J08nY2017-03-301-5/+41
| | | | | | | | | | | | | - Added CURVES.md, FORMAT.md and TESTS.md that talk a bit about what ECTester actually does/support. - Added anomalous curves (where |F_p| = #|E(F_p)|), meaning these curves have a trace of one and ECDLP over them reduces to easy DLP over multiplicative F*_p. These concrete curves are from Atsuko Miyaji's paper: Elliptic curves over F_p Suitable for Cryptosystems. - Added Support command that queries the results of KeyAgreement and Signature allocations. - Renamed smallpub curves to nonprime curves. - Fixed nonprime curves test suite.
* Implemented ECDHC testing.J08nY2017-03-241-4/+19
| | | | | | - also some work on ECDH/ECDHC compatibility testing - new option -dhc / --ecdhc [count] the same as ecdh option, except it does ECDHC algo
* Applet: better handling of exceptions, new command for memory cleanup.J08nY2017-03-171-0/+35
|
* Cleanup, add ECDH corruption tests.J08nY2017-03-161-17/+11
| | | | | | | | | | | Reader: - added ECDH corruption tests - fixed EC_Data keys.xml search path - added more output to --list-named / -ln Both: - changed up ECDH command to support arbitrary temporary pubkey corruption
* Created a new command: CorruptJ08nY2017-03-141-23/+65
| | | | | Originaly a part of a set command, now allows more control of keypairs
* Added support for named curves (in jar).J08nY2017-03-061-2/+2
| | | | | - Doesn't work well while simulating, some weird memory bug. Will investigate. - Has categories of curves, more will be added.
* Added export instruction, and action to readerJ08nY2017-01-311-70/+112
| | | | | | | | | | One can now export the default domain parameters of the card/simulation with: `ectester.jar -e -fp -b 192 -o params.txt` - Renamed ParamReader to ECParams - Added Command.Export and Response.Export - Moved ECKeyGenerator.KEY_* to EC_Consts.KEY_*
* Added option to generate fresh keys(-f) also implemented basic ECC testingJ08nY2017-01-271-4/+34
| | | | | | | | - Added -f/--fresh - Fixed response align - Implemented basic EC testing, more advanced/complex tests are gonna be done through pre-generated files/curves/keys inside the jar or externally. Such as the invalid curve attack test and others.
* reader: Added a Command and Response abstractionJ08nY2017-01-221-96/+96
| | | | | | | | | | | | | - For easier testing - Command assembles the correct instruction from params in its constructor - Command.send() sends the command and obtains the Response with timing - Response parses the ResponseAPDU in its constructor and provides convenience methods to access its contents/SWs/success /failure/print data: Added more curves
* reader: implemented ecdh and ecdsa actions, also added some docsJ08nY2017-01-171-42/+65
| | | | | | - ecdh and ecdsa instructions now work, although without output to file, yet. - added MIT license headers to main classes
* implemented ecdh testing reader side:J08nY2017-01-171-0/+1
| | | | ectester -dh -fp -b 192
* major changes, ECTester rewrite, moved to valid packageJ08nY2017-01-171-0/+427
reader: ECTester, mostly rewritten SimpleAPDU - communication with applet now done through simpler instructions: allocate, set, generate, ecdh, ecdsa - moved to a valid Java package dir cz.crcs.ectester - SimpleAPDU: renamed to ECTester - CardMngr: seamlessly supports simulation vs real card - DirtyLogger: takes a nullable String and creates file - ECTester: currently only supports key generation, curve testing under way - supports external curve setting, example files in data package - tests can be done through files, to achieve a more modular approach - Util: static utility class - ParamReader: reads curve domain parameters and keys from simple csv-like human-readable files with hex strings applet: ECTesterApplet, rewrite of SimpleECCApplet - more granularity in instructions - moved complexity over to the reader side - ECKeyGenerator: now a class that takes KeyPair as param - ECKeyTester: now a class that takes KeyPair as param - EC_Consts: removed ecsp curves(now done externally), removed unused methods - ECTesterApplet: currently only tested instructions are: allocate, set, generate data: contains several curve and pubkey files in format supported by ParamReader - Prime field curves: p,a,b,gx,gy,r,k - Binary field curves: e1,a,b,gx,gy,r,k or e1,e2,e3,a,b,gx,gy,r,k - Public key: wx,wy - Private key: s - Key: wx,wy,s - all values are hex strings