From 41f1e697b5edc713650fdccc3adefe916b788dcd Mon Sep 17 00:00:00 2001 From: Sanjana Rajan Date: Thu, 1 Feb 2018 13:41:19 +0100 Subject: [PATCH] remove isValid --- src/crypto/public_key/elliptic/key.js | 7 ------- test/crypto/elliptic.js | 3 --- 2 files changed, 10 deletions(-) diff --git a/src/crypto/public_key/elliptic/key.js b/src/crypto/public_key/elliptic/key.js index a896d361..3dea11bd 100644 --- a/src/crypto/public_key/elliptic/key.js +++ b/src/crypto/public_key/elliptic/key.js @@ -108,13 +108,6 @@ KeyPair.prototype.getPrivate = function () { } }; -KeyPair.prototype.isValid = function () { - if (this.curve.curve.type === 'edwards' || this.curve.curve.type === 'mont') { - throw new Error('Validation is not Implemented for this curve.'); - } - return this.keyPair.validate().result; -}; - module.exports = { KeyPair: KeyPair }; diff --git a/test/crypto/elliptic.js b/test/crypto/elliptic.js index 803afd1d..0c7d32d4 100644 --- a/test/crypto/elliptic.js +++ b/test/crypto/elliptic.js @@ -153,9 +153,6 @@ describe('Elliptic Curve Cryptography', function () { var curve = elliptic_curves.get(name); return curve.genKeyPair().then(keyPair => { expect(keyPair).to.exist; - // FIXME validation is not implemented for Curve25519/Ed25519 key pairs - if (name !== 'curve25519') - expect(keyPair.isValid()).to.be.true; }); })); });