rootq=[(9898464751509789, 1), (8415400986072042, 1), (6537111956662153, 1), (6139772527803903, 1), (2722510300825886, 1)] rootp =7361 rootr=[(8499052407588078002885931765166137308397074232361087682974448633946350539292222, 1), (5570877862584063114417410584640901580756179707042774516590562822938385811269597, 1), (2816114411493328258682873357893989007684496552202823306045771363205185148674391, 1), (1369135259891793292334345751773139388112378132927363770631732500241630990458667, 1), (180966415225632465120208272366108475667934082405238808958048294287011243645, 1)] minn = n for i in rootq: for j in rootr: if crt([rootp,i[0],j[0]],[p,q,r])< minn: minn = crt([rootp,i[0],j[0]],[p,q,r]) from Crypto.Util.number import * print(long_to_bytes(minn))
from Crypto.Util.number import * c=255310806360822158306697936064463902328816816156848194779397173946813224291656351345682266227949792774097276485816149202739762582969208376195999403112665514848825884325279574067341653685838880693150001066940379902609411551128810484902428845412055387955258568610350610226605230048821754213270699317153844590496606931431733319116866235538921198147193538906156906954406577796507390570080177313707462469835954564824944706687157852157673146976402325057144745208116022973614795377968986322754779469798013426261911408914756488145211933799442123449261969392169406969410065018032795960230701484816708147958190769470879211953704222809883281592308316942052671516609231501663363123562942 e=4758 n = 232087313537^4*653551912583^15*42044128297^6*802576647765917^7*104280142799213^6*22138874396255995367093123412542835139147*13762465758315682081101120047311808273580676420732931921786988371226809960736779727880583811067*6516832825116557981350931*28079229001363^3 flag = long_to_bytes(min(mod(c,n).nth_root(e,all=True))) print(flag)
what_r_the_noise
白给题,请求五百次数据然后求平均值就可以了。
Exp:
from pwn import * rs = remote("124.71.145.165", 9999)
#context.log_level = 'debug' database = [] T = 500 final = [] for i in range(47): final.append(0) for i in range(T): log.success(str(i)) #rs.recvuntil(":") rs.sendline("2") ans = rs.recvline().strip()[1:-1].split(',') database.append(ans) log.success(database) for i in database: try: for j in range(47): final[j] += float(i[j]) except: pass
for j in range(47): final[j] = chr(int(round(final[j]/T)+1)) flag = "".join(final) #log.success(final) log.success(flag)
for i in xrange(1,200): xk=solvex[-1]*solvex[0]+n*solvey[-1]*solvey[0] yk=solvex[-1]*solvey[0]+solvey[-1]*solvex[0] solvex.append(xk) solvey.append(yk) ansx = [] ansy = [] for i in range(len(solvex)): if (valid(solvex[i])): ansx.append(solvey[i]) ansy.append((solvex[i]-3)//4) for i in range(len(ansx)): assert(6*ansx[i]**2==2*ansy[i]**2+3*ansy[i]+1) print(len(ansx)) rs = remote("124.71.158.89",8888) proof_of_work(rs) for i in range(100): rs.recvuntil('[>] x:') rs.sendline(str(ansx[i])) rs.recvuntil('[>] y:') rs.sendline(str(ansy[i])) rs.interactive()