async decrypt(cipherPair){

        if(! this.isSecure){
            throw new Error(`Engine is not secure to use, 
                please make sure you call checkSecurity() method before using engine.`);
        }

        if(! this.isReady()){
            throw new Error(`Engine is not initialized correctly!`);
        }

        const sharedSecret = cipherPair.c1.modPow(this.x, this.p);
        const reverseSecret = sharedSecret.modInv(this.p);
        const plainText = reverseSecret.multiply(cipherPair.c2).mod(this.p);
        return plainText;
    }
/**
     * 
     * @param {cipherText} cipherPair - The result of encrypt() method. 
     * @returns {Promise<bigInteger.BigInteger>} - The decrypted message which is a big Integer. The message is a member of 
     * underlying Cyclic Group.
     */
@param {cipherText} cipherPair - The result of encrypt() method.
@returns {Promise} - The decrypted message which is a big Integer. The message is a member of
underlying Cyclic Group.
@param { cipherText } cipherPair - The result of encrypt () method . @returns { Promise } - The decrypted message which is a big Integer . The message is a member of underlying Cyclic Group .
async decrypt(cipherPair){
        if(! this.isSecure){
            throw new Error(`Engine is not secure to use, 
                please make sure you call checkSecurity() method before using engine.`);
        }
        if(! this.isReady()){
            throw new Error(`Engine is not initialized correctly!`);
        }
        const sharedSecret = cipherPair.c1.modPow(this.x, this.p);
        const reverseSecret = sharedSecret.modInv(this.p);
        const plainText = reverseSecret.multiply(cipherPair.c2).mod(this.p);
        return plainText;
    }
async decrypt ( cipherPair ) { if ( ! this . isSecure ) { throw new Error ( ` ` ) ; } if ( ! this . isReady ( ) ) { throw new Error ( ` ` ) ; } const sharedSecret = cipherPair . c1 . modPow ( this . x , this . p ) ; const reverseSecret = sharedSecret . modInv ( this . p ) ; const plainText = reverseSecret . multiply ( cipherPair . c2 ) . mod ( this . p ) ; return plainText ; }
@param {cipherText} cipherPair - The result of encrypt() method.
@param { cipherText } cipherPair - The result of encrypt () method .