- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
加载 cong.sage
在 sage 中定义 random_elliptic_curve 命令,但我使用的是 SageMathCloud。我必须写什么才能生成随机椭圆曲线?
最佳答案
显然,您所指的Sage程序是cong.sage在 William Stein 的 GitHub 存储库中。可以将其导入到您的项目中:例如,从 GitHub 下载,将文件扩展名更改为 .sagews
,上传到您的项目。但从 SageMathCloud 中的另一个 Sage 文件导入定义似乎很棘手(如果可能的话),并且由于您只需要这个特定的函数,为什么不直接复制粘贴其定义。
这是一个简单的函数,位于上面链接的文件的最后:
def random_elliptic_curve(p):
"""
Construct and return a random elliptic curver over the finite
field of order p.
"""
p = ZZ(p)
if not is_prime(p):
raise ValueError, "p (=%s) must be a prime integer."%p
F = FiniteField(p)
while True:
try:
return EllipticCurve(F, [F.random_element(), F.random_element()])
except ArithmeticError:
pass
return E
关于python - SageMathCloud : random elliptic curve,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30727065/
ECDSA算法中256位EC key 的签名长度将是多少? 我想验证签名长度是否相同。如果某个机构可以帮助我设置一个EC key ,那将是很棒的。 最佳答案 这取决于您如何对签名进行编码。这是来自Op
Elliptic 曲线 diffie hellman 计算看起来与此处定义的标准曲线有什么不同: /* * The basic Diffie-Hell
加载 cong.sage在 sage 中定义 random_elliptic_curve 命令,但我使用的是 SageMathCloud。我必须写什么才能生成随机椭圆曲线? 最佳答案 显然,您所指的S
我正在尝试使用 Elliptic JS库生成可在两人之间使用的共享 key (来自他们的示例)。 问题是这个例子每次都会生成一个新的 key 对——我想让一个人使用他们自己的私钥,而另一个人使用公钥。
我尝试通过给定数字(我的私钥)计算曲线上的点来创建椭圆公钥,因此我得到了椭圆曲线点的坐标(x,y) 我得到坐标 myPublicKeyCoordinates = myPrivateKeyValue *
我尝试通过给定数字(我的私钥)计算曲线上的点来创建椭圆公钥,因此我得到了椭圆曲线点的坐标(x,y) 我得到坐标 myPublicKeyCoordinates = myPrivateKeyValue *
有什么方法可以删除椭圆曲线扩展 - elliptic_curves 和 ec_point_formats? (通过类似 SSL_CTX_set_options 的函数和 SessionTicket 扩
我们有一个使用 Crypto++ 库的 ECC 部分的 C++ 解决方案,但必须转移到 .NET 解决方案。由于 Microsoft 的 ECC 代码的文档最少,我目前正在试验文档最少的 Bouncy
我有以下 SVG 路径: 为了便于阅读: M 6, 2 C 4.89, 2 4,2.89 4,4 V 20 A 2,2 0 0,0 6,22 H 18 A 2,2 0 0,0 20,
我是一名优秀的程序员,十分优秀!