diff --git a/fabric-client/config/default.json b/fabric-client/config/default.json index 56c3be37b9..d0202ba69d 100644 --- a/fabric-client/config/default.json +++ b/fabric-client/config/default.json @@ -1,7 +1,7 @@ { "request-timeout" : 3000, "tcert-batch-size" : 10, - "crypto-hash-algo": "SHA3", + "crypto-hash-algo": "SHA2", "crypto-keysize": 256, "crypto-hsm": false, "crypto-suite-software": { diff --git a/test/unit/cryptosuite-ecdsa-aes.js b/test/unit/cryptosuite-ecdsa-aes.js index a1f2649852..af7421da74 100644 --- a/test/unit/cryptosuite-ecdsa-aes.js +++ b/test/unit/cryptosuite-ecdsa-aes.js @@ -269,15 +269,14 @@ test('\n\n ** CryptoSuite_ECDSA_AES - function tests **\n\n', function (t) { t.equal(true, (typeof cryptoUtils._ecdsaCurve !== 'undefined' && typeof cryptoUtils._ecdsa !== 'undefined'), 'CryptoSuite_ECDSA_AES function tests: default instance has "_ecdsaCurve" and "_ecdsa" properties'); - // test default curve 256 with SHA3_256 - t.equal(cryptoUtils.hash(TEST_MSG), HASH_MSG_SHA3_256, + // test default curve 256 with SHA256 + t.equal(cryptoUtils.hash(TEST_MSG), HASH_MSG_SHA256, 'CryptoSuite_ECDSA_AES function tests: using "SHA2" hashing algorithm with default key size which should be 256'); - t.equal(cryptoUtils.hash(TEST_LONG_MSG), HASH_LONG_MSG_SHA3_256, + t.equal(cryptoUtils.hash(TEST_LONG_MSG), HASH_LONG_MSG_SHA256, 'CryptoSuite_ECDSA_AES function tests: using "SHA2" hashing algorithm with default key size which should be 256'); // test SHA384 hash - utils.setConfigSetting('crypto-hash-algo', 'sha2'); utils.setConfigSetting('crypto-keysize', 384); cryptoUtils = utils.getCryptoSuite(); t.equal(cryptoUtils.hash(TEST_MSG), HASH_MSG_SHA384, @@ -292,8 +291,8 @@ test('\n\n ** CryptoSuite_ECDSA_AES - function tests **\n\n', function (t) { t.equal('secp256r1', key.getPublicKey()._key.curveName, 'CryptoSuite_ECDSA_AES function tests: cryptoUtils generated public key curveName == secp256r1'); - // test curve 256 with SHA2_256 - utils.setConfigSetting('crypto-hash-algo', 'SHA2'); + // test curve 256 with SHA3_256 + utils.setConfigSetting('crypto-hash-algo', 'SHA3'); utils.setConfigSetting('crypto-keysize', 256); cryptoUtils = utils.getCryptoSuite(); return cryptoUtils.generateKey(); @@ -302,10 +301,10 @@ test('\n\n ** CryptoSuite_ECDSA_AES - function tests **\n\n', function (t) { t.equal('secp256r1', key.getPublicKey()._key.curveName, 'CryptoSuite_ECDSA_AES function tests: ccryptoUtils generated public key curveName == secp256r1'); - t.equal(cryptoUtils.hash(TEST_MSG), HASH_MSG_SHA256, + t.equal(cryptoUtils.hash(TEST_MSG), HASH_MSG_SHA3_256, 'CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 256'); - t.equal(cryptoUtils.hash(TEST_LONG_MSG), HASH_LONG_MSG_SHA256, + t.equal(cryptoUtils.hash(TEST_LONG_MSG), HASH_LONG_MSG_SHA3_256, 'CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 256'); // test SHA3_384