aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/reader/Util.java
Commit message (Collapse)AuthorAgeFilesLines
* Separate build files for standalone and reader apps.J08nY2017-11-121-375/+0
|
* Cleanup and a new gitignore.J08nY2017-11-101-9/+5
|
* Introduce Result.Value.ERROR.J08nY2017-11-051-2/+2
| | | | | - Value.ERROR is used when response.error() is true. - Value.ERROR is NOK.
* Introduce a Result class, that has a value and a cause.J08nY2017-10-251-3/+7
|
* explicit support for reallocation of KeyAgreement engine with provided typepetrs2017-06-161-0/+33
|
* Minor fixesJ08nY2017-05-201-1/+1
|
* Added support for extended APDUs, fixed problems with large cmdsJ08nY2017-05-041-105/+110
| | | | | | | | | | | - 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-9/+3
|
* Move tests to TestSuitesJ08nY2017-04-271-0/+12
|
* Fix some test-vector tests, also test printingJ08nY2017-04-191-2/+16
|
* Refactor testing, add Config class, make EC_Data read bytesJ08nY2017-04-191-1/+81
| | | | | | | | | | | | - 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.
* Added new corruption type and X962 point compression methods.J08nY2017-03-221-0/+3
|
* Applet: better handling of exceptions, new command for memory cleanup.J08nY2017-03-171-11/+80
|
* Created a new command: CorruptJ08nY2017-03-141-0/+32
| | | | | Originaly a part of a set command, now allows more control of keypairs
* removed newlines, changed f2m format, removed old SimpleAPDUJ08nY2017-02-211-6/+18
| | | | | | | | | | | | | | data: - now truly csv - f2m format now: m,e_1,e_2,e_3,a,b,gx,gy,r,k,wx,wy,s reader: - removed SimpleAPDU - changed f2m format applet: - changed f2m format
* Added export instruction, and action to readerJ08nY2017-01-311-1/+1
| | | | | | | | | | 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_*
* reader: Added a Command and Response abstractionJ08nY2017-01-221-3/+7
| | | | | | | | | | | | | - 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-0/+35
| | | | | | - 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-1/+1
| | | | ectester -dh -fp -b 192
* major changes, ECTester rewrite, moved to valid packageJ08nY2017-01-171-0/+82
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