Skip to content

Commit

Permalink
SHA256 test to the end of ECC support
Browse files Browse the repository at this point in the history
Test of ALG_SHA_256 moved to end of quick ECC support testing as it is
causing error on some cards which will obscure subsequent results
  • Loading branch information
petrs committed Apr 4, 2018
1 parent 68b451b commit 1829967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion AlgTest_JClient/src/algtestjclient/CardMngr.java
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ public int GenerateAndGetKeys(FileOutputStream file, int numRepeats, int resetFr
byte apduPrivate[] = this.prepareApduForKeyHarvest(privateKeySetting);

int errors = 0;
while(numKeysGenerated < numRepeats) {
while (numKeysGenerated < numRepeats) {
try {
key.setLength(0);
if ((resetFrequency > 0) && (numKeysGenerated % resetFrequency == 0)) { bResetCard = true; }
Expand Down
3 changes: 1 addition & 2 deletions AlgTest_JClient/src/algtestjclient/PerformanceTesting.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,16 +324,15 @@ public void testECCPerformance(String[] args, boolean bTestVariableDataLengths,
short numRepeatWholeOperation = (short) 3;

testKeyAgreementWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN, "ALG_EC_FP LENGTH_EC_FP_256 ALG_EC_SVDP_DH_PLAIN", numRepeatWholeOperation, numRepeatWholeMeasurement);

// Test speed of message digest - applied in some options of KeyAgreement.generateSecret()
testMessageDigest(JCConsts.MessageDigest_ALG_SHA_256, "ALG_SHA_256", numRepeatWholeOperation, numRepeatWholeMeasurement);
testRandomGenerator(JCConsts.RandomData_ALG_SECURE_RANDOM, "ALG_SECURE_RANDOM", numRepeatWholeOperation, numRepeatWholeMeasurement);
testSignatureWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.Signature_ALG_ECDSA_SHA, "KeyPair_ALG_EC_FP KeyBuilder_LENGTH_EC_FP_256 Signature_ALG_ECDSA_SHA", numRepeatWholeOperation, numRepeatWholeMeasurement);
testKeyPair(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_LENGTH_EC_FP_256, "ALG_EC_FP LENGTH_EC_FP_256", numRepeatWholeOperation, numRepeatWholeMeasurement);
testKeyAgreementWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.KeyAgreement_ALG_EC_SVDP_DH, "ALG_EC_FP LENGTH_EC_FP_256 ALG_EC_SVDP_DH", numRepeatWholeOperation, numRepeatWholeMeasurement);
testKeyAgreementWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN, "ALG_EC_FP LENGTH_EC_FP_256 ALG_EC_SVDP_DH_PLAIN", numRepeatWholeOperation, numRepeatWholeMeasurement);
//testKeyAgreementWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.KeyAgreement_ALG_EC_PACE_GM, "ALG_EC_FP LENGTH_EC_FP_256 ALG_EC_PACE_GM", numRepeatWholeOperation, numRepeatWholeMeasurement);
testKeyAgreementWithKeyClass(JCConsts.KeyPair_ALG_EC_FP, JCConsts.KeyBuilder_TYPE_EC_FP_PRIVATE, JCConsts.KeyBuilder_LENGTH_EC_FP_256, JCConsts.KeyAgreement_ALG_EC_SVDP_DH_PLAIN_XY, "ALG_EC_FP LENGTH_EC_FP_256 ALG_EC_SVDP_DH_PLAIN_XY", numRepeatWholeOperation, numRepeatWholeMeasurement);
testMessageDigest(JCConsts.MessageDigest_ALG_SHA_256, "ALG_SHA_256", numRepeatWholeOperation, numRepeatWholeMeasurement);


for (String opName : m_algsAvgTime.keySet()) {
Expand Down

0 comments on commit 1829967

Please sign in to comment.