diff options
| author | J08nY | 2017-01-17 02:55:31 +0100 |
|---|---|---|
| committer | J08nY | 2017-01-17 03:17:08 +0100 |
| commit | 4debe5adb4bb486f488878e348ee7bcf386c43f2 (patch) | |
| tree | 2cacbee1b1fac0c6afb686f5c2ce6f64bc4e1499 /src/simpleapdu/DirtyLogger.java | |
| parent | bffdcc6925d806d74179a76b2dc57a619e9c1886 (diff) | |
| download | ECTester-4debe5adb4bb486f488878e348ee7bcf386c43f2.tar.gz ECTester-4debe5adb4bb486f488878e348ee7bcf386c43f2.tar.zst ECTester-4debe5adb4bb486f488878e348ee7bcf386c43f2.zip | |
major changes, ECTester rewrite, moved to valid package
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
Diffstat (limited to '')
| -rw-r--r-- | src/simpleapdu/DirtyLogger.java | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/simpleapdu/DirtyLogger.java b/src/simpleapdu/DirtyLogger.java deleted file mode 100644 index c06571b..0000000 --- a/src/simpleapdu/DirtyLogger.java +++ /dev/null @@ -1,48 +0,0 @@ -package simpleapdu; - -import java.io.FileOutputStream; -import java.io.IOException; - -/** - * - * @author xsvenda - */ -public class DirtyLogger { - FileOutputStream m_logFile; - boolean m_bOutputSystemOut = true; - - public DirtyLogger(FileOutputStream logFile, boolean bOutputSystemOut) { - m_logFile = logFile; - m_bOutputSystemOut = bOutputSystemOut; - } - public void println() { - String logLine = "\n"; - print(logLine); - } - public void println(String logLine) { - logLine += "\n"; - print(logLine); - } - public void print(String logLine) { - if (m_bOutputSystemOut) { - System.out.print(logLine); - } - if (m_logFile != null) { - try { - m_logFile.write(logLine.getBytes()); - } catch (IOException ex) { - } - } - } - - void flush() { - try { - m_logFile.flush(); - } catch (IOException ex) { - } - } - - void close() throws IOException { - m_logFile.close(); - } -} |
