KeyPair.prototype.derive = function derive(pub) {
  if(!pub.validate()) {
    assert(pub.validate(), 'public point not validated');
  }
  return pub.mul(this.priv).getX();
};
The use of a broken or risky cryptographic algorithm is an unnecessary risk that may result in the exposure of sensitive information.