diff options
| author | J08nY | 2017-03-16 01:00:55 +0100 |
|---|---|---|
| committer | J08nY | 2017-03-16 01:00:55 +0100 |
| commit | 80b008850c961911ca9763947ebb6066f5288fff (patch) | |
| tree | d586320713f8704a504ab84381e9fae53cf215f7 /src/cz/crcs/ectester/reader/Command.java | |
| parent | 6a059501354b6b247bb8187b3f7973255176b4c0 (diff) | |
| download | ECTester-80b008850c961911ca9763947ebb6066f5288fff.tar.gz ECTester-80b008850c961911ca9763947ebb6066f5288fff.tar.zst ECTester-80b008850c961911ca9763947ebb6066f5288fff.zip | |
Cleanup, add ECDH corruption tests.
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
Diffstat (limited to 'src/cz/crcs/ectester/reader/Command.java')
| -rw-r--r-- | src/cz/crcs/ectester/reader/Command.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cz/crcs/ectester/reader/Command.java b/src/cz/crcs/ectester/reader/Command.java index cb2321a..876e999 100644 --- a/src/cz/crcs/ectester/reader/Command.java +++ b/src/cz/crcs/ectester/reader/Command.java @@ -250,7 +250,7 @@ public abstract class Command { private byte pubkey; private byte privkey; private byte export; - private byte invalid; + private byte corruption; /** * Creates the INS_ECDH instruction. @@ -259,16 +259,16 @@ public abstract class Command { * @param pubkey keyPair to use for public key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE) * @param privkey keyPair to use for private key, (KEYPAIR_LOCAL || KEYPAIR_REMOTE) * @param export whether to export ECDH secret - * @param invalid whether to invalidate the pubkey before ECDH + * @param corruption whether to invalidate the pubkey before ECDH (EC_Consts.CORRUPTION_* || ...) */ - public ECDH(CardMngr cardManager, byte pubkey, byte privkey, byte export, byte invalid) { + public ECDH(CardMngr cardManager, byte pubkey, byte privkey, byte export, byte corruption) { super(cardManager); this.pubkey = pubkey; this.privkey = privkey; this.export = export; - this.invalid = invalid; + this.corruption = corruption; - byte[] data = new byte[]{export, invalid}; + byte[] data = new byte[]{export, corruption}; this.cmd = new CommandAPDU(ECTesterApplet.CLA_ECTESTERAPPLET, ECTesterApplet.INS_ECDH, pubkey, privkey, data); } @@ -278,7 +278,7 @@ public abstract class Command { long elapsed = -System.nanoTime(); ResponseAPDU response = cardManager.send(cmd); elapsed += System.nanoTime(); - return new Response.ECDH(response, elapsed, pubkey, privkey, export, invalid); + return new Response.ECDH(response, elapsed, pubkey, privkey, export, corruption); } } |
