AlphaComplex1

問題概要

ジャンル

Crypto

点数

300 points

問題文

AlphaComplex1
Mission: Decrypt ac1.pwn.seccon.jp:31337
AlphaComplex1.zip

フラグ

???

挑戦者

tkmru
mzyy94
idzuna

解法

議論

とりあえず計算を持ってくるコード

#!/usr/bin/env python import socket import hashlib HOST = 'ac1.pwn.seccon.jp' # 'localhost' PORT = 31337 s = socket.create_connection((HOST, PORT)) def getdata(): skip = 77 # skip until prefix s.recv(skip) prefix = s.recv(128).rstrip() i = 0 while hashlib.sha1(prefix + str(i)).hexdigest()[:5] != "00000": i += 1 s.send(str(i) + "\n") # request data set dataline = s.recv(1024).splitlines() print(dataline[0]) print(dataline[1]) s.send(str(0) + "\n") print("C(m, y)**e = " + s.recv(1024)) if __name__=='__main__': getdata()

こんなの書いたけど法の世界には無力

def __div__(self, other):
	if isinstance(other, CZimpl):
		X = other.x
		Y = other.y # should be Zero
		a = self.x
		b = self.y
		return self.C(a / X, b / X)
	else:
		return self.C(self.x / other, self.y / other)