/**
  * @return IdentifiableTree
  **/
 public function setParent(IdentifiableTree $parent)
 {
     Assert::brothers($this, $parent);
     $this->parent = $parent;
     return $this;
 }
 /**
  * @return NamedTree
  **/
 public function setParent(NamedTree $parent)
 {
     Assert::brothers($this, $parent);
     $this->parent = $parent;
     return $this;
 }
 public function __construct(BigInteger $gen, BigInteger $modulus)
 {
     Assert::brothers($gen, $modulus);
     $this->gen = $gen;
     $this->modulus = $modulus;
 }
 /**
  * @return BigInteger
  **/
 public function makeSharedKey(BigInteger $otherSitePublic)
 {
     Assert::brothers($this->private, $otherSitePublic);
     return $otherSitePublic->modPow($this->private, $this->parameters->getModulus());
 }