问题描述
def infinityPoint(self):
xInf = random.getrandbits(256)
yInf = random.getrandbits(256)
return Point(xInf,yInf,self.curve)
当使用这个点作为一个对象来调用一个函数来做一些操作时,这行代码似乎没有被调用(通过调试)它会跳过并继续执行
def discretLog(self,n):
# convert the integer n into binary string
N = "{0:b}".format(n)
D = self
Res = self.infinityPoint() #point with large coordinates
for i in range(len(N)-1,-1):
if N[i] == 1:
Res = D.add(Res) #this instruction doesn't be called
D = D.doubling()
return Res
问题是由大整数引起的吗?有没有另一种方法来处理它们? (就像在java中我们使用具有特定功能的BigIntegers模块)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)