code: def calculateAgreement(publicKey, privateKey):
          
          if publicKey.getType() != privateKey.getType():
              raise InvalidKeyException("Public and private keys must be of the same type!")
  
          if publicKey.getType() == Curve.DJB_TYPE:
              return _curve.calculateAgreement(privateKey.getPrivateKey(), publicKey.getPublicKey())
          else:
              raise InvalidKeyException("Unknown type: %s" % publicKey.getType())
docs: :type publicKey: ECPublicKey
          :type privateKey: ECPrivateKey