rsa3.py 文件源码

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

项目:ctf-library 作者: Hcamael 项目源码 文件源码
def GetPrimes(spub, spriv):
    p1 = GenPrimeWithOracle(spriv, k/2, e)
    while True:
        s0 = getRandomNBitInteger(o - m - 1)
        s = int_add(s0, spub)
        t = pi_sit_x(o, s)
        r2 = getRandomNBitInteger(k-o)
        nc = int_add(t, r2)
        q1 = nc / p1
        if isPrime(q1):
            return (p1, q1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号