curve4q.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:fourq 作者: bifurcation 项目源码 文件源码
def test_endo():
    TEST_LOOPS = 1000

    # Test phi endomorphism
    P = AffineToR1(Gx, Gy)
    for i in range(TEST_LOOPS):
        P = phi(P)
    phiP = ((0x5550AAB9E7A620EED5B5A3061287DB16, 0x3E61EBB9A1CB0210EC321E6CF33610FC),
            (0x5474BF8EC55603AE7E2851D5A8E83FB9, 0x5476093DBF8BF6BFA5077613491788D5))
    test.testpt("phi", P, phiP)

    # Test psi endomorphism
    P = AffineToR1(Gx, Gy)
    for i in range(TEST_LOOPS):
        P = psi(P)
    psiP = ((0x75AF54EDB41A2B93D8F3C8C24A2BC7E2, 0x065249F9EDE0C7984DE2466701F009A9),
            (0x06DBB85BFFB7C21E1C6E119ADD608104, 0x060A30903424BF13FD234D6C4CFA3EC1))
    test.testpt("psi", P, psiP)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号