Skip to content

Commit b9d7aec

Browse files
committed
Merge branch 'master' of https://github.com/petrs/ECTester
2 parents e13aa1e + cb661b5 commit b9d7aec

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

+38-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# ECTester
2-
Tester of Eliptic curves support on smartcards with JavaCard platform
1+
ECTester
2+
========
3+
4+
Tests support and behavior of smartcards with JavaCard platform with focus on Eliptic curves (TYPE_EC_FP and TYPE_EC_F2M).
5+
6+
Usage
7+
------
8+
1. Upload simpleECC.cap using your favorite tool (e.g., [GlobalPlatformPro tool](https://github.com/martinpaljak/GlobalPlatform))
9+
2. Run java -jar SimpleAPDU.jar
10+
3. Inspect output log with annotated results
11+
12+
Following operations are tested:
13+
- Allocation of new KeyPair class for specified parameters
14+
- Generation of keypair with default curve
15+
- Setting of custom curve and keypair generation
16+
- Generation of shared secret via ECDH
17+
- Behavior of card when invalid curves/points are provided (shoudl fail)
18+
19+
Example output
20+
--------------
21+
22+
EC type: ALG_EC_FP
23+
EC key length (bits): 224 bits
24+
KeyPair object allocation: OK (0x9000)
25+
Generate key with def curve (fails if no def): fail (ILLEGAL_VALUE, 0x1)
26+
Set valid custom curve: OK (0x9000)
27+
Generate key with valid curve: OK (0x9000)
28+
!!ECDH agreement with valid point: fail (0x9000)
29+
ECDH agreement with invalid point (fail is good): fail (unknown, 0x6f00)
30+
Set invalid custom curve (fail is good): fail (ILLEGAL_VALUE, 0x1)
31+
Generate key with invalid curve (fail is good): fail (skipped, 0xee1)
32+
33+
34+
*Explanation: ALG_EC_FP with 224b curve was tested. Is supported by card (KeyPair object allocation: OK), don't have preset default curve (Generate key with def curve: fail), custom curve can be set (Set valid custom curve: OK), new keypair can be generated (Generate key with valid curve: OK), ECDH key agreement failed to execute (ECDH agreement with valid point: fail) altough it was supposed to suceed (log line is therefore marked with !!), ECDH wil fail (expected behavior) if invalid point is provided (ECDH agreement with invalid point: fail), invalid custom curve cannot be set (expected behavior) (Set invalid custom curve: fail) and new keypair cannot be generated with invalid curve (Generate key with invalid curve: skipped) - last test was skipped as invalid curve canot be set.*
35+
36+
37+
If you are interested in testing support for other JavaCard algorithms, please visit JCAlgTester project: https://github.com/crocs-muni/JCAlgTest
38+

0 commit comments

Comments
 (0)